2

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?

Sasha
  • 123

2 Answers2

7

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-

pinusc
  • 86
1

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:

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.