From: Andre Ramnitz Date: Tue, 22 Jul 2025 00:46:06 +0000 (+0200) Subject: hypr: refine window rules for browser PiPs X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=a93b2fc323b083f2299f42b640dd64f14864fadf;p=dotfiles.git hypr: refine window rules for browser PiPs --- diff --git a/dot-config/hypr/fragments/animations.conf b/dot-config/hypr/fragments/animations.conf index 92641d71..406494ba 100644 --- a/dot-config/hypr/fragments/animations.conf +++ b/dot-config/hypr/fragments/animations.conf @@ -33,7 +33,7 @@ animations { animation = fade, 1, 1, easeInQuint animation = border, 1, 1, easeInQuint - animation = borderangle, 1, 120, border, loop + animation = borderangle, 1, 60, border, loop animation = workspaces, 1, 3, easeInOut, slidefade 50 } diff --git a/dot-config/hypr/fragments/windowrules.conf b/dot-config/hypr/fragments/windowrules.conf index fe3ac1c6..f525c257 100644 --- a/dot-config/hypr/fragments/windowrules.conf +++ b/dot-config/hypr/fragments/windowrules.conf @@ -11,22 +11,24 @@ windowrule = plugin:hyprbars:nobar, ^floating:0 # don't UW any window catchall -windowrule = maxsize 1440 1200, class:^(.*)$ +windowrule = maxsize 1440 1200, ^floating:1 # handle plasma/kde/qt apps -windowrule = stayfocused, class:^(org.kde.kwalletd6)$ windowrule = float, class:^(org.kde.*)$ -windowrule = float, class:^(kdesystemsettings.*)$ -windowrule = minsize 1 1, stayfocused, float, class:^(com.nextcloud.desktopclient.nextcloud)$ -windowrule = stayfocused, class:^(com.nextcloud.desktopclient.nextcloud)$ -windowrule = float, class: ^(com.nextcloud.desktopclient.nextcloud)$ -windowrule = float, size 1560 1000, pin, workspace special:overlay, class:^(org.keepassxc.KeePassXC)$ windowrule = float, class:^(ark.*)$ windowrule = float, class:^(lxqt-.*)$ windowrule = float, class:^(vlc.*)$ windowrule = float, class:^(pcmanfm.*)$ windowrule = float, class:^(qalculate.*)$ +windowrule = minsize 1 1, stayfocused, float, class:^(com.nextcloud.desktopclient.nextcloud)$ +windowrule = stayfocused, class:^(com.nextcloud.desktopclient.nextcloud)$ +windowrule = float, class: ^(com.nextcloud.desktopclient.nextcloud)$ + +windowrule = float, class:^(kdesystemsettings.*)$ +windowrule = float, size 1560 1000, pin, workspace special:overlay, class:^(org.keepassxc.KeePassXC)$ +windowrule = stayfocused, class:^(org.kde.kwalletd6)$ + # indicate windows with special attention windowrulev2 = bordercolor 0xff$base08 0x8a$base08 45deg, initialTitle:^(upgrayyedd)$ @@ -53,35 +55,42 @@ windowrule = size 1024 600,title:^(cava.*)$ windowrule = move 100% 100%,title:^(cava.*)$ # handle browsers -# windowrule = float, class:^(firefox.*)$ -windowrule = maxsize 1680 1200, class:^(firefox.*)$ -windowrule = center, class:^(firefox.*)$ windowrule = tag +neverdim, class:^(firefox.*)$ -windowrule = maxsize 2543 1389 lock, class:^(org.qutebrowser.*)$ -windowrule = minsize 1920 1200 lock, class:^(org.qutebrowser.*)$ windowrule = tag +neverdim, class:^(org.qutebrowser.*)$ +# handle video PiPs +windowrule = float, class:^(firefox.*)$, title:^(Bild-im-Bild|Picture-in-picture)$ +windowrule = move onscreen 100%-w-10 4%+h, class:^(firefox.*)$, title:^(Bild-im-Bild|Picture-in-picture)$ +windowrule = size 800 450, class:^(firefox.*)$, title:^(Bild-im-Bild|Picture-in-picture)$ +windowrule = plugin:hyprbars:nobar, class:^(firefox.*)$, title:^(Bild-im-Bild|Picture-in-picture)$ +windowrule = noinitialfocus, class:^(firefox.*)$, title:^(Bild-im-Bild|Picture-in-picture)$ +windowrule = group deny, class:^(firefox.*)$, title:^(Bild-im-Bild|Picture-in-picture)$ + # handle terminal(s/-apps) -windowrule = opacity 1.0 override 0.8 override, group, class:^(foot)$ -windowrule = float, opacity 1.0 override 0.8 override, class:^(popup)$ +windowrule = float, class:^(popup)$ windowrule = pseudo, class:^(ncmpcpp)$ windowrule = workspace 4, class:^(ncmpcpp)$ windowrule = noinitialfocus, class:^(ncmpcpp)$ -# windowrule = maxsize 60% 80%, class:^(ncmpcpp)$ windowrule = float, stayfocused, center, opacity 1.0 override, class:^(kakpopup)$ # handle other clients windowrule = float, class:^(openrgb)$ + windowrule = float, class:^(org.corectrl.CoreCtrl)$ + +windowrule = float, class:^(lutris)$ + windowrule = float, class:^(pavucontrol.*)$ windowrule = maxsize 600 800, class:^(pavucontrol.*)$ -windowrule = float, class:^(lutris)$ + windowrule = pseudo, class:^(Threema.*)$ windowrule = noinitialfocus, class:^(Threema.*)$ windowrule = workspace 3, class:^(Threema.*)$ + windowrule = pseudo, class:^(discord.*)$ windowrule = noinitialfocus, class:^(discord.*)$ windowrule = workspace 3, class:^(discord.*)$ + windowrule = float, class:^(blueman-manager.*)$ windowrule = float, class:^(org.pulseaudio.pavucontrol.*)$ @@ -93,8 +102,8 @@ windowrule = noshadow on, class:^(ueberzugpp.*)$ windowrule = group deny, class:^(ueberzugpp.*)$ # handle portals -windowrule = float, class:^(org.freedesktop.impl.portal.desktop.kde)$ -windowrule = stayfocused, class:^(org.freedesktop.impl.portal.desktop.kde)$ +# windowrule = float, class:^(org.freedesktop.impl.portal.desktop.kde)$ +# windowrule = stayfocused, class:^(org.freedesktop.impl.portal.desktop.kde)$ # handle steam client windowrule = float, class:^(steam)$ diff --git a/dot-config/hypr/hyprland.conf b/dot-config/hypr/hyprland.conf index e6880ef3..4aec3da6 100644 --- a/dot-config/hypr/hyprland.conf +++ b/dot-config/hypr/hyprland.conf @@ -2,14 +2,14 @@ # ░█░█░█░█░█▀█░█▀▄░█░░░█▀█░█▀█░█▀▄░░░█▀▀░█▀█░█▀█░█▀▀░▀█▀░█▀▀ # ░█▀█░░█░░█▀▀░█▀▄░█░░░█▀█░█░█░█░█░░░█░░░█░█░█░█░█▀▀░░█░░█░█ # ░▀░▀░░▀░░▀░░░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀░░░░▀▀▀░▀▀▀░▀░▀░▀░░░▀▀▀░▀▀▀i +# compiled plugins reside in /var/cache/hyprpm/[username]/ -autogenerated = 0 # remove this line to remove the warning +debug:disable_logs = false # file logging. defaults to 1 for production +# flavours integration source=./base16-colors.conf -debug:disable_logs = false # file logging. defaults to 1 for production - -# See https://wiki.hyprland.org/Configuring/Monitors/ +# LG 34" monitorv2 { output = DP-1 mode = preferred @@ -23,6 +23,7 @@ monitorv2 { sdr_max_luminance = 245 } +# other displays monitor=,preferred,auto-center-right,1,vrr,2 # unscale XWayland @@ -30,19 +31,18 @@ xwayland { force_zero_scaling = true } -# See https://wiki.hyprland.org/Configuring/Keywords/ for more exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -# exec-shutdown = setenv WAYLAND_DISPLAY= XDG_SESSION_TYPE= XDG_CURRENT_DESKTOP= +exec-shutdown = setenv WAYLAND_DISPLAY= XDG_SESSION_TYPE= XDG_CURRENT_DESKTOP= # Execute your favorite apps at launch exec-once = ~/.config/hypr/scripts/startup.sh exec-once = hypridle exec-once = hyprpm reload exec-once = swww-daemon +exec-once = swww img /home/andy/Bilder/Wallpapers/3440x1440\ SW.png exec-once = hyprsunset exec-once = flatpak run ch.threema.threema-desktop -# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = us,de kb_variant = de_se_fi, @@ -70,7 +70,7 @@ experimental { } general { - # See https://wiki.hyprland.org/Configuring/Variables/ for more + allow_tearing = 0 border_size = 2 gaps_in = 5 gaps_out = 10 @@ -79,10 +79,6 @@ general { col.inactive_border = 0xea$base03 0xda$base02 45deg col.nogroup_border_active = 0xea$base0E 0x8a$base08 45deg col.nogroup_border = 0xea$base03 0xda$base02 45deg - - # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on - allow_tearing = true - snap { enabled = true window_gap = 10 @@ -99,27 +95,67 @@ dwindle { split_width_multiplier = 2.0 single_window_aspect_ratio = 16 9 single_window_aspect_ratio_tolerance = 0.1 + pseudotile = 1 # master switch for pseudotiling. Enabling is bound to mainMod + A in the keybinds section below + preserve_split = true # you probably want this } master { - # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more new_status = slave allow_small_split = true special_scale_factor = .80 mfact = .45 orientation = center - slave_count_for_center_master = 2 - center_master_fallback = left + slave_count_for_center_master = 2 + center_master_fallback = left inherit_fullscreen = false } +group { + merge_groups_on_drag = 0 + insert_after_current = 1 + col.border_active = 0xea$base0C 0xda$base0D 60deg + col.border_locked_active = 0xea$base0B 0xda$base0C 60deg + col.border_inactive = 0xea$base03 0xda$base02 60deg + col.border_locked_inactive = 0xea$base03 0xda$base02 60deg + groupbar { + enabled = 1 + font_family = ZedMono NFP + font_size = 13 + font_weight_active = normal + font_weight_inactive = normal + text_color = 0xff$base01 + text_color_locked_active = 0xff$base05 + text_color_inactive = 0xff$base01 + text_color_locked_inactive = 0xff$base01 + height = 20 + font_size = 16 + text_color = 0xFF$base00 + scrolling = false + col.active = 0xea$base0C 0x7a$base0C 45deg + col.inactive = 0xea$base03 0x6a$base03 45deg + col.locked_active = 0xea$base0B 0x6a$base0B 45deg + col.locked_inactive = 0xea$base03 0x6a$base03 45deg + indicator_gap = 1 + indicator_height = 8 + render_titles = false + priority = 3 + rounding = 4 + round_only_edges = true + gradients = false + gradient_rounding = 4 + gradient_round_only_edges = true + stacked = false + gaps_in = 2 + gaps_out = 2 + keep_upper_gap = true + } +} + decoration { - # See https://wiki.hyprland.org/Configuring/Variables/ for more rounding = 4 - dim_special = 0.3 - dim_inactive = true - dim_strength = 0.2 - # screen_shader = ~/.config/hypr/shaders/bluefilter.frag + dim_special = 0.3 + dim_inactive = true + dim_strength = 0.2 blur { enabled = true special = true @@ -146,17 +182,6 @@ decoration { } } -dwindle { - # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more - pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + A in the keybinds section below - preserve_split = true # you probably want this -} - -gestures { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - workspace_swipe = false -} - render { direct_scanout = 2 cm_fs_passthrough = 2 @@ -167,8 +192,7 @@ render { } misc { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - force_default_wallpaper = 0 # Set to 0 to disable the anime mascot wallpapers + force_default_wallpaper = 1 # Set to 0 to disable the anime mascot wallpapers key_press_enables_dpms = true vfr = true #enable for battery savings render_unfocused_fps = 60 @@ -177,53 +201,14 @@ misc { font_family = ZedMono NFP } -# Example per-device config -# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more device { name = razer-razer-basilisk-v3 sensitivity = -0.1 accel_profile = custom 0.3308622437 0.000 0.224 0.449 0.673 0.997 1.335 1.672 2.010 2.348 2.685 3.186 3.699 4.212 4.725 5.237 5.750 6.263 6.776 7.288 7.801 8.314 8.827 9.339 9.852 10.365 10.878 11.390 11.903 12.416 13.476 } -group { - merge_groups_on_drag = 0 - insert_after_current = 1 - col.border_active = 0xea$base0C 0xda$base0D 60deg - col.border_locked_active = 0xea$base0B 0xda$base0C 60deg - col.border_inactive = 0xea$base03 0xda$base02 60deg - col.border_locked_inactive = 0xea$base03 0xda$base02 60deg - groupbar { - enabled = 1 - font_family = ZedMono NFP - font_size = 13 - font_weight_active = normal - font_weight_inactive = normal - text_color = 0xff$base01 - text_color_locked_active = 0xff$base05 - text_color_inactive = 0xff$base01 - text_color_locked_inactive = 0xff$base01 - height = 20 - font_size = 16 - text_color = 0xFF$base00 - scrolling = false - col.active = 0xea$base0C 0x7a$base0C 45deg - col.inactive = 0xea$base03 0x6a$base03 45deg - col.locked_active = 0xea$base0B 0x6a$base0B 45deg - col.locked_inactive = 0xea$base03 0x6a$base03 45deg - indicator_gap = 1 - indicator_height = 8 - render_titles = false - priority = 3 - rounding = 4 - round_only_edges = true - gradients = false - gradient_rounding = 4 - gradient_round_only_edges = true - stacked = false - gaps_in = 2 - gaps_out = 2 - keep_upper_gap = true - } +gestures { + workspace_swipe = false } plugin { @@ -235,7 +220,7 @@ plugin { col.text = 0xff$base05 bar_part_of_window = 1 bar_precedence_over_border = 1 - # hyprbars-button = color, size, icon, on-click + #NOTE: hyprbars-button = color, size, icon, on-click hyprbars-button = 0xaa$base08, 20, 󰖭, hyprctl dispatch killactive hyprbars-button = 0xaa$base0A, 20, 󰁌, hyprctl dispatch fullscreen 1 hyprbars-button = 0xaa$base0B, 20, , hyprctl dispatch pin active @@ -243,10 +228,10 @@ plugin { overview { panelHeight = 200 panelColor = 0xcc$base03 - panelBorderWidth = 1 - panelBorderColor = 0xee$base03 - workspaceActiveBorder = 0xee$base0D - workspaceInactiveBorder = 0xee$base02 + panelBorderWidth = 2 + panelBorderColor = 0xee$base07 + workspaceActiveBorder = 0xee$base0A + workspaceInactiveBorder = 0xfa$base01 workspaceBorderSize = 2 } }