I have recently started using bspwm and I have been blown away by the improvement in my workflow. There is however one thing that has been bothering me:

I am writing data analysis scripts in python that use matplotlib for plotting. Every time a plot is drawn, my windows get rearranged because bspwm does its tiling magic. Normally, I would define a floating=True in the configuration file, however for this I need the name of the application. Something like this:

bspc rule -a matplotlib floating=on

Can somebody tell me, how can I properly address matplotlib figures?

P.S. Could somebody create a tag for bspwm?

2 Answers 2


To find the WM_CLASS (that is the name you must put in your bspwm rule) of any window use xprop. Execute

$xprop |awk '/WM_CLASS/{print $4}'

in a terminal, then click on the window you want to find the name of (in this case your matplotlib window) and you will get it printed to the terminal-

  • Thank you for your reply. In general, this answers the questions, but when I click on a matplotlib plot, I get ", as output. Any idea what might be causing this?
    – Sasha
    Oct 20, 2015 at 8:05
  • I think the only possibility here is that matplotlib hasn't got a WM_CLASS. So, unless you can find in the matplotlib doc how to set one, (you'll maybe need to edit the source files) you can't set a bspc rule.
    – pinusc
    Nov 5, 2015 at 21:46

matplotlib is getting WM_CLASS.  Here you can see a matplotlib window without any rules:

a matplotlib window without any rules

and here I made it floating:


You need this rule in your $HOME/.config/bspwmrc.

bspc rule -a matplotlib state=floating

Here are some examples you can copy from: Abdullah's BSPWM Desktop Session.

  • +1 In my case I had to use "Matplotlib" instead of "matplotlib" Jun 2, 2021 at 11:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .