mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-12-22 12:22:17 +00:00
add wofi
This commit is contained in:
parent
3e0b5a1872
commit
64c5de2f84
3 changed files with 40 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
./kitty.nix
|
||||
./mako.nix
|
||||
./waybar.nix
|
||||
./wofi.nix
|
||||
];
|
||||
|
||||
xdg.mimeApps.enable = true;
|
||||
|
|
20
home/features/desktop/wayland-wm/wofi-run-shell.patch
Normal file
20
home/features/desktop/wayland-wm/wofi-run-shell.patch
Normal 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);
|
19
home/features/desktop/wayland-wm/wofi.nix
Normal file
19
home/features/desktop/wayland-wm/wofi.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue