nix-config/home/gburd/features/desktop/common/wayland-wm/wofi-run-shell.patch
Greg Burd f3fd89af54
A fork of Misterio77 and his standard template.
Many thangs to the hard work and generous availability of:
git@github.com:Misterio77/nix-config.git
2023-09-15 10:53:38 -04:00

20 lines
727 B
Diff

--- a/src/wofi.c Mon Feb 22 23:53:57 2021 -0800
+++ b/src/wofi.c Wed Aug 11 13:49:13 2021 -0300
@@ -881,12 +881,15 @@
}
void wofi_term_run(const char* cmd) {
+ char *shell = getenv("SHELL");
+ if (!shell) shell = "sh";
+
if(terminal != NULL) {
- execlp(terminal, terminal, "-e", cmd, NULL);
+ execlp(terminal, terminal, "-e", shell, "-c", cmd, NULL);
}
size_t term_count = sizeof(terminals) / sizeof(char*);
for(size_t count = 0; count < term_count; ++count) {
- execlp(terminals[count], terminals[count], "-e", cmd, NULL);
+ execlp(terminals[count], terminals[count], "-e", shell, "-c", cmd, NULL);
}
fprintf(stderr, "No terminal emulator found please set term in config or use --term\n");
exit(1);