Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox popups not honoring float in windowrule(v2) #8277

Closed
1 task done
opennomad opened this issue Oct 28, 2024 · 4 comments
Closed
1 task done

Firefox popups not honoring float in windowrule(v2) #8277

opennomad opened this issue Oct 28, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@opennomad
Copy link

Already reported ? *

  • I have searched the existing open and closed issues.

Regression?

No

System Info and Version

System/Version info
Hyprland, built from branch  at commit 4520b30d498daca8079365bdb909a8dea38e8d55  (version: bump to 0.44.1).
Date: Wed Oct 9 12:54:39 2024
Tag: v0.44.1, commits: 5309
built against aquamarine 0.4.3


flags: (if any)


System Information:
System name: Linux
Node name: siena
Release: 6.11.5-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Tue, 22 Oct 2024 18:31:38 +0000


GPU information: 
00:02.0 VGA compatible controller [0300]: Intel Corporation Iris Plus Graphics G7 [8086:8a52] (rev 07) (prog-if 00 [VGA controller])


os-release: NAME="EndeavourOS"
PRETTY_NAME="EndeavourOS"
ID="endeavouros"
ID_LIKE="arch"
BUILD_ID="2023.03.26"
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://endeavouros.com"
DOCUMENTATION_URL="https://discovery.endeavouros.com"
SUPPORT_URL="https://forum.endeavouros.com"
BUG_REPORT_URL="https://forum.endeavouros.com/c/general-system/endeavouros-installation"
PRIVACY_POLICY_URL="https://endeavouros.com/privacy-policy-2"
LOGO="endeavouros"


plugins:

======Config-Start======


Config File: /home/matthias/.config/hypr/hyprland.conf: Read Succeeded
#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#

# Set programs that you use
$terminal = kitty
$browser = firefox
$fileManager = nautilus
# $menu = wofi --show drun --width 20% --height 50% --allow-images -i
$menu = walker

# See https://wiki.hyprland.org/Configuring/Monitors/
# monitor=,preferred,auto,auto
monitor=eDP-1,preferred,auto,2,transform,0

# See https://wiki.hyprland.org/Configuring/Keywords/ for more

# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox
exec-once = waybar
exec-once = dunst
exec-once = nm-applet --indicator
exec-once = slimbookbattery --minimize
exec-once = blueman-applet 
exec-once = hyprctl setcursor elementary 36
exec-once = udiskie --appindicator
exec-once = waypaper --restore
exec-once = iio-hyprland 
exec-once = hypridle 
exec-once = hyprpm reload -n
exec-once = appimagelauncherd
exec-once = wl-paste --type text --watch cliphist store  #Stores only text data
exec-once = wl-paste --type image --watch cliphist store #Stores only image data
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = dropbox
exec-once = wvkbd-mobintl --hidden -R 5 --fn 'Hack 18'
exec-once = walker --gapplication-service

workspace = special:hud, bordersize:4, gapsin:40, gapsout:75
workspace = special:magic, bordersize:4, gapsin:40, gapsout:75

# espanso starts a window which causes issues so we move it to a special workspace
# which we then toggle away .. twice. Also see the windowrules for espanso
exec-once = [workspace special:espanso silent] ~/bin/espanso.sh
exec-once = [workspace 1 silent] $terminal
exec-once = [workspace 2 silent] $browser
exec-once = [workspace special:hud silent] bitwarden-desktop
exec-once = [workspace special:hud silent] /home/matthias/Applications/Todoist-linux*.AppImage


# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf

env = XCURSOR_SIZE,24
env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that
env = GTK_THEME,Dracula
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland

# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
  kb_layout = us
  # kb_variant =
  # kb_model =
  kb_options = caps:swapescape,compose:rctrl
  # kb_rules =

  follow_mouse = 1

  touchpad {
    natural_scroll       = yes
    disable_while_typing = 1
  }

  touchdevice {
    output = eDP-1
  }

  sensitivity = 0 # -1.0 to 1.0, 0 means no modification.
}

general {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    gaps_in = 8
    gaps_out = 20
    border_size = 1
    # col.active_border = rgba(8bbf56cc) rgba(ff8e5799) 70deg
    col.active_border = rgba(8bbf56cc) # rgba(ff8e5799) 70deg
    # col.inactive_border = rgba(595959aa)
    # col.inactive_border = rgba(704dbc55)
    col.inactive_border = rgba(8b56bf99)

    layout = dwindle

    # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
    allow_tearing = false
}

decoration {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    rounding = 20
    
    blur {
        enabled = false
        size = 18
        passes = 1
        new_optimizations = on
    }

    drop_shadow = yes
    shadow_range = 25
    shadow_render_power = 3
    col.shadow = rgba(1a1a1aee)

    blurls = lockscreen
}

animations {
    enabled = yes

    # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

    bezier = myBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 7, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = borderangle, 1, 8, default
    animation = fade, 1, 7, default
    # animation = workspaces, 1, 6, default
    animation = workspaces,1,10,default,slide
    animation = specialWorkspace,1,5, default, fade
}

dwindle {
    # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
    pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = yes # you probably want this
    force_split = 1
}

master {
    # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
    # new_is_master = true
    new_status = master
}

gestures {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    workspace_swipe = true
    workspace_swipe_cancel_ratio = 0.15
    workspace_swipe_touch = on
    workspace_swipe_invert = false
}

misc {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
}

# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
# device {
#   name = epic-mouse-v1
#   sensitivity = -0.5
# }
device {
  name = elan2514:00-04f3:29f5
  output = eDP-1
}

# plugin:touch_gestures {
#   # The default sensitivity is probably too low on tablet screens,
#   # I recommend turning it up to 4.0
#   sensitivity = 4.0
#
#   # must be >= 3
#   workspace_swipe_fingers = 3
#
#   # switching workspaces by swiping from an edge, this is separate from workspace_swipe_fingers
#   # and can be used at the same time
#   # possible values: l, r, u, or d
#   # to disable it set it to anything else
#   workspace_swipe_edge = d
#
#   # in milliseconds
#   long_press_delay = 400
#
#   # in pixels, the distance from the edge that is considered an edge
#   edge_margin = 100
#
#   experimental {
#     # send proper cancel events to windows instead of hacky touch_up events,
#     # NOT recommended as it crashed a few times, once it's stabilized I'll make it the default
#     send_cancel = 0
#   }
#
#   hyprgrass-bind = , swipe:3:u, exec, pkill -34 wvkbd-mobintl
#   hyprgrass-bind = , tap:3, exec, st
# }

# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrulev2 = opacity 0.90, class:.* # You'll probably like this.
windowrulev2 = bordercolor rgb(bf568b),fullscreen:1
windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.

# espanso
windowrulev2 = workspace special:espanso,title:^(Espanso Sync Tool)$
windowrulev2 = float,title:^(Espanso Sync Tool)$
windowrulev2 = move 100 100,title:^(Espanso Sync Tool)$
windowrulev2 = size 10% 10%,title:^(Espanso Sync Tool)$

# firefox picture-in-picture
windowrulev2 = unset,class:^(firefox)$,title:^(Picture-in-Picture)$
windowrulev2 = keepaspectratio,class:^(firefox)$,title:^(Picture-in-Picture)$
windowrulev2 = noborder,class:^(firefox)$,title:^(Picture-in-Picture)$
windowrulev2 = float,class:(firefox),title:(Picture-in-Picture)
windowrulev2 = pin,class:(firefox),title:(Picture-in-Picture)
# firefox todoist
windowrulev2 = unset,class:(firefox),title:(https://app.todoist.com - Todoist — Mozilla Firefox)
windowrulev2 = float,class:(firefox),title:(https://app.todoist.com - Todoist — Mozilla Firefox)
# windowrulev2 = float,tag:popup
windowrulev2 = noborder on,class:(firefox),title:(https://app.todoist.com - Todoist — Mozilla Firefox)
windowrulev2 = size 25% 25%,title:(https://app.todoist.com - Todoist — Mozilla Firefox)

# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, $terminal
bind = $mainMod, W, exec, $browser
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, R, exec, $menu
bind = $mainMod, C, killactive, 
# bind = $mainMod, M, exit,
bind = $mainMod, F, togglefloating, 
bind = $mainMod, P, pseudo, # dwindle
# bind = $mainMod, J, togglesplit, # dwindle

# Move focus with mainMod + arrow keys
bind = $mainMod, h, movefocus, l
bind = $mainMod, l, movefocus, r
bind = $mainMod, k, movefocus, u
bind = $mainMod, j, movefocus, d

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10

# Move window with keyboard
bind = $mainMod SHIFT, h, movewindow, l
bind = $mainMod SHIFT, l, movewindow, r
bind = $mainMod SHIFT, k, movewindow, u
bind = $mainMod SHIFT, j, movewindow, d

# Resize window with keyboard
binde = $mainMod CTRL, h, resizeactive, -10   0
binde = $mainMod CTRL, l, resizeactive,  10   0
binde = $mainMod CTRL, k, resizeactive,   0  10
binde = $mainMod CTRL, j, resizeactive,   0 -10
binde = $mainMod CTRL SHIFT, h, resizeactive, -1  0
binde = $mainMod CTRL SHIFT, l, resizeactive,  1  0
binde = $mainMod CTRL SHIFT, k, resizeactive,  0  1
binde = $mainMod CTRL SHIFT, j, resizeactive,  0 -1

# fullscreen
bind = $mainMod, z, fullscreen, 1
# bind = $mainMod, z, exec, ~/bin/hypr-toggle-border
bind = SHIFT$mainMod, z, fullscreen, 0

# Example special workspace (hud)
bind = $mainMod, A, togglespecialworkspace, hud
bind = $mainMod SHIFT, A, movetoworkspace, special:hud

# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic

# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

# clipboard
# bind = $mainMod, i, exec, cliphist list | wofi --dmenu --allow-images | cliphist decode | wl-copy
bind = $mainMod, i, exec, walker --modules clipboard

# notificatiaons
bind = $mainMod, u, exec, dunstctl context
bind = $mainMod SHIFT, u, exec, dunstctl history-pop
bind = $mainMod CTRL, u, exec, dunstctl close-all

# brightness
bindl = , 232, exec, brightnessctl s 10-
bindl = , 233, exec, brightnessctl s +10

# volume
bindel = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-
bindel = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+
bindel = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
# XF86AudioMicMute toggles of and then on again, so using the key id below
# bind = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bind = , 256, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
# playback
bind = , XF86AudioPlay, exec, playerctl play-pause
bind = , XF86AudioNext, exec, playerctl next
bind = , XF86AudioPrev, exec, playerctl previous

# lock
bindl = CTRL ALT SHIFT , l , exec , wlogout
bindl = CTRL ALT       , l , exec , loginctl lock-session

# screenshot
bind = $mainMod, Print, exec, grimshot --notify save screen ~/Pictures/Screenshots/Screenshot_$(date +"%Y-%m-%d_%H-%M-%S").png
bind = $mainMod SHIFT, Print, exec, grimshot --notify save area ~/Pictures/Screenshots/Screenshot_$(date +"%Y-%m-%d_%H-%M-%S").png
bind = $mainMod CTRL, Print, exec, grimshot --notify copy area ~/Pictures/Screenshots/Screenshot_$(date +"%Y-%m-%d_%H-%M-%S").png
bind = $mainMod CTRL SHIFT, Print, exec, grimshot --notify save area - | satty --filename - --fullscreen --output-filename ~/Pictures/Screenshots/Screenshot-$(date "%Y-%m-%d_%H-%M-%S").png

# toggle waybar
bind = ALT, space, exec, pkill waybar -SIGUSR1

# toggle opacity
bind = $mainMod, t, exec, hyprctl setprop $(hyprctl activewindow -j | jq -r '"address:" + .address') opaque toggle

# for hyprshare scheduling
exec-once = dbus-update-activation-environment --systemd HYPRLAND_INSTANCE_SIGNATURE
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP

======Config-End========

Description

I'm tryingto float the popups some firefox extensions create. In this case i'm trying to make the Todoist window float using:

windowrulev2 = float,class:(firefox),title:(https://app.todoist.com - Todoist — Mozilla Firefox)
windowrulev2 = noborder on,class:(firefox),title:(https://app.todoist.com - Todoist — Mozilla Firefox)
windowrulev2 = size 25% 25%,title:(https://app.todoist.com - Todoist — Mozilla Firefox)

The window rules appear to match based on the output of rollinglog.

I also tried using a tag which seems to match in the rollinglog as well, but also doesn't float the window.

How to reproduce

open a todoist popup in firefox.

Crash reports, logs, images, videos

Using float

[LOG] Searching for matching rules for firefox (title: https://app.todoist.com - Todoist — Mozilla Firefox)
[LOG] Window rule size 25% 25% -> title:(https://app.todoist.com - Todoist — Mozilla Firefox) matched [Window 5aa64da4e570: title: "https://app.todoist.com - Todoist — Mozilla Firefox"]
[LOG] Window rule opacity 0.90 ->  class:.* matched [Window 5aa64da4e570: title: "https://app.todoist.com - Todoist — Mozilla Firefox"]
[LOG] Window rule suppressevent maximize ->  class:.* matched [Window 5aa64da4e570: title: "https://app.todoist.com - Todoist — Mozilla Firefox"]
[LOG] Window rule float -> class:(firefox),title:(https://app.todoist.com - Todoist — Mozilla Firefox) matched [Window 5aa64da4e570: title: "https://app.todoist.com - Todoist — Mozilla Firefox"]
[LOG] Window rule noborder on -> class:(firefox),title:(https://app.todoist.com - Todoist — Mozilla Firefox) matched [Window 5aa64da4e570: title: "https://app.todoist.com - Todoist — Mozilla Firefox"]

Using tag

[LOG] Searching for matching rules for firefox (title: https://app.todoist.com - Todoist — Mozilla Firefox)
[LOG] Window rule size 25% 25% -> title:(https://app.todoist.com - Todoist — Mozilla Firefox) matched [Window 5aa64da4e570: title: "https://app.todoist.com - Todoist — Mozilla Firefox"]
[LOG] Window rule opacity 0.90 ->  class:.* matched [Window 5aa64da4e570: title: "https://app.todoist.com - Todoist — Mozilla Firefox"]
[LOG] Window rule suppressevent maximize ->  class:.* matched [Window 5aa64da4e570: title: "https://app.todoist.com - Todoist — Mozilla Firefox"]
[LOG] Window rule tag +popup -> class:(firefox),title:(https://app.todoist.com - Todoist — Mozilla Firefox) matched [Window 5aa64da4e570: title: "https://app.todoist.com - Todoist — Mozilla Firefox"]
[LOG] Window rule float -> tag:popup matched [Window 5aa64da4e570: title: "https://app.todoist.com - Todoist — Mozilla Firefox"]
[LOG] Window rule noborder on -> class:(firefox),title:(https://app.todoist.com - Todoist — Mozilla Firefox) matched [Window 5aa64da4e570: title: "https://app.todoist.com - Todoist — Mozilla Firefox"]
@opennomad opennomad added the bug Something isn't working label Oct 28, 2024
@vaxerski
Copy link
Member

as usual, float is a static rule and thus targets the initialTitle and initialClass properties respectively

@vaxerski vaxerski closed this as not planned Won't fix, can't repro, duplicate, stale Oct 28, 2024
@opennomad
Copy link
Author

@vaxerski , appreciate the comment. Does that mean that all that static rules only match on the initials? Should this be added to the docs (happy to contribute)? I'm looking at the info box here: https://wiki.hyprland.org/Configuring/Window-Rules/#window-rules-v2 and the example shows windowrulev2 = float,class:(kitty),title:(kitty) and figured it was legitatimate.

At any rate, it seems misleading to report the match and then not make it so.

Cheers.

@vaxerski
Copy link
Member

it is legitimate, will match initial class and title as kitty

At any rate, it seems misleading to report the match and then not make it so.

that's just logging, it matches the rule but whether the rule will be used later is a different story

Does that mean that all that static rules only match on the initials

yes

Should this be added to the docs

I thought it was?

image

If you find this unclear, wiki MRs welcome

@tannerellen
Copy link

@opennomad This wasn't clear to me when I set up Hyprland. I changed my rules to initial class because that's the only way some of them would work but didn't realize this was a thing. I think you should totally submit a merge request with some clarification around this in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants