From 170461002890d55718618bec64feaa8856c3a6d4 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Fri, 28 Nov 2025 00:01:27 +0530 Subject: Organised the configuration to allow for different options for different users. --- modules/desktop/sxhkd/default.nix | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 modules/desktop/sxhkd/default.nix (limited to 'modules/desktop/sxhkd/default.nix') diff --git a/modules/desktop/sxhkd/default.nix b/modules/desktop/sxhkd/default.nix new file mode 100644 index 0000000..8d0e6de --- /dev/null +++ b/modules/desktop/sxhkd/default.nix @@ -0,0 +1,41 @@ +{ pkgs, config, lib, ... }: + +{ + config = lib.mkIf config.desktop.enable { + services.sxhkd.enable = true; + services.sxhkd.keybindings = + let + modKey = "super"; + createKeybinding = keybinding: createKeybindingBase "${modKey} + ${keybinding}"; + createKeybindingBase = keybinding: description: command: { + "# ${description}\n${keybinding}" = command; + }; + in lib.mkMerge [ + (import ./keybindings/brightnessctl.nix { inherit pkgs createKeybindingBase lib; }) + (import ./keybindings/bspwm.nix { inherit pkgs createKeybinding lib; }) + (import ./keybindings/pamixer.nix { inherit pkgs createKeybindingBase lib; }) + (import ./keybindings/playerctl.nix { inherit pkgs createKeybindingBase lib; }) + + (createKeybinding + "s" + "Show keybindings." + "kitty --title 'Keybindings' --class floating-termial -e ${pkgs.writeShellScript "keybindings.sh" (builtins.readFile ./scripts/keybindings.sh)}" + ) + + (createKeybinding + "r" + "Application launcher." + "rofi -show drun") + + (createKeybinding + "t" + "Launch terminal." + "kitty") + + (createKeybinding + "f" + "Launch File Manager." + "kitty --title 'File Manager' --class floating-termial -e nnn") + ]; + }; +} -- cgit v1.2.3