2023-06-20 02:17:47 -04:00
|
|
|
|
{ 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 = ''
|
2023-06-20 02:26:30 -04:00
|
|
|
|
bind = SUPER, R, exec, ${fuzzel-command} --prompt='❯ '
|
2023-06-20 02:17:47 -04:00
|
|
|
|
# Clipboard history management
|
|
|
|
|
exec-once=wl-paste --watch cliphist store
|
2023-06-20 02:26:30 -04:00
|
|
|
|
bind = SUPER, X, exec, cliphist list | ${fuzzel-command} --prompt=' ❯ ' --dmenu | cliphist decode | wl-copy
|
2023-06-20 02:17:47 -04:00
|
|
|
|
# Shortcut dispatcher
|
2023-06-20 02:26:30 -04:00
|
|
|
|
bind = SUPER, W, exec, ${shortcuts}/bin/shortcuts ~/.config/shortcuts/shortcuts.toml
|
2023-06-20 02:17:47 -04:00
|
|
|
|
'';
|
|
|
|
|
})
|
|
|
|
|
# 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
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
]
|