diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-26 18:21:26 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-26 18:21:26 +0530 |
| commit | ae21713f260fc1599c36c0e4cf572d24b0379ef4 (patch) | |
| tree | 6882a7b3d606e62d463e544e01e575c7a563a003 /modules/desktop/hyprland | |
| parent | 65e1ce5e82c0d272d91ca4213b0d27548768c2e7 (diff) | |
| download | home-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')
| -rw-r--r-- | modules/desktop/hyprland/default.nix | 13 | ||||
| -rw-r--r-- | modules/desktop/hyprland/keybindings.nix | 15 |
2 files changed, 13 insertions, 15 deletions
diff --git a/modules/desktop/hyprland/default.nix b/modules/desktop/hyprland/default.nix index 09f2639..c1e3053 100644 --- a/modules/desktop/hyprland/default.nix +++ b/modules/desktop/hyprland/default.nix @@ -145,19 +145,6 @@ in preserve_split = true; }; }; - - window_rule = [ - { - name = "float-file-explorer"; - match.class = "^(file-explorer)$"; - float = true; - } - { - name = "center-file-explorer"; - match.class = "^(file-explorer)$"; - center = true; - } - ]; }; }; 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" |
