From 28e60e430c7ac5791718b62073eddcde552187f6 Mon Sep 17 00:00:00 2001 From: Miran Bastaja Date: Thu, 16 May 2024 17:03:35 +0200 Subject: hyprland: float picture-in-picture firefox windows --- share/cfg/hyprland.nix | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'share/cfg') diff --git a/share/cfg/hyprland.nix b/share/cfg/hyprland.nix index 5189b38..b9353ef 100644 --- a/share/cfg/hyprland.nix +++ b/share/cfg/hyprland.nix @@ -36,12 +36,22 @@ in # workspaces # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} - ${builtins.concatStringsSep "\n" (builtins.genList (x: - let ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10)); - in '' - bind = $mod, ${ws}, workspace, ${toString (x + 1)} - bind = $mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)} - '') 10)} + ${builtins.concatStringsSep "\n" ( + builtins.genList ( + x: + let + ws = + let + c = (x + 1) / 10; + in + builtins.toString (x + 1 - (c * 10)); + in + '' + bind = $mod, ${ws}, workspace, ${toString (x + 1)} + bind = $mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)} + '' + ) 10 + )} bind = $mod SHIFT, C, killactive bind = $mod SHIFT, F, togglefloating @@ -89,6 +99,10 @@ in windowrulev2 = workspace 4,class:(Signal) windowrulev2 = workspace 5,class:(Bitwarden) + # Floating picture-in-picture windows + windowrulev2 = float, title:^(Picture-in-Picture)$,class:^(firefox)$ + windowrulev2 = size 15% 15%, title:^(Picture-in-Picture)$,class:^(firefox)$ + # workaround for https://github.com/hyprwm/Hyprland/issues/2661 windowrulev2 = stayfocused, title:^()$,class:^(steam)$ windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$ -- cgit v1.3.1