From a4fb9a83d671a4c7f3ed44df77cdee36604b5411 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Tue, 15 Oct 2024 04:21:26 +0530 Subject: Refactoring code. Stopped using picom. Disabled unused packages and configurations. --- modules/desktop/window-manager/sxhkd/default.nix | 38 ++++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'modules/desktop/window-manager/sxhkd/default.nix') diff --git a/modules/desktop/window-manager/sxhkd/default.nix b/modules/desktop/window-manager/sxhkd/default.nix index 953cfd3..f4678c3 100644 --- a/modules/desktop/window-manager/sxhkd/default.nix +++ b/modules/desktop/window-manager/sxhkd/default.nix @@ -11,36 +11,36 @@ services.sxhkd.keybindings = let modKey = "alt"; - createKeybinding = keybinding: description: "# ${description}\n${modKey} + ${keybinding}"; + createKeybinding = keybinding: description: command: { + "# ${description}\n${modKey} + ${keybinding}" = command; + }; in lib.mkMerge [ ( if config.desktop.window-manager.bspwm.enable then - (import ./keybindings/bspwm.nix { inherit pkgs createKeybinding; }) + (import ./keybindings/bspwm.nix { inherit pkgs createKeybinding lib; }) else {} ) - { - ${(createKeybinding + (lib.mkMerge [ + (createKeybinding "s" - "Show keybindings.")} - = pkgs.writeShellScript - "keybindings.sh" - (builtins.readFile ./scripts/keybindings.sh); + "Show keybindings." + (pkgs.writeShellScript "keybindings.sh" (builtins.readFile ./scripts/keybindings.sh))) - ${(createKeybinding - "r" - "Application launcher.")} - = config.desktop.application-launcher.command; + (createKeybinding + "space" + "Application launcher." + config.desktop.application-launcher.command) - ${(createKeybinding + (createKeybinding "t" - "Launch terminal.")} - = config.tools.terminal.command; + "Launch terminal." + config.tools.terminal.command) - ${(createKeybinding + (createKeybinding "f" - "Launch File Manager.")} - = "${config.tools.terminal.command} --title 'File Manager' --class floating-termial -e ${config.tools.file-manager.command}"; - } + "Launch File Manager." + "${config.tools.terminal.command} --title 'File Manager' --class floating-termial -e ${config.tools.file-manager.command}") + ]) ]; }; } -- cgit v1.2.3