refactor(homesModules/hyprland): move keybinds into separate file
This commit is contained in:
parent
b99c94c4d0
commit
aa00ad1113
2 changed files with 44 additions and 48 deletions
|
@ -8,54 +8,25 @@ let
|
||||||
mainMonitor = osConfig.desktop.mainMonitor;
|
mainMonitor = osConfig.desktop.mainMonitor;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
config = lib.mkIf (config.desktop.windowManager == "hyprland") {
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
config = lib.mkIf (config.desktop.windowManager == "hyprland") (
|
|
||||||
lib.mkMerge [
|
|
||||||
{
|
|
||||||
xdg.configFile."uwsm/env".text = # sh
|
|
||||||
''
|
|
||||||
|
|
||||||
'';
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = false;
|
systemd.enable = false;
|
||||||
settings = {
|
settings = lib.mkMerge [
|
||||||
|
{
|
||||||
ecosystem.no_update_news = true;
|
ecosystem.no_update_news = true;
|
||||||
"$hypr" = "CTRL_SUPER_ALT_SHIFT";
|
|
||||||
|
|
||||||
monitor = [
|
monitor = [
|
||||||
"${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}"
|
"${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}"
|
||||||
", preferred, auto, 1"
|
", preferred, auto, 1"
|
||||||
];
|
];
|
||||||
|
}
|
||||||
bind = [
|
(import ./keybinds.nix)
|
||||||
"$hypr, Q, exec, uwsm stop"
|
|
||||||
"SUPER, W, killactive"
|
|
||||||
|
|
||||||
"SUPER, return, exec, uwsm app -- $TERMINAL"
|
|
||||||
"SUPER, O, exec, uwsm app -- $BROWSER"
|
|
||||||
|
|
||||||
"SUPER, H, cyclenext, visible"
|
|
||||||
"SUPER, L, cyclenext, visible prev"
|
|
||||||
"SUPER_ALT, H, movewindow, l"
|
|
||||||
"SUPER_ALT, J, movewindow, d"
|
|
||||||
"SUPER_ALT, K, movewindow, u"
|
|
||||||
"SUPER_ALT, L, movewindow, r"
|
|
||||||
"ALT_SHIFT, H, resizeactive, -10% 0"
|
|
||||||
"ALT_SHIFT, J, resizeactive, 0 -10%"
|
|
||||||
"ALT_SHIFT, K, resizeactive, 0 10%"
|
|
||||||
"ALT_SHIFT, L, resizeactive, 10% 0"
|
|
||||||
"SUPER_CTRL, H, workspace, r-1"
|
|
||||||
"SUPER_CTRL, L, workspace, r+1"
|
|
||||||
"$hypr, H, movetoworkspace, r-1"
|
|
||||||
"$hypr, L, movetoworkspace, r+1"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
xdg.configFile."uwsm/env".text = # sh
|
||||||
|
''
|
||||||
|
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
25
modules/home/desktop/windowManager/hyprland/keybinds.nix
Normal file
25
modules/home/desktop/windowManager/hyprland/keybinds.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"$hypr" = "CTRL_SUPER_ALT_SHIFT";
|
||||||
|
bind = [
|
||||||
|
"$hypr, Q, exec, uwsm stop"
|
||||||
|
"SUPER, W, killactive"
|
||||||
|
|
||||||
|
"SUPER, return, exec, uwsm app -- $TERMINAL"
|
||||||
|
"SUPER, O, exec, uwsm app -- $BROWSER"
|
||||||
|
|
||||||
|
"SUPER, H, cyclenext, visible"
|
||||||
|
"SUPER, L, cyclenext, visible prev"
|
||||||
|
"SUPER_ALT, H, movewindow, l"
|
||||||
|
"SUPER_ALT, J, movewindow, d"
|
||||||
|
"SUPER_ALT, K, movewindow, u"
|
||||||
|
"SUPER_ALT, L, movewindow, r"
|
||||||
|
"ALT_SHIFT, H, resizeactive, -10% 0"
|
||||||
|
"ALT_SHIFT, J, resizeactive, 0 -10%"
|
||||||
|
"ALT_SHIFT, K, resizeactive, 0 10%"
|
||||||
|
"ALT_SHIFT, L, resizeactive, 10% 0"
|
||||||
|
"SUPER_CTRL, H, workspace, r-1"
|
||||||
|
"SUPER_CTRL, L, workspace, r+1"
|
||||||
|
"$hypr, H, movetoworkspace, r-1"
|
||||||
|
"$hypr, L, movetoworkspace, r+1"
|
||||||
|
];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue