baskerville / bspwm

A tiling window manager based on binary space partitioning
BSD 2-Clause "Simplified" License
7.72k stars 415 forks source link

`lower=on' is not respected after application restart #622

Closed Alexander-Shukaev closed 7 years ago

Alexander-Shukaev commented 7 years ago

For example,

bspc rule -a 'Conky' sticky='on' lower='on' manage='off' state='floating'

On the first start (upon login), everything is correct. However, when I modify .conkyrc so that it is reloaded and Conky is restarted automatically, its window floats on top of everything else instead.

I'm on 0.9.2.

msteen commented 7 years ago

The lower rule consequence has been removed for some time. I am not quite sure why. It probably was a choice to keep things simple, since it is not something that is being managed by the window manager. Otherwise it would have to implement a lot things that are already implemented in other tools. In this case you can use xdo to lower your Conky:

In your bspwmrc:

bspc config external_rules_command $XDG_CONFIG_HOME/bspwm/external-rules.sh

In $XDG_CONFIG_HOME/bspwm/external-rules.sh or wherever you have your external rules script:

#!/usr/bin/env bash

wid=$1
class=$2
instance=$3
title=$(xtitle $wid)

if [[ "$class" == Conky ]]; then
  echo manage=off
  xdo lower $wid
fi

Two things to note.

  1. Be sure the class name of Conky is correct, you should check this with xprop.
  2. Be sure to use the latest version (0.5.6) of xdo, the other version does not always sync its requests to the X server, making it unreliable.
baskerville commented 7 years ago

It doesn't make sense to have any other rule consequences when manage=off is present: there's not going to be a node to apply the consequences to.

msteen commented 7 years ago

@baskerville I just copied them over, just in case, because I wondered maybe the consequences would still be applied at first, but I checked and they are indeed completely ignored. I have edited my external rules example to reflect this.

Alexander-Shukaev commented 5 years ago

In my case, the above recipe (xdo lower ...) causes Conky to disappear completely. Why?

Alexander-Shukaev commented 5 years ago

What worked was:

rootid="$(xdo id -N Bspwm -n root | sort | head -n 1)"
xdo above -t "${rootid}" -N Conky

Why lower didn't?