Bspwm not showing workspaces in bar panel


#1

I am expecting bspwm workspaces: I II III IV V VI VII VIII IX X to show up on the desktop but it isn’t.


Any ideas on how to fix this in on the Arch Labs distro?


#2

Have you changed anything from default? If you have can you post your configs.


#3

No I have not changed anything from default other than put

bspc monitor -g 1920x1200+0+0

in ~/.config/bspwm/bspwmrc to get rid of the problem with wm not utilizing the full screen of my computer when launching a terminal after startup.


#4

I also found this in the .xsession-errors

Error: Failed to source /usr/lib/archlabs/common/al-include
Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined
polybar|warn:  No monitor specified, using "VGA1"
xfsettingsd: No window manager registered on screen 0.
urxvt: perl extension 'clipboard' not found in perl library search path
urxvt: perl extension 'keyboard-select' not found in perl library search path
urxvt: perl extension 'url-select' not found in perl library search path

right after startup.


#5

What’s your screen name from aRandR? Do you use multiple screens? Can you share your poybar config


#6

aRandR shows VGA1 as full computer screen overlapping a smaller LVDS1. I use a laptop connecting to an external monitor. My polybar config file:

;=====================================================
;     File Includes
;=====================================================

[section/base]
include-file = /home/leo/.config/polybar/master.conf
include-file = /home/leo/.config/polybar/modules.conf


;=====================================================
;     Openbox Bars
;=====================================================

[bar/openbox-bar]
inherit = bar/master

; Use $ xrandr -q | grep " connected" | cut -d ' ' -f1
monitor =

modules-left   = jgmenu workspaces
modules-center = window_switch clock
modules-right  = ${env:POLYBAR_MODULES:coreuse temperature memory pkg network volume}


;=====================================================
;     i3 Bars
;=====================================================

[bar/i3-bar]
inherit = bar/master

; Use $ xrandr -q | grep " connected" | cut -d ' ' -f1
monitor =

modules-left   = i3 menu
modules-center = clock
modules-right  = ${env:POLYBAR_MODULES:coreuse temperature memory pkg network volume}


;=====================================================
;     Bspwm Bars
;=====================================================

[bar/bspwm-bar]
inherit = bar/master

; Use $ xrandr -q | grep " connected" | cut -d ' ' -f1
monitor =

modules-left   = bspwm menu
modules-center = clock
modules-right  = ${env:POLYBAR_MODULES:coreuse temperature memory pkg network volume}

;=====================================================
;     Openbox Bars
;=====================================================

[bar/generic-bar]
inherit = bar/master

; Use $ xrandr -q | grep " connected" | cut -d ' ' -f1
monitor =

modules-left   = workspaces menu
modules-center = clock
modules-right  = ${env:POLYBAR_MODULES:coreuse temperature memory pkg network volume}


#7

You need to post the master as well.

Do you use both screens?


#8

My master.conf:

;=====================================================
;     Colors & Settings
;=====================================================

[colors]
background = #1c2023
foreground = #a4a4a4
moderate = #ebcb8b
urgent = #bf616a
trim = #919ba0
blue = #a2d1ec
purple = #b48ead
border = #c0c5ce


[settings]
throttle-output = 5
throttle-output-for = 10
throttle-input-for = 30
compositing-background = source
compositing-foreground = source
compositing-overline = source
compositing-underline = source
compositing-border = source
screenchange-reload = true
format-foreground = ${colors.foreground}
format-background = ${colors.background}

;=====================================================
;    Master Bar
;=====================================================

[bar/master]
width = 100%
height = 24
border-size = 0
border-top-size = 0
border-bottom-size = 1
radius = 0
bottom = false
line-size = 3

; monospace is an aliased font name, see ~/.config/fontconfig/fonts.conf
font-0 = "monospace:size=10:antialias=false;2"
font-1 = "Font Awesome 5 Brands:pixelsize=11;1"
font-2 = "MaterialIcons:size=10:antialias=false;2"
font-3 = "icomoon:size=10:antialias=false;2"
font-4 = "Ubuntu Mono Nerd Font:size=10:antialias=false;2"

