{ config, lib, pkgs, inputs, ... }: let fuzzel-command = config.nathan.config.desktop.fuzzel-command; hyprland = config.nathan.programs.hyprland.enable; targets = config.nathan.config.desktop.targets; shortcuts = inputs.self.packages.${pkgs.system}.shortcuts; in lib.mkMerge [ (lib.mkIf hyprland { wayland.windowManager.hyprland.extraConfig = '' bind = SUPER, R, exec, ${fuzzel-command} --prompt='❯ ' # Clipboard history management exec-once=wl-paste --watch cliphist store bind = SUPER, X, exec, cliphist list | ${fuzzel-command} --prompt=' ❯ ' --dmenu | cliphist decode | wl-copy # Shortcut dispatcher bind = SUPER, W, exec, ${shortcuts}/bin/shortcuts ~/.config/shortcuts/shortcuts.toml ''; }) # General configuration (lib.mkIf hyprland { home.packages = with pkgs; [ fuzzel # Clipboard wl-clipboard cliphist ]; # Shortcut dispatcher xdg.configFile."shortcuts/shortcuts.toml" = { text = '' directories = ["~/.config/shortcuts/shortcuts", "${shortcuts}/shortcuts"] picker_command = "${ builtins.replaceStrings [ ''"'' ] [ ''\"'' ] (fuzzel-command + " --prompt=' ❯ ' ") } --dmenu" ''; onChange = '' mkdir -p ~/.config/shortcuts/shortcuts ''; }; }) ]