How does bspc rule work

bspc rule -a google-chrome-unstable private=on dekstop=II
bspc rule -a google-chrome-stable private=on dekstop=II
bspc rule -a google-chrome-dev private=on dekstop=II
bspc rule -a android-studio private=on dekstop=8 state=floating center=true
bspc rule -a chromium private=on
bspc rule -a firefox private=on
bspc rule -a midori private=on
bspc rule -a gnome-pie border=off manage=off
bspc rule -a wpa_gui state=pseudo_tiled
bspc rule -a libreoffice state=tiled
bspc rule -a '*:libreofficedev' state=tiled
bspc rule -a '*:soffice' state=tiled
bspc rule -a steam desktop=7

I have a bunch of this rules I set following existing example, but none of them actually work like always opening steam on desktop 7

1 Like

Usually if a rule doesn’t work, it is because the window doesn’t match the pattern. In this case your pattern is steam. You can use xprop to check a suitable pattern. Or, you can use bspwm-ruler to automatically generate a rule with the right pattern.

Other reasons it might not work:

  • some windows start with one name and class, and then change to another immediately. For example, libreoffice isn’t matched by Libreoffice pattern even though that’s what xprop shows. It is instead matched by ‘*:soffice’.
  • is your desktop really named 7? Or perhaps VII?

At least 5 years ago your pattern would have been correct. So I suspect it might be the wrong desktop name that is getting in the way.

Also Steam might work as pattern.

Maybe try " bspc rule -a Steam desktop=VII "

1 Like

@kuntau bspc query -D --names will list the desktops by name, to ensure correct selection.

I like this method, as it walks through all the options.

Using bspwm-ruler set the rule:
bspc rule -a Steam state=floating manage=on layer=normal desktop=0x01200014 follow=on

I had to edit the desktop ID to the desktop name to get persistence. So my final functioning rule was:
bspc rule -a Steam state=floating manage=on layer=normal desktop= follow=on

*don’t mind the square, I use font icons for desktop names.


Oh… so my desktop name are wrong all this time lol

Desktop 

This is default manjaro-bspwm installation.

I use this rule and set mine on desktop 7, it still open on what ever dekstop I’m on

You’re totally right, I was on desktop 7 when testing :blush:

There’s a few links on reddit, not much elsewhere, about steam with rules. This will require more reading and testing.

Never use bspwm . Look interesting :+1: VM time I think …

1 Like

Spent a little time looking at this today. I’m not sure if the main window will cooperate, which is a bummer. See here: Feature Request: Let Steam client windows be managed by the window manager · Issue #1040 · ValveSoftware/steam-for-linux · GitHub

I did have success with launching the chat and promotion windows on the correct desktop but, the main window wouldn’t cooperate.

bspc rule -a Steam state=floating manage=on layer=normal desktop=^7 follow=off

I had to swap out the font icon desktop names to generic numbers though. The default names can be changed in /usr/bin/workspaces_multimonitor.

Wanted to drop this link as well as it seems launching games individually may be something that works around the library window? (see last two comments)

First time posting so first – what an awesome distro, forum and window manager! :slight_smile:

Sorry to revive an old thread, but it felt like the best place to chime in…

I"m new to bspwm so this is likely something silly I’m doing wrong. I’ve tried following the advice here, but haven’t been able to get Spotify to launch on a specified desktop.

My desktop names are simple, and I’ve tried generating the rule with bspwm-ruler but it always just pops up on my current desktop. This is what I’ve got now, but I’ve tired “spotify” and “Spotify” (classes reported by xprop) and even the full window title (of course bspc’s man page says to use the class, I was desparate). I’ve tried targeting different desktops and using ‘9’, ‘^9’, and the ‘0x…’ format generated by bspm-ruler with no change.

❯ bspc query -D --names

❯ bspc rule -l
screenkey:* => --unmanage
firefox:* => private=on
brave:* => private=on
Gimp:* => desktop=9 state=floating follow=on
libreoffice:* => state=tiled
*:libreofficedev => state=tiled
*:soffice => state=tiled
Spotify:* => state=floating manage=on layer=normal desktop=^9 follow=on

I need to spend more time with the man page, but wanted to see if anyone sees something obvious I’m doing. TIA!

You can run command bspc query -T to see if Spotify is still naming it’s window late, basically confirm below link is still an issue. There’s a couple workarounds listed in the thread as well.

1 Like