From 43f35b76cefa765375e9bc9a1d72abe9fbead190 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 20 Dec 2024 10:37:49 -0600 Subject: [PATCH] Fix window rules to work as intended, open initial apps on initial workspace --- modules/home-manager/hyprland.nix | 11 ++++++----- nixos/dragon.nix | 15 +++++++++++++-- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 78cfbe5..cc1e088 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -49,9 +49,9 @@ in { "hyprpaper" "mako" "swayosd-server" - "eww daemon && eww open bar0" - "firefox" - "wezterm" + "eww daemon" + "[workspace 1 silent] firefox" + "[workspace 1 silent] wezterm" "xwaylandvideobridge" "systemctl --user import-environment QT_QPA_PLATFORMTHEME" # "wezterm" @@ -285,8 +285,9 @@ in { ## See https://wiki.hyprland.org/Configuring/Window-Rules/ for more windowrulev2 = idleinhibit,class:^.*([Ss]lippi).*$ - windowrulev2 = float,class:^.*([Kk]itty|[Ff]irefox|[Ww]ezterm|[Dd]iscord|[Ss]potify|[Ss]lack).*$ - windowrulev2 = opacity 1.0 0.9,floating:1 + windowrulev2 = float,class:^.*$ + windowrulev2 = tile,class:^.*([Kk]itty|[Ff]irefox|[Ww]ezterm|[Dd]iscord|[Ss]potify|[Ss]lack).*$ + windowrulev2 = opacity 1.0 0.95,class:^.*$ windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$ windowrulev2 = noanim,class:^(xwaylandvideobridge)$ diff --git a/nixos/dragon.nix b/nixos/dragon.nix index ebf47d4..c69329f 100644 --- a/nixos/dragon.nix +++ b/nixos/dragon.nix @@ -103,8 +103,8 @@ # TODO: monitor config module? wayland.windowManager.hyprland = { settings = { - env = [ - "EWW_BAR_MON,0" + exec-once = [ + "eww open bar1" ]; # See https://wiki.hyprland.org/Configuring/Keywords/ for more monitor = [ @@ -122,6 +122,17 @@ force_no_accel = true; sensitivity = 1; # -1.0 - 1.0, 0 means no modification. }; + workspace = [ + "1, monitor:DP-3, default:true" + "2, monitor:DP-3, default:false" + "3, monitor:DP-3, default:false" + "4, monitor:DP-3, default:false" + "5, monitor:DP-3, default:false" + "6, monitor:DP-3, default:false" + "7, monitor:DP-3, default:false" + "8, monitor:DP-1, default:true" + "9, monitor:DP-1, default:false" + ]; }; };