Add some hyprland changes

This commit is contained in:
muon 2025-09-25 10:55:26 +00:00
parent 8989c41a89
commit a77b87553d
3 changed files with 45 additions and 28 deletions

View file

@ -1,4 +1,10 @@
{ pkgs, lib, config, ... }: {
{
pkgs,
lib,
config,
osConfig,
...
}: {
options.mods.hyprland.enable = lib.mkEnableOption {
description = "enables hyprland";
default = false;
@ -22,32 +28,44 @@
};
"$mod" = "SUPER";
bind = [
"$mod, Return, exec, alacritty"
"$mod, D, exec, fuzzel"
"$mod, F, exec, qutebrowser"
bind =
[
"$mod, Return, exec, alacritty"
"$mod, D, exec, fuzzel"
"$mod, B, exec, qutebrowser"
"$mod SHIFT, Q, killactive,"
"$mod SHIFT, X, exit,"
"$mod SHIFT, Q, killactive,"
"$mod SHIFT, X, exit,"
"$mod, H, movefocus, l"
"$mod, J, movefocus, d"
"$mod, K, movefocus, u"
"$mod, L, movefocus, r"
]
++ (builtins.concatLists (builtins.genList (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
"$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
"$mod, H, movefocus, l"
"$mod, J, movefocus, d"
"$mod, K, movefocus, u"
"$mod, L, movefocus, r"
"$mod SHIFT, H, movewindow, l"
"$mod SHIFT, J, movewindow, d"
"$mod SHIFT, K, movewindow, u"
"$mod SHIFT, L, movewindow, r"
]
) 10) );
++ (builtins.concatLists (builtins.genList (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
"$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
]
)
10));
monitor =
lib.mapAttrsToList
(_: v: "${v.name},${v.config.mode}@${v.config.rate},${v.config.position},1")
osConfig.mods.monitors;
};
};
};