mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-25 23:45:58 +01:00
pass env to popen cmd picker
This commit is contained in:
parent
9f933f42f1
commit
bd91bd0d4e
1 changed files with 7 additions and 1 deletions
|
@ -519,7 +519,13 @@ struct xdpw_share xdpw_wlr_chooser(struct xdpw_screencast_context *ctx) {
|
|||
FILE *fp;
|
||||
char buf[1024] = {0};
|
||||
|
||||
fp = popen("bash -c \"hyprland-share-picker\"", "r");
|
||||
const char* WAYLAND_DISPLAY = getenv("WAYLAND_DISPLAY");
|
||||
|
||||
char cmd[128] = "WAYLAND_DISPLAY=";
|
||||
strcat(cmd, WAYLAND_DISPLAY);
|
||||
strcat(cmd, " hyprland-share-picker");
|
||||
|
||||
fp = popen(cmd, "r");
|
||||
if (fp == NULL) {
|
||||
printf("Failed to run command\n");
|
||||
exit(1);
|
||||
|
|
Loading…
Reference in a new issue