remove hyprland extraConfig option and move all to nixified settings option

This commit is contained in:
Gabriella Bere 2024-09-01 11:27:38 +01:00
parent 11cb74ce0d
commit 667d5fd2eb
5 changed files with 55 additions and 53 deletions

View file

@ -5,61 +5,60 @@
enable = true;
package = pkgs.hyprland;
xwayland.enable = true;
# Autostart using systemd
systemd.enable = true;
extraConfig = ''
exec-once = waybar
exec-once = swaync
settings = {
# Monitor settings
monitor = eDP-2, 2560x1600@165, 0x0, auto # main laptop monitor
monitor = DP-3, 1920x1080@119.98, -1280x-1080, auto # left external monitor
monitor = DP-2, 1920x1080@119.98, 640x-1080, auto # right external monitor
'';
};
# Hyprland configuration
wayland.windowManager.hyprland.settings = {
"$mod" = "SUPER";
input = { kb_layout = "gb"; };
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
bind =
[
# Keybinds for starting programs
"$mod, F, exec, firefox"
"$mod, 1, exec, alacritty"
"$mod, D, exec, vesktop"
"$mod, space, exec, anyrun"
monitor =
[
"eDP-2, 2560x1600@165, 0x0, auto" # main laptop monitor
"DP-3, 1920x1080@119.98, -1280x-1080, auto" # left external monitor
"DP-2, 1920x1080@119.98, 640x-1080, auto" # right external monitor
];
# Screenshot tool
", Print, exec, grimblast copy area"
"$mod" = "SUPER";
input = { kb_layout = "gb"; };
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
bind =
[
# Keybinds for starting programs
"$mod, F, exec, firefox"
"$mod, 1, exec, alacritty"
"$mod, D, exec, vesktop"
"$mod, space, exec, anyrun"
# Screen locking tool
"$mod, l, exec, hyprlock"
# Screenshot tool
", Print, exec, grimblast copy area"
# Window management
"$mod, x, killactive"
"$mod, tab, togglefloating"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
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)
);
xwayland = {
force_zero_scaling = true;
# Screen locking tool
"$mod, l, exec, hyprlock"
# Window management
"$mod, x, killactive"
"$mod, tab, togglefloating"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
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)
);
xwayland = {
force_zero_scaling = true;
};
};
};
}