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

https://manpages.debian.org/testing/bspwm/bspc.1.en.html

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?
3 Likes

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.

2 Likes

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
1
2
3
4
5
6
7
8
9
10

āÆ 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