baskerville / bspwm

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

How to make fullscreen windows cover polybar without moving them above it with xdo? #717

Open Brett99 opened 6 years ago

Brett99 commented 6 years ago

I apologize if this is not a bspwm issue.

I have polybar on the bottom of my screen, and it is always visible, except for when a window is in fullscreen. The fullscreen window covers polybar because I set it to be behind it with xdo below -t $(xdo id -n root) $(xdo id -a polybar-main_HDMI-3). This currently does what I want, which is for polybar to always be visible unless there is a fullscreen window covering it. I also never want polybar to cover up the bottom of a window.

The only issue is that if I have many windows open in monocle mode, the shadows (drawn by compton) cover up polybar and obscure the text.

To fix the shadow issue, I could move polybar to the top using xdo, but then fullscreen windows would be obscured by polybar.

Is there a way to stop polybar from obscuring fullscreen windows, while still keeping it above all other windows so no shadows are drawn on top of it?

alecive commented 6 years ago

I have lemonbar, but in my configuration I don't have such issue. Now, I am not super expert in bspwm and xdo, but this is what my configuration:

I don't know if it helps. If not, please post a screenshot or something more clear.

Brett99 commented 6 years ago

Hi, if I don't run any xdo commands, I do not have the shadow issue. Both of our xdo commands make it so that the shadows from monocle windows obscure the bar.

By default, it does what I want, except for the fact that fullscreen windows are obscured by the bar.
With either xdo command, it does what I want, except for the fact that monocle shadows obscure the bar.

xdo show -d does not seem to do anything.

Brett99 commented 6 years ago

I pretty much want polybar to always be infront of everything, except for fullscreen windows.

msteen commented 6 years ago

In that case, if everything is fine by default, except you do not want it to overlay full screen windows, why not just run xdo lower <polybar_window_id> when going fullscreen and xdo raise <polybar_window_id> when you exit fullscreen. Would that not be sufficient? Maybe calling only xdo lower <polybar_window_id> once when it is started is already sufficient. I used to do that to work around the issue of my bar overlaying, but I am not sure how that effects your shadows.

iwishiwasaneagle commented 4 years ago

I have lemonbar, but in my configuration I don't have such issue. Now, I am not super expert in bspwm and xdo, but this is what my configuration:

* I am not asking my bar to stay below a fullscreen window, but rather to stay above bspwm root: `xdo above -t "$(xdo id -N Bspwm -n root | sort | head -n 1)" "$wid"` , where `wid=$(xdo id -a "$PANEL_WM_NAME")`

* If you do that, I think that the panel will be above all the windows in monocle mode and will not be obscured by their shadows.

* When I go fullscreen, I use `xdo show -d` which automatically covers my panel.

I don't know if it helps. If not, please post a screenshot or something more clear.

This might be two years on but I got this working recently using

xdo lower -N "Polybar"
xdo above -N "Polybar" -t $(xdo id -N Bspwm -n root)

It was previously working with just the first line, however some update made it so that I couldn't click on the polybar items any more which the second line fixed.

cubetastic33 commented 4 years ago

Setting wm-restack = bspwm in polybar's config seems to fix this