offset-x = 0
offset-y = 0
fixed-center = true
border-color = ${colors.border}
background = ${colors.background}
foreground = ${colors.foreground}
module-margin = 0
padding-right = 0
padding-left = 0
separator = │

; shows which modules have click actions
cursor-click = pointer

; with cursor-click = pointer' these cause the entire bar to have click actions
; essentially defeating the purpose, so they are commented out

; scroll-up = pamixer -i 2
; scroll-down = pamixer -d 2
; click-middle = skippy-xd --activate-window-picker
; double-click-left = networkmanager_dmenu
; double-click-middle = skippy-xd --activate-window-picker
; double-click-right = pavucontrol &

No, I only use the big monitor.


#9

Add this to your modules config


[module/bspwm]

type = internal/bspwm

ws-icon-0 = "1;"

ws-icon-1 = "2;"

ws-icon-2 = "3;"

ws-icon-3 = "4;"

ws-icon-4 = "5;"

ws-icon-5 = "6;"

;ws-icon-5 = "VI;<insert-icon-here>"

;ws-icon-6 = "VII;<insert-icon-here>"

;ws-icon-7 = "VIII;<insert-icon-here>"

;ws-icon-8 = "IX;<insert-icon-here>"

;ws-icon-9 = "X;<insert-icon-here>"

ws-icon-default = 

label-focused = %icon% %index%

label-focused-background = ${colors.background-alt}

label-focused-underline= ${colors.primary}

label-focused-padding = 2

label-occupied = %icon% %index%

label-occupied-padding = 2

label-urgent = %icon% %index%

label-urgent-background = ${colors.alert}

label-urgent-padding = 2

label-urgent-underline = ${colors.alert}

label-empty = •

;label-empty-foreground = ${colors.foreground-alt}

label-empty-foreground = #afafaf

label-empty-padding = 1

; Separator in between workspaces

; label-separator = |

You may need to edit it to get it to fit correctly. Replace workspaces with bspwm in your config. See if that helps.


#10

Did not work but I see this new error in .xsession-errors which is the cause

polybar|error: Disabling module "bspwm" (reason: The reference ${colors.primary} does not exist (no fallback set))

#11

You will need to change the colours that match your master.


#12

I suspect it’s not running the bspwm bar.

You can check

pgrep -a polybar

Specify the bar

pkill polybar

polybar --config="$HOME/.config/polybar/config" bspwm-bar &

#13

I see 1 but not the rest.


#14

Are you using the default module or the module posted above?

The workspace names need to match so ws-icon-0 = I; will matcht the workspace label I and use the glyph . If you change the workspace names via ~/.config/bspwm/bspwmrc

bspc monitor -d I II III IV V VI VII VIII IX X

Possibly the command you’re running later bspc monitor -g 1920x1200+0+0 is messing with the workspace labels, try combining them, or running the latter before the above.


#15

Okay … I got it somewhat working but this distro is a bit buggy.
I reverted back to the default modules for polybar … with exception of setting monitor = VGA1 in config to get rid of that particular xsession error. I did as you suggestion to put bspc monitor -g 1920x1200+0+0 before

bspc monitor -d I II III IV V VI VII VIII IX X

in ~/.config/bspwm/bspwmrc
I commented out bspc config paddingless_monocle true as it was removed from 0.9.4 to 0.9.6 and put in

for side in top right bottom left; do
	bspc config ${side}_monocle_padding -$(bspc config ${side}_padding)
done

[https://github.com/baskerville/bspwm/blob/master/doc/CHANGELOG.md]

Then I ran

pkill polybar

and finally run ~/.config/bspwm/bspwmrc, it is executable.
Viola I see the workspaces now but I see errors on the screen.
Error: Failed to source /usr/lib/archlabs/common/al-include
numerous errors stating Could not grab key XXX with modfield XX: the combination is already grabbed.
config: click_to_focus: Invalid value: 'true'.

These errors from the .xsession-errors need to be fixed. I feel it is related to the desktop issue I have with this bspwm distro.

Error: Failed to source /usr/lib/archlabs/common/al-include
Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined
xfsettingsd: No window manager registered on screen 0.

#16

Thank you for the update on removed configuration.


This file is only used for pipemenus in openbox and can be ignored in other wm. The error shouldn’t be there when not trying to output a pipemenu (as above) so I’ll fix that.

In the meantime the file is in the archlabs-common package which is tiny and can be installed quickly to avoid the errors.


There is a known issue with xfsettingsd in bspwm, it shouldn’t be running
https://bitbucket.org/archlabslinux/skel/src/8af355267e282a21d1f0b70b90e45a55167bf7bd/bspwm-home/.config/bspwm/bspwmrc#lines-12


#17

Thanks. I installed archlabs-common package as well as commenting out the xfsettings. I also did a pacman update. Here are the new errors in .xsession-errors file.

[ 03/03/2019 02:39:37.799 parse_config_libconfig WARN ] Option `no-dock-shadow` is deprecated, and will be removed. Please use the wintype option `shadow` of `dock` instead.
[ 03/03/2019 02:39:37.799 parse_config_libconfig WARN ] Option `no-dnd-shadow` is deprecated, and will be removed. Please use the wintype option `shadow` of `dnd` instead.
[ 03/03/2019 02:39:37.799 parse_config_libconfig WARN ] Option `menu-opacity` is deprecated, and will be removed.Please use the wintype option `opacity` of `popup_menu` and `dropdown_menu` instead.
[ 03/03/2019 02:39:37.799 parse_config_libconfig WARN ] "alpha-step" has been removed, compton now tries to make use of all alpha values
/usr/bin/al-polybar-session: line 83: continue: only meaningful in a `for', `while', or `until' loop

Do wish this polybar thing can be fixed instead of constantly doing the manual work around.


#18

I just pushed a fix for that error so another update and run al-polybar-session.

If you’re just using bsp and want a simple approach then you could run it directly from your bspwmrc and avoid using the scripts all together.

polybar --config=~/.config/polybar/config bspwm-bar &

Regarding the other errors, they’re from compton, it’s recently been going through some changes and a bunch of options are being deprecated, you can safely remove them from ~/.config/compton.conf like so

# Shadow
shadow = true;
shadow-radius = 7;
shadow-offset-x = -7;
shadow-offset-y = -7;
shadow-opacity = 0.60;

# Opacity
active-opacity = 1.0;
inactive-opacity = 1.0;
inactive-opacity-override = false;

# Fade
fading = true;
fade-delta = 8.0;
fade-in-step = 0.03;
fade-out-step = 0.028;

# Backend
backend = "xrender";
vsync = "none";
mark-wmwin-focused = true;
unredir-if-possible = true;
detect-rounded-corners = true;

opacity-rule = [
    "0:_NET_WM_STATE@:32a * = '_NET_WM_STATE_HIDDEN'"
];

shadow-exclude = [
    "name *?= 'Notification'",
    "class_g *?= 'jgmenu'",
    "class_g *?= 'VirtualBox'",
    "class_g *?= 'Conky'",
    "class_g *?= 'Notify-osd'",
    "class_g *?= 'cairo-dock'",
    "class_g *?= 'trayer'",
    "class_g *?= 'i3-frame'",
    "class_g *?= 'firefox'",
    "class_g *?= 'navigator'",
    "class_g *?= 'Cairo-clock'",
    "class_g *?= 'Cairo-dock'",
    "class_g *?= 'plank'",
    "class_g *?= 'Docky'",
    "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
    "_GTK_FRAME_EXTENTS@:c"
];

focus-exclude = [
    "class_g *?= 'Cairo-clock'",
    "class_g *?= 'Virtualbox'",
    "class_g *?= 'trayer'",
    "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
    "name *?= 'Authy'"
];

wintypes:
{
    tooltip = { fade = true; shadow = true; focus = true; };
};

#19

One thing about the manual work around. I must click the top left Desktop icon and then follow my procedure. When I first log on it is colored out with purple and you cannot see the word Desktop but I cannot capture it with screen print, it disappears into what you see in this screen shot. Weird behaviour.


after manual workaround you see this:


#20

I’m fairly sure this is due to the screen not being fully setup when bsp starts or being changed after, how are you configuring your screens?