aboutsummaryrefslogtreecommitdiffstats
path: root/modules/desktop/hyprland/keybindings.nix
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar+git@gmail.com>2026-07-26 18:21:26 +0530
committerArpit Chakladar <arpitchakladar+git@gmail.com>2026-07-26 18:21:26 +0530
commitae21713f260fc1599c36c0e4cf572d24b0379ef4 (patch)
tree6882a7b3d606e62d463e544e01e575c7a563a003 /modules/desktop/hyprland/keybindings.nix
parent65e1ce5e82c0d272d91ca4213b0d27548768c2e7 (diff)
downloadhome-manager-config-ae21713f260fc1599c36c0e4cf572d24b0379ef4.tar.gz
home-manager-config-ae21713f260fc1599c36c0e4cf572d24b0379ef4.zip
feat: hyprland keybindings, neomutt refactoring
- Fixed the keybinding to resize the windows to 50% and 100% (Super + =) - Left Click + Drag on mouse to move windows - Right Click + Drag on mouse to resize
Diffstat (limited to 'modules/desktop/hyprland/keybindings.nix')
-rw-r--r--modules/desktop/hyprland/keybindings.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/modules/desktop/hyprland/keybindings.nix b/modules/desktop/hyprland/keybindings.nix
index f5c98b5..1ac1d9a 100644
--- a/modules/desktop/hyprland/keybindings.nix
+++ b/modules/desktop/hyprland/keybindings.nix
@@ -21,12 +21,23 @@ let
];
};
+ bindMouse = key: dispatcher: {
+ _args = [
+ (lua "mainMod .. \" + ${key}\"")
+ (lua dispatcher)
+ { mouse = true; }
+ ];
+ };
+
execLua = cmd: "hl.dsp.exec_cmd(\"${cmd}\")";
execLuaSingle = cmd: "hl.dsp.exec_cmd('${cmd}')";
in
{
config.wayland.windowManager.hyprland.settings.bind = lib.flatten [
+ (bindMouse "mouse:272" "hl.dsp.window.drag()") # mainMod + LMB drag: move
+ (bindMouse "mouse:273" "hl.dsp.window.resize()") # mainMod + RMB drag: resize
+
(lib.optionals config.desktop.rofi.enable [
(bind "R" (execLua "${lib.getExe config.desktop.rofi.package} -show drun"))
])
@@ -35,11 +46,11 @@ in
])
(lib.optionals (config.terminal.kitty.enable && config.file-management.yazi.enable) [
(bind "F" (
- execLua "${lib.getExe config.terminal.kitty.package} --class file-explorer --title 'Yazi' -e ${lib.getExe config.file-management.yazi.package}"
+ execLua "${lib.getExe config.terminal.kitty.package} --class yazi --title 'Yazi' -e ${lib.getExe config.file-management.yazi.package}"
))
])
(bind "SHIFT + Q" "hl.dsp.window.close()")
- (bind "Equal" (execLua "layoutmsg colresize +conf"))
+ (bind "Equal" "hl.dsp.layout(\"colresize +conf\")")
(lib.optionals config.system.brightnessctl.enable [
(bindRawFlags "XF86MonBrightnessDown"