diff --git a/nix/modules/environment/workstation/default.nix b/nix/modules/environment/workstation/default.nix index 925f7c8..9d339f2 100644 --- a/nix/modules/environment/workstation/default.nix +++ b/nix/modules/environment/workstation/default.nix @@ -52,6 +52,7 @@ in yk2fa-fzf kb-fzf ssh-master-fzf + fzf-popup man-5-dsm ]; diff --git a/nix/modules/services/ariade/niri/config.kdl.nix b/nix/modules/services/ariade/niri/config.kdl.nix index 721c922..75049ea 100644 --- a/nix/modules/services/ariade/niri/config.kdl.nix +++ b/nix/modules/services/ariade/niri/config.kdl.nix @@ -76,7 +76,7 @@ in Mod+T { spawn "ghostty"; } Mod+D { spawn-sh "noctalia-shell ipc call controlCenter toggle"; } Mod+Return { spawn-sh "noctalia-shell ipc call launcher toggle"; } - Mod+m { spawn "fzf-popup" "actions-fzf"; } + Mod+M { spawn "bash" "-c" "if niri msg windows | grep -q 'app_id: \"com.mitchellh.ghostty.popup\"'; then niri msg action close-window --id $(niri msg --json windows | jq '.[] | select(.app_id==\"com.mitchellh.ghostty.popup\") | .id'); else fzf-popup actions-fzf --layout=reverse; fi"; } Ctrl+Shift+L { ${ if cfg.lockScreen then ''spawn-sh "noctalia-shell ipc call lockScreen lock";'' diff --git a/nix/pkgs/fzf-scripts.nix b/nix/pkgs/fzf-scripts.nix index 8a6bb0c..7021192 100644 --- a/nix/pkgs/fzf-scripts.nix +++ b/nix/pkgs/fzf-scripts.nix @@ -268,4 +268,15 @@ prev } ]; }; + + fzf-popup = ( + final.writeShellApplication { + name = "fzf-popup"; + runtimeInputs = [ + final.ghostty + ]; + + text = ''ghostty --class=com.mitchellh.ghostty.popup --font-size=18 --gtk-single-instance=false --quit-after-last-window-closed=true --quit-after-last-window-closed-delay= --initial-command="shell:$*" --shell-integration=none''; + } + ); }