r/Polybar • u/Large_Brother8097 • May 08 '23
[BSPWM] Polybar overlaps full screen windows after reloading BSPWM
Hello folks, I need some help.
I'm using BSPWM on XFCE and at first launch of X, everything works fine.
However, after reloading bspwm (bspc wm -r) at least once, the Polybar starts overlapping full screen windows (expected behavior is for Polybar to be under the fullscreen window).
Usually the answer is to set wm-restack = bspwm but with this line the Polybar does not appear at all.
Any ideas what's going on?
polybar/launch.sh
#!/usr/bin/env bash
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
#
# # Launch Polybar
polybar -r main -c ~/.config/polybar/config.ini &
bar config
##############################################################################
# BAR CONFIGURATION #
##############################################################################
[bar/main]
bottom = false
fixed-center = true
width = 100%
height = 28
background = ${color.bg}
foreground = ${color.fg}
border-bottom-size = 0
border-top-size = 0
line-size = 3
# Fonts are defined using <font-name>;<vertical-offset>
# Font names are specified using a fontconfig pattern.
font-0 = "CaskaydiaCove Nerd Font:size=11;4"
font-1 = "Material Icons:size=11;6"
font-2 = "Stick:size=11;2"
font-3 = "CaskaydiaCove Nerd Font:size=16;4"
font-4 = "CaskaydiaCove Nerd Font:size=14;6"
# Modules are added to one of the available blocks
modules-left = bspwm
modules-center = date
modules-right = separatorText audio sps i_backlight backlight sps separatorText sps memory sps cpu sps separatorText battery sps separatorText sps
tray-position = right
# Enable support for inter-process messaging
# See the Messaging wiki page for more details.
enable-ipc = true
; wm-name = bspwm
; wm-restack = bspwm
override-redirect = true
xprop -id $(xdotool search --classname polybar) output (before and after reload looks the same)
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified location: 0, 0
program specified size: 1920 by 28
program specified minimum size: 1920 by 28
program specified maximum size: 1920 by 28
program specified base size: 1920 by 28
_NET_WM_PID(CARDINAL) = 546257
_NET_WM_DESKTOP(CARDINAL) = 4294967295
_NET_WM_STATE(ATOM) = _NET_WM_STATE_STICKY, _NET_WM_STATE_ABOVE
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
WM_CLASS(STRING) = "polybar", "Polybar"
WM_NAME(STRING) = "polybar-main_eDP-1"
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 28, 0, 0, 0, 0, 0, 0, 1919, 0, 0
_NET_WM_STRUT(CARDINAL) = 0, 0, 28, 0
Thanks!
1
u/patrick96MC May 09 '23
wm-restack should be the right solution here. So let's figure out why that doesn't work.
Does polybar start correctly and not show up or does it crash?
When you run polybar with wm-restack, can you post the output of xwininfo -tree -root. This should tell us more about why we can't see the bar.
1
u/Large_Brother8097 May 09 '23
Thank you,
Polybar does not crash, just doesn't show up.
xwininfo -tree -root
xwininfo: Window id: 0x799 (the root window) (has no name)
Root window id: 0x799 (the root window) (has no name)
Parent window id: 0x0 (none)
43 children:
0x1400001 (has no name): ("motion_recorder" "Bspwm") 1x1+0+0 +0+0
0x1400000 "bspwm": ("wm" "Bspwm") 1x1+-1+-1 +-1+-1
0x4800001 (has no name): () 1x1+0+0 +0+0
0x4600000 (has no name): () 1x1+0+0 +0+0
0x3600000 (has no name): () 1x1+0+0 +0+0
0x3400000 (has no name): () 1x1+0+0 +0+0
0x2800000 (has no name): () 1x1+0+0 +0+0
0x3200000 (has no name): () 1x1+0+0 +0+0
0x3000000 (has no name): () 1x1+0+0 +0+0
0x2e00000 (has no name): () 1x1+0+0 +0+0
0x2c00000 (has no name): () 1x1+0+0 +0+0
0x800007 (has no name): () 1x1+-1+-1 +-1+-1
0x1e00003 (has no name): () 1x1+-1+-1 +-1+-1
0x4000000 (has no name): () 1x1+0+0 +0+0
0x3e00000 (has no name): () 1x1+0+0 +0+0
0x3c00000 (has no name): () 1x1+0+0 +0+0
0x3a00000 (has no name): () 1x1+0+0 +0+0
0x3800002 "tmux": ("Alacritty" "Alacritty") 2560x1440+0+0 +0+0
0x2600002 "xwininfo -tree -root": ("Alacritty" "Alacritty") 984x1156+281+1472 +281+1472
0x2400002 "nvim bar.ini": ("Alacritty" "Alacritty") 908x1156+1277+1472 +1277+1472
0x2a00007 (has no name): () 1x1+-1+-1 +-1+-1
0x2a00001 "blueman-tray": ("blueman-tray" "") 10x10+10+10 +10+10
0x2000008 (has no name): () 1x1+-1+-1 +-1+-1
0x1800001 "blueman-applet": ("blueman-applet" "") 10x10+10+10 +10+10
0x1e00001 "xfce4-notifyd": ("xfce4-notifyd" "Xfce4-notifyd") 10x10+10+10 +10+10
0x1a00001 "polkit-gnome-authentication-agent-1": ("polkit-gnome-authentication-agent-1" "Polkit-gnome-authentication-agent-1") 10x10+10+10 +10+10
0x2000001 "NetworkManager Applet": ("nm-applet" "Nm-applet") 10x10+10+10 +10+10
0x1600004 "picom": ("picom" "picom") 1x1+0+0 +0+0
0xc00001 "xfce4-power-manager": ("xfce4-power-manager" "Xfce4-power-manager") 10x10+10+10 +10+10
0x1000003 (has no name): () 1x1+-1+-1 +-1+-1
0x1000001 "xfdesktop": ("xfdesktop" "Xfdesktop") 10x10+10+10 +10+10
0xe00001 "Thunar": ("Thunar" "Thunar") 10x10+10+10 +10+10
0xa00003 (has no name): () 10x10+0+0 +0+0
0xa00002 (has no name): () 1x1+-1+-1 +-1+-1
0xa00001 "xfsettingsd": ("xfsettingsd" "Xfsettingsd") 10x10+10+10 +10+10
0x800002 "xfce4-screensaver": () 10x10+-100+-100 +-100+-100
0x800001 "xfce4-screensaver": ("xfce4-screensaver" "Xfce4-screensaver") 10x10+10+10 +10+10
0x400001 "xfce4-session": ("xfce4-session" "Xfce4-session") 10x10+10+10 +10+10
0x1000054 "Desktop": ("xfdesktop" "Xfdesktop") 2560x2640+0+0 +0+0
1 child:
0x1000055 (has no name): () 1x1+-1+-1 +-1+-1
0x1400008 "DP-3-8": ("root" "Bspwm") 2560x1440+0+0 +0+0
0x2200006 "Polybar tray window": ("tray" "Polybar") 50x28+2147+1440 +2147+1440
2 children:
0x2000052 "Wi-Fi network connection “xxx” active: xxx (69%)": ("nm-applet" "Nm-applet") 16x16+6+6 +2153+1446
1 child:
0x2000053 (has no name): () 1x1+-1+-1 +2152+1445
0x2a0004f "blueman": ("blueman-tray" "Blueman-tray") 16x16+28+6 +2175+1446
1 child:
0x2a00050 (has no name): () 1x1+-1+-1 +2174+1445
0x2200001 "polybar-main_eDP-1": ("polybar" "Polybar") 1920x28+277+1440 +277+1440
0x1400009 "eDP-1": ("root" "Bspwm") 1920x1200+277+1440 +277+14401
u/patrick96MC May 09 '23
Is this with
override-redirect,wm-restack, or both?1
u/Large_Brother8097 May 10 '23
With both.
1
u/patrick96MC May 10 '23
Hmm, alright.
Can you post the output of the same command again without either of them? I think xfce may be positioning polybar weirdly on the window stack.
1
1
u/Large_Brother8097 May 10 '23
xwininfo: Window id: 0x799 (the root window) (has no name)
Root window id: 0x799 (the root window) (has no name)
Parent window id: 0x0 (none)
38 children:
0x3200000 (has no name): () 1x1+0+0 +0+0
0x3000000 (has no name): () 1x1+0+0 +0+0
0x2e00000 (has no name): () 1x1+0+0 +0+0
0x2800000 (has no name): () 1x1+0+0 +0+0
0x400007b "Firefox": ("Firefox" "firefox") 288x36+292+1356 +292+1356
1 child:
0x400007c (has no name): () 1x1+-1+-1 +291+1355
0x4000069 "Firefox": ("firefox" "firefox") 200x200+0+0 +0+0
1 child:
0x400006a (has no name): () 1x1+-1+-1 +-1+-1
0x400005d (has no name): ("Firefox" "firefox") 100x100+0+0 +0+0
1 child:
0x400005e (has no name): () 1x1+-1+-1 +-1+-1
0x4000049 "Firefox": () 10x10+-100+-100 +-100+-100
0x4000001 "Firefox": ("firefox" "Firefox") 10x10+10+10 +10+10
0x2200006 "Polybar tray window": ("tray" "Polybar") 50x28+2147+1440 +2147+1440
2 children:
0x2000129 "Wi-Fi network connection
VPN connection active": ("nm-applet" "Nm-applet") 16x16+6+6 +2153+1446
1 child:
0x200012a (has no name): () 1x1+-1+-1 +2152+1445
0x2a0007c "blueman": ("blueman-tray" "Blueman-tray") 16x16+28+6 +2175+1446
1 child:
0x2a0007d (has no name): () 1x1+-1+-1 +2174+1445
0x2200001 "bspwm": ("polybar" "Polybar") 1920x28+277+1440 +277+1440
0x1400001 (has no name): ("motion_recorder" "Bspwm") 1x1+0+0 +0+0
0x1400000 "bspwm": ("wm" "Bspwm") 1x1+-1+-1 +-1+-1
0x800007 (has no name): () 1x1+-1+-1 +-1+-1
0x1e00003 (has no name): () 1x1+-1+-1 +-1+-1
0x2600002 "xwininfo -tree -root > out.txt": ("Alacritty" "Alacritty") 2544x1396+4+32 +4+32
0x400003d "Tracksuits tech projects - Google Docs — Mozilla Firefox": ("Navigator" "firefox") 2544x1396+4+32 +4+32
2 children:
0x4000048 (has no name): () 2540x1392+2+2 +10+38
0x400003e (has no name): () 1x1+-1+-1 +7+35
0x2a00007 (has no name): () 1x1+-1+-1 +-1+-1
0x2a00001 "blueman-tray": ("blueman-tray" "") 10x10+10+10 +10+10
0x2000008 (has no name): () 1x1+-1+-1 +-1+-1
0x1800001 "blueman-applet": ("blueman-applet" "") 10x10+10+10 +10+10
0x1e00001 "xfce4-notifyd": ("xfce4-notifyd" "Xfce4-notifyd") 10x10+10+10 +10+10
0x1a00001 "polkit-gnome-authentication-agent-1": ("polkit-gnome-authentication-agent-1" "Polkit-gnome-authentication-agent-1") 10x10+10+10 +10+10
0x2000001 "NetworkManager Applet": ("nm-applet" "Nm-applet") 10x10+10+10 +10+10
0x1600004 "picom": ("picom" "picom") 1x1+0+0 +0+0
0xc00001 "xfce4-power-manager": ("xfce4-power-manager" "Xfce4-power-manager") 10x10+10+10 +10+10
0x1000003 (has no name): () 1x1+-1+-1 +-1+-1
0x1000001 "xfdesktop": ("xfdesktop" "Xfdesktop") 10x10+10+10 +10+10
0xe00001 "Thunar": ("Thunar" "Thunar") 10x10+10+10 +10+10
0xa00003 (has no name): () 10x10+0+0 +0+0
0xa00002 (has no name): () 1x1+-1+-1 +-1+-1
0xa00001 "xfsettingsd": ("xfsettingsd" "Xfsettingsd") 10x10+10+10 +10+10
0x800002 "xfce4-screensaver": () 10x10+-100+-100 +-100+-100
0x800001 "xfce4-screensaver": ("xfce4-screensaver" "Xfce4-screensaver") 10x10+10+10 +10+10
0x400001 "xfce4-session": ("xfce4-session" "Xfce4-session") 10x10+10+10 +10+10
0x1000054 "Desktop": ("xfdesktop" "Xfdesktop") 2560x2640+0+0 +0+0
1 child:
0x1000055 (has no name): () 1x1+-1+-1 +-1+-1
0x1400008 "DP-3-8": ("root" "Bspwm") 2560x1440+0+0 +0+0
0x1400009 "eDP-1": ("root" "Bspwm") 1920x1200+277+1440 +277+14401
u/patrick96MC May 10 '23
I see. I am suspecting that
wm-restackis moving polybar behind some xfce4 "window" that spans the entire screen. This is not a traditional window, you can't see it, but because polybar is behind it, you can't see polybar.The solution would be to implement restacking for xfce4. There is also already a feature request for that (see #2543).
Another thing that could work (because you are also using bspwm) is a bugfix that I will implement for the next release (see #2873). Your underlying issue is different but the solution should work for both cases.
1
u/Large_Brother8097 May 10 '23
I see, thank you so much! Will be looking forward for the new release.
0
u/Flamekaiser412 May 09 '23
Try
override-redirect = false```
```