From 47dde98fd2cf11ea544bb1c8d8d548ee0bda0f54 Mon Sep 17 00:00:00 2001 From: Alexander Kassouni Date: Wed, 2 Sep 2026 21:20:10 -0700 Subject: some sway stuff --- users/kassouni/palette/fuzzel-palette.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 users/kassouni/palette/fuzzel-palette.nix (limited to 'users/kassouni/palette/fuzzel-palette.nix') diff --git a/users/kassouni/palette/fuzzel-palette.nix b/users/kassouni/palette/fuzzel-palette.nix new file mode 100644 index 0000000..d6d4774 --- /dev/null +++ b/users/kassouni/palette/fuzzel-palette.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.kassouni.palette; +in +{ + # Wayland front end for the palette. `--index` is fuzzel's answer to rofi's + # `-format i`, so the same index-into-exes trick works. Unlike rofi, fuzzel + # will happily accept text that matches no row; it exits non-zero there, but + # the numeric guard keeps a surprising build of fuzzel from indexing the + # array with garbage. + home.packages = [ + (pkgs.writers.writeBashBin "open-palette-fuzzel" '' + set -eu + exes=(${lib.concatMapStringsSep " " (c: "${c.exe}") cfg.commands}) + idx=$(${pkgs.fuzzel}/bin/fuzzel --dmenu --index --prompt "palette " <