From 90e5c5528b5d20e28d8ef63dd7e94d28e03031de Mon Sep 17 00:00:00 2001 From: Gabriella Bere Date: Sun, 1 Sep 2024 11:31:03 +0100 Subject: [PATCH] cleaned up hyprland.settings in hyprland.nix, made cursor scaling consistently 24 --- home-manager/home.nix | 2 +- home-manager/hyprland.nix | 28 +++++++++++----------------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/home-manager/home.nix b/home-manager/home.nix index 1ebf1ad..45d6481 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -56,7 +56,7 @@ DEFAULT_BROWSER = "${lib.getExe pkgs.firefox}"; # Allow XWayland apps to not be weird after turning off xwayland scaling in hyprland.conf GDK_SCALE = 1; - XCURSOR_SIZE = 32; + XCURSOR_SIZE = 24; }; diff --git a/home-manager/hyprland.nix b/home-manager/hyprland.nix index 85e533e..2e3d8d2 100644 --- a/home-manager/hyprland.nix +++ b/home-manager/hyprland.nix @@ -9,7 +9,7 @@ # Autostart using systemd systemd.enable = true; settings = { - + # Monitor config for home desk layout 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 ]; + # Define SUPER key as mod key "$mod" = "SUPER"; + + # Set keyboard layout input = { kb_layout = "gb"; }; + + # Allow using SUPER+LEFT to move windows and SUPER+RIGHT to resize windows bindm = [ "$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow" ]; + + # Declare all keybinds bind = [ # Keybinds for starting programs @@ -40,22 +47,9 @@ # 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) - ); + ]; + + # Prevent xwayland apps from looking pixellated, cursor scaling to compensate for this is defined in home.nix xwayland = { force_zero_scaling = true; };