This commit is contained in:
John Bowdre 2023-10-01 16:33:22 -05:00
parent 3e0b5a1872
commit 64c5de2f84
3 changed files with 40 additions and 0 deletions

View file

@ -3,6 +3,7 @@
./kitty.nix
./mako.nix
./waybar.nix
./wofi.nix
];
xdg.mimeApps.enable = true;

View file

@ -0,0 +1,20 @@
--- 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);

View file

@ -0,0 +1,19 @@
{ config, lib, pkgs, ... }: {
programs.wofi = {
enable = true;
package = pkgs.wofi.overrideAttrs (oa: {
patches = (oa.patches or [ ]) ++ [
./wofi-run-shell.patch # Fix for https://todo.sr.ht/~scoopta/wofi/174
];
});
settings = {
image_size = 48;
columns = 3;
allow_images = true;
insensitive = true;
run-always_parse_args = true;
run-cache_file = "/dev/null";
run-exec_search = true;
};
};
}