cleaned up hyprland.settings in hyprland.nix, made cursor scaling consistently 24

This commit is contained in:
Gabriella Bere 2024-09-01 11:31:03 +01:00
parent 667d5fd2eb
commit 90e5c5528b
2 changed files with 12 additions and 18 deletions

View file

@ -56,7 +56,7 @@
DEFAULT_BROWSER = "${lib.getExe pkgs.firefox}"; DEFAULT_BROWSER = "${lib.getExe pkgs.firefox}";
# Allow XWayland apps to not be weird after turning off xwayland scaling in hyprland.conf # Allow XWayland apps to not be weird after turning off xwayland scaling in hyprland.conf
GDK_SCALE = 1; GDK_SCALE = 1;
XCURSOR_SIZE = 32; XCURSOR_SIZE = 24;
}; };

View file

@ -9,7 +9,7 @@
# Autostart using systemd # Autostart using systemd
systemd.enable = true; systemd.enable = true;
settings = { settings = {
# Monitor config for home desk layout
monitor = monitor =
[ [
"eDP-2, 2560x1600@165, 0x0, auto" # main laptop monitor "eDP-2, 2560x1600@165, 0x0, auto" # main laptop monitor
@ -17,12 +17,19 @@
"DP-2, 1920x1080@119.98, 640x-1080, auto" # right external monitor "DP-2, 1920x1080@119.98, 640x-1080, auto" # right external monitor
]; ];
# Define SUPER key as mod key
"$mod" = "SUPER"; "$mod" = "SUPER";
# Set keyboard layout
input = { kb_layout = "gb"; }; input = { kb_layout = "gb"; };
# Allow using SUPER+LEFT to move windows and SUPER+RIGHT to resize windows
bindm = [ bindm = [
"$mod, mouse:272, movewindow" "$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow" "$mod, mouse:273, resizewindow"
]; ];
# Declare all keybinds
bind = bind =
[ [
# Keybinds for starting programs # Keybinds for starting programs
@ -40,22 +47,9 @@
# Window management # Window management
"$mod, x, killactive" "$mod, x, killactive"
"$mod, tab, togglefloating" "$mod, tab, togglefloating"
] ];
++ (
# workspaces # Prevent xwayland apps from looking pixellated, cursor scaling to compensate for this is defined in home.nix
# 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 = { xwayland = {
force_zero_scaling = true; force_zero_scaling = true;
}; };