How to make programs start tilted/floating?


#1

Hi,

I guess that that is strictly bspwm question, but I bet that you guys can help me with this little “problems”.

  1. So, when I click on the time at the top (in the polybar) to open calendar, it opens tilted and I would prefer to open it in floating mode.
  2. Program Zathura (pdf viewer) always opens floating, how to make it to open tiled?

I know that there are shortcuts to switch from tiled window to floating and so on. I want to always run zathura tiled and always run floating calendar.

Cheers


#2

In bspwm (any window manager) you set up rules to control the behavior of an open window.

For bspwm, you define those in the ~/.config/bspwm/bspwmrc file. Go to the Arch Wiki and look up bspwm, there should be some examples.

Edit - example bspwmrc from git page -

lines like:

bspc rule -a mplayer2 state=floating

are what you will need to add to your bspwmrc file; you can use xprop to get the class name.


#4

Well, I have tried:

bspc rule -a zathura state=tiling

But it do not seem to work :frowning:


#5

Try it with a capital “Z”

bspc rule -a Zathura state=tiling

works on my end.


#6

Well… Not for me. My config file: https://pastebin.com/B0pPk9zv

Last line


#7

Can you make the zathura window tile with a key binding (super + t by default, I think) or by entering that rule command in a terminal?


#8

There is also an issue with running xfsettingsd with bspwm. Try commenting out that line in your bspwmrc.

Not sure how/why it would effect tiling, but give that a try.


#9

Yea, I can tile zathura with key bindings, super + t. What rule terminal do you mean? That also can help me.

Do you mean by enternig “#” mark? If so - no effect.


#10

bspwm is interactive in that you can change the configuration on the fly by entering bspc commands in a terminal.

If you have a terminal and zathura window open at the same time, you can enter:

bspc rule -a Zathura state=tiling

in the terminal and the zathra window will tile. Also, if you enter the rule in the terminal, the next time you open zathura it should tile.

Do you mean by enternig “#” mark? If so - no effect.

Change:

# xfce settings

xfsettingsd &

to

# xfce settings

# xfsettingsd &;

#11

Slightly off topic. You have two commands to set your wallpaper in your bspwmrc.

nitrogen --restore &

and

feh --bg-fill /usr/share/backgrounds/archlabs/11.jpg &;

You can remove one of those.


#12

Absolutely nothing happens. Even by typing

bspc rule -a Zathura state=tiling

in terminal and editing:

#xfce settings
#xfsettingsd &;

Oh, didnt know that :smiley:

Ok, I think that it takes too much your time (that I totally appreciate). I just wanted to have something like this (It will be much easier to show you)
arch

But to achive that, app needs (as I know, maybe I’m wrong) to open tiled.


#13

That layout you diagrammed is the default for dwm or spectrwm - both good window managers that can be installed with pacman. I know zathura tiles in both since I use them.

That layout can be achieved with bspwm, but requires manually tiling the windows via key bindings (part of sxhkdrc by default).

Seeing as how you have a bug in bspwm, you may want to give either dwm or spectrwm a look.