actually add url to browser command
This commit is contained in:
parent
67774c3e46
commit
8617ce7b2d
7
dunst.c
7
dunst.c
@ -172,6 +172,7 @@ void context_menu(void) {
|
|||||||
if (!dmenu_input)
|
if (!dmenu_input)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
char buf[1024];
|
||||||
int child_io[2];
|
int child_io[2];
|
||||||
int parent_io[2];
|
int parent_io[2];
|
||||||
pipe(child_io);
|
pipe(child_io);
|
||||||
@ -192,7 +193,6 @@ void context_menu(void) {
|
|||||||
write(child_io[1], dmenu_input, strlen(dmenu_input));
|
write(child_io[1], dmenu_input, strlen(dmenu_input));
|
||||||
close(child_io[1]);
|
close(child_io[1]);
|
||||||
|
|
||||||
char buf[1024];
|
|
||||||
size_t len = read(parent_io[0], buf, 1023);
|
size_t len = read(parent_io[0], buf, 1023);
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return;
|
return;
|
||||||
@ -203,8 +203,11 @@ void context_menu(void) {
|
|||||||
|
|
||||||
int browser_pid = fork();
|
int browser_pid = fork();
|
||||||
|
|
||||||
|
|
||||||
if (browser_pid == 0) {
|
if (browser_pid == 0) {
|
||||||
execvp(browser_cmd[0], browser_cmd);
|
browser = string_append(browser, buf, " ");
|
||||||
|
char **cmd = string_to_argv(browser);
|
||||||
|
execvp(cmd[0], cmd);
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user