How To Float Firefox Popups

TL;DR add for_window [instance="Places"] floating enable into your i3 config.

I’ve been learning and settling into using i3-gaps, but there’s been one thing that’s been bothering me since the start.
I couldn’t find a way of making the pop-up windows from Firefox default to being floating.
Some examples are the Bookmarks and History windows.

The workaround I found was to add for_window [instance="Places"] floating enable into the i3 config.

I tried many combinations beforehand with class="Firefox", title=Places, or id=Library
Only when I was writing a query to the forum that I stumbled upon the solution.
I hope this helps anyone who’s been trying to find solution to this.

xprop is the tool to get the “class” from windows to be used in the config for i3:
2022-10-03_17-03

package name: xorg-xprop

2 Likes

I forgot to mention that tool, definitely extremely useful for configuring i3.

I should also clarify the goal was to keep main Firefox window tiled and to have any popup default to floating.

What about locale? If it is randomly changed, that name is different.
I am no i3 user, but BSPWM.
In BSPWM we can use scripting to filter, or check other things.
My find was a reverse matching on WM_WINDOW_ROLE xprop property, which is not translated and its value for he main window is browser, unlike the children windows. In BSPWM, the class attribute being exposed, is always the 2nd value of the WM_CLASS xprop attribute.
I use this in my external rules

case $class in
  firefox)
    if [ $(xprop -id $winID WM_WINDOW_ROLE | cut -d= -f2 | tr -d [[:punct:]]) = "browser" ] ; then
      printf 'state=tiled\n'
    else
      printf 'state=floating\n'
    fi
    ;;

You might find an equivalent method for i3.

1 Like

I tried on German locale where it was using the same Places class.
Is it the case for Greece?
Could be in case of Cyrillic to and Asian language would need a test…

But your script is very cool to may use it for shipping as default…

1 Like

Boolmarks attributes:

WM_CLASS(STRING) = "Places", "firefox"
WM_ICON_NAME(COMPOUND_TEXT) = "Βιβλιοθήκη"
_NET_WM_ICON_NAME(UTF8_STRING) = "Βιβλιοθήκη"
WM_NAME(COMPOUND_TEXT) = "Βιβλιοθήκη"
_NET_WM_NAME(UTF8_STRING) = "Βιβλιοθήκη"

:person_shrugging:
Now that I see it, I could make the script look for “Places”, in the same way as it is now… :rofl:

I3 uses the first value from WM_CASS :rainbow:

1 Like

Bookmarks ROLE

WM_WINDOW_ROLE(STRING) = "Organizer"

It seems this is what BSPWM should do as well. I think even if I request the dev to change it, it would brake all older external_rules scripts. It’s nearly impossible, I quess… :cry:

Innovation does this some times… I remember from rofi. they had oldstyle config supported for very long time.

It was a Schock when they stop supporting that … same happens for arch some times… remember when switching to systemd?

1 Like

Packaging in Arch (PKGBUILD) is an art IMHO. :smile:
How to not break existing setups, and backward compatibility in programs. :broken_heart: