baskerville / bspwm

A tiling window manager based on binary space partitioning
BSD 2-Clause "Simplified" License
7.72k stars 416 forks source link

Can't apply a rule on WM_CLASS with 2 arguments #504

Closed T0MuX closed 8 years ago

T0MuX commented 8 years ago

Hi everybody !

I would like to set my Firefox Library (the famous download window) floating.

I did xprop to gather the window class : WM_CLASS(STRING) = "Places", "Firefox"

I added this to bspwmrc : bspc rule -a "Places", "Firefox" state=floating It doesn't work. I tried this : bspc rule -a '"Places", "Firefox"' state=floating same thing. I tried with only "Places" ... nothing.

I think i'm using it wrong. Can somebody help me ?

shellkr commented 8 years ago

Try this..

bspc rule -a Firefox:Places state=floating
baskerville commented 8 years ago

The syntax of the rule domain is revealed in a mysterious document called the manual.

T0MuX commented 7 years ago

Oh Thank you ! It works this way : bspc rule -a "Pale Moon":Places state=floating (yes since the last time I changed my default browser)

About the manual, i'm sorry I didn't found it, can you give me a link or show me the way to find it ?

neeasade commented 7 years ago

can you give me a link

https://github.com/baskerville/bspwm/blob/master/doc/bspwm.1.asciidoc#rule

T0MuX commented 7 years ago

Thank you a lot for the link :)

I checked the rules syntax, but I still have the same issue with QEMU. Impossible to set the right rule :(

xprop returns this :

_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 31457288
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x1e00007
WM_CLIENT_LEADER(WINDOW): window id # 0x1e00001
_NET_WM_PID(CARDINAL) = 12834
WM_LOCALE_NAME(STRING) = "C"
WM_CLIENT_MACHINE(STRING) = "tomux-port"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified minimum size: 720 by 421
                window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "qemu-system-i386", "Qemu-system-i386"
WM_ICON_NAME(STRING) = "QEMU"
_NET_WM_ICON_NAME(UTF8_STRING) = "QEMU"
WM_NAME(STRING) = "QEMU"
_NET_WM_NAME(UTF8_STRING) = "QEMU"

And I tested with the following rules : (none of them works)

bspc rule -a "qemu-system-i386":"Qemu-system-i386" state=floating
bspc rule -a "qemu-system-i386" state=floating
bspc rule -a "qemu-system-x86_64" state=floating
bspc rule -a QEMU state=floating
bspc rule -a Qemu state=floating
Zorgodon commented 4 years ago

For posterity, the WM class for the Pale Moon browser is Pale moon, LOWERCASE m. bspc rule -a "Pale moon":Places state=floating (Bookmarks/History) now works. These are some other common sense ones: bspc rule -a "Pale moon":Toplevel state=floating (classic downloads window) bspc rule -a "Pale moon":Update state=floating bspc rule -a "Pale moon":Browser state=floating (about, security, settings, all other popups) Thanks, T0MuX!