From affaec806e7cc981453d11dc9248ce7b503e36f8 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Fri, 22 Nov 2024 00:00:36 +0100 Subject: [PATCH] hyprland 45 new syntax (untested) --- home-modules/hyprland.nix | 77 +++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 44 deletions(-) diff --git a/home-modules/hyprland.nix b/home-modules/hyprland.nix index bb527f9..02f0cb8 100755 --- a/home-modules/hyprland.nix +++ b/home-modules/hyprland.nix @@ -92,54 +92,38 @@ in { "${main.name}, ${main.resolution}, ${main.position}, ${main.scale}" ])); - workspace = - let - d1 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name); - d2 = if host == "NxXPS" then monitors.xps.second.name else (if host == "NxNORTH" then monitors.north.left.name else monitors.ace.main.name); - d3 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name); - # d3 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.right.name else monitors.ace.main.name); - compact = "gapsin:0, gapsout:0, bordersize:1, rounding:false"; - in - [ - "11, monitor:${d1}, default:true" - "12, monitor:${d1}" - "13, monitor:${d1}" - "14, monitor:${d1}" - "15, monitor:${d1}" - "16, monitor:${d1}" - "17, monitor:${d1}" - "18, monitor:${d1}" - "19, monitor:${d1}" - "10, monitor:${d1}, ${compact}" - "100, monitor:${d1}, ${compact}" - "21, monitor:${d2}, default:true, ${compact}" - "22, monitor:${d2}" - "23, monitor:${d2}" - "24, monitor:${d2}" - "25, monitor:${d2}" - "26, monitor:${d2}" - "27, monitor:${d2}" - "28, monitor:${d2}" - "29, monitor:${d2}" - "20, monitor:${d2}" - "31, monitor:${d3}, default:${let x = if host == "NxNORTH" then "true" else "false"; in x}" - "32, monitor:${d3}" - "33, monitor:${d3}" - "34, monitor:${d3}" - "35, monitor:${d3}" - "36, monitor:${d3}" - "37, monitor:${d3}" - "38, monitor:${d3}" - "39, monitor:${d3}" - "30, monitor:${d3}, ${compact}" - ]; + workspace = let + d1 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name); + d2 = if host == "NxXPS" then monitors.xps.second.name else (if host == "NxNORTH" then monitors.north.left.name else monitors.ace.main.name); + d3 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name); + # d3 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.right.name else monitors.ace.main.name); + compact = "gapsin:0, gapsout:0, bordersize:1, rounding:false"; + in [ + "11, monitor:${d1}, default:true" + "r[12-19], monitor:${d1}" + "10, monitor:${d1}, ${compact}" + + "100, monitor:${d1}, ${compact}" + + "21, monitor:${d2}, default:true, ${compact}" + "r[22-29], monitor:${d2}" + "20, monitor:${d2}" + + "31, monitor:${d3}, default:${let x = if host == "NxNORTH" then "true" else "false"; in x}" + "r[32-39], monitor:${d3}" + "30, monitor:${d3}, ${compact}" + + ] ++ /* no gaps when only */ [ + "w[tv1], gapsout:0, gapsin:0" + "f[1], gapsout:0, gapsin:0" + ]; # "device:logitech-wireless-mouse-mx-master-1" = { # sensitivity = -0.2; # }; - env = if nvidia.enable == true then [ + env = lib.mkIf (nvidia.enable == true) [ "LIBVA_DRIVER_NAME,nvidia" "XDG_SESSION_TYPE,wayland" "GBM_BACKEND,nvidia-drm" @@ -147,7 +131,7 @@ in { "WLR_NO_HARDWARE_CURSORS,1" "HYPRCURSOR_THEME,${config.gtk.cursorTheme.name}" "HYPRCURSOR_SIZE,${toString config.gtk.cursorTheme.size}" - ] else []; + ]; input = { sensitivity = 0.1; @@ -258,7 +242,12 @@ in { windowrulev2 = [ "opacity ${transparency},class:^(com.chatterino.*)$" "opacity ${transparency},class:^(chatterino)$" - "bordercolor rgba(${rice.lib.nohash rice.color.magenta.bright}ff), pinned:1" + "bordercolor rgba(${rice.lib.nohash rice.color.magenta.bright}ff), pinned:1" + ] ++ /* no gaps when only */ [ + "bordersize 0, floating:0, onworkspace:w[tv1]" + "rounding 0, floating:0, onworkspace:w[tv1]" + "bordersize 0, floating:0, onworkspace:f[1]" + "rounding 0, floating:0, onworkspace:f[1]" ]; windowrule = [