No more multiple desktops in bspwm

While still struggling with stalonetray (which refuses to work like expected) i encounter a problem with bspwm: Now, in the panel, just right of the Manjaro logo appears the word "Desktop" - and then on the right of it comes the monocle. But there is no more possibility to set multiple desktops (as it is usually the case).

What went wrong there? Thanks in advance for any pointer!

Are they still there? (super+1,2,3 etc).

I am using tint2 which has a system tray:

If you want my config as a starter let me know.

:Edit:
Am just playing with bspwm. In the config around line 47 is:

workspaces_multimonitor &

Which appears to create the desktops. Is that in place?

Yes, the statement ist there! The workspaces are not accessible anymore ...

Even using the keyboard???

:edit:
An idea, place lines like this:

echo "1" >> ~/test.txt

Throughout your config, increment the number, then check the test file to see if your config is being read correctly.

Sure! Normally, in bspwm, Super + [number] should create/bring me to the correspondent workspace (I thru X). If the workspace remains empty it closes if there is an activity it remains active.

But, that does not work anymore.

It is still there, the bar is just set to not display it (I think).

I think there is an error somewhere in your config that causes it to exit before it makes it to the end.

If you run this, what happens?:

bspc desktop --focus ^2 && xterm ## change xterm to a program on your system!!

desktop -f: Invalid descriptor found in '0'.

Post your config. I haven't used bspwm since 2017 ish so just getting back in the "groove" :smiley: An extra pair of eyes can't hurt. Do you have a back-up of your config?

#! /bin/sh
gap=15
PANEL_HEIGHT=25
export gap
export PANEL_HEIGHT

#This creates negative padding equal to window gap so that gaps are shown only between windows and not on desktop edges.
bspc config window_gap $gap;
bspc config top_padding $(($PANEL_HEIGHT-$gap))
bspc config left_padding -$gap
bspc config right_padding -$gap
bspc config bottom_padding -$gap

#Various settings
bspc config gapless_monocle     false #Default setup uses negative padding, and gapless monocle looks really weird like that
bspc config borderless_monocle  true
bspc config single_monocle true
bspc config paddingless_monocle false
#bspc config ignore_ewmh_focus      true
#bspc config initial_polarity second_child
bspc config remove_disabled_monitors true
bspc config remove_unplugged_monitors true
## Honor size hints: do not make windows smaller than they wish to be
#bspc config honor_size_hints true 

##Color settings
bspc config focused_border_color "#1ABB9B"
bspc config normal_border_color "#2D2D2D"
#"#000000"
bspc config presel_feedback_color "#1ABB9B"
#"#8F3724"
bspc config border_width 2

bspc config focus_follows_pointer true
#bspc config pointer_follows_focus true #Some keybindings automatically enable and disable this setting

#Settings for manual splitting
bspc config split_ratio         0.52

#bspc monitor -d i ii iii iv v vi vii viii ix x
#bspc monitor -d One Two Three Four Five Six Seven Eight Nine Ten
#bspc monitor -d I II III IV V VI VII VIII IX X
#bspc monitor -d • • • • • • • • • •
#bspc monitor -d I II III IV V VI

###This creates and names desktops for multiple monitors.
workspaces_multimonitor &

bspc rule -a screenkey --unmanage
bspc rule -a gcolor2 state=floating center=true
bspc rule -a lxappearance state=floating center=true
bspc rule -a gmrun state=floating center=true
bspc rule -a lxterminal state=floating center=true sticky=true
#bspc rule -a urxvt state=floating center=true
bspc rule -a viewnior state=floating center=true
bspc rule -a file-roller state=floating center=true
bspc rule -a floaterm state=floating center=true
bspc rule -a spotify state=pseudo_tiled
#bspc rule -a nautilus state=pseudo_tiled
#bspc rule -a skype state=pseudo_tiled
bspc rule -a file-roller state=pseudo_tiled
bspc rule -a transmission-gtk state=pseudo_tiled
bspc rule -a conky sticky=on manage=off lower=on
bspc rule -a astime sticky=on
bspc rule -a yad state=floating
bspc rule -a Docky layer=above border=off manage=on
bspc rule -a Plank layer=above border=off manage=on
bspc rule -a wbar layer=above
bspc rule -a dockbarx layer=above
bspc rule -a stalonetray layer=above
bspc rule -a google-chrome-unstable private=on
bspc rule -a google-chrome-stable private=on
bspc rule -a chromium private=on
bspc rule -a firefox private=on
bspc rule -a midori private=on
bspc rule -a vivaldi private=on
bspc rule -a gnome-pie border=off manage=off
bspc rule -a wpa_gui state=pseudo_tiled
bspc rule -a libreoffice state=tiled
bspc rule -a '*:libreofficedev' state=tiled
bspc rule -a '*:soffice' state=tiled
#bspc rule -a firefox desktop=I
#bspc rule -a calibre desktop=II
#bspc rule -a geany desktop=II
#bspc rule -a deluge desktop=III
bspc rule -a 9menu border=off manage=off
bspc rule -a tint2 border=off manage=off
#bspc desktop I --layout monocle
#bspc desktop II --layout monocle


##  Autogap adjusts windowgap automatically according to the number of
##  windows on the desktop. Using it disables negative window gap.
#autogap &

##  This script balances all windows when new one is spawned 
euclid_balancer &

##Edge-switcher switches to next workspace when moves moves to the 
##edge of the monitor (behavior similar to enlightenment)
#edge-switcher &

###External rules
##Pseudo automatic mode: always splits focused window when opening new window
bspc config external_rules_command /usr/bin/pseudo_automatic_mode
##Adjust new window: splits biggest windows to keep windows about the same size
#bspc config external_rules_command /usr/bin/adjust-new-window

##Autostart apps
#Keybindings daemon
sxhkd &
mylime &
lxpolkit &
stalonetray --dockapp-mode simple &
#Source autostartfile. Uncomment this if you use bspwm-git
#. $HOME/.config/bspwm/autostart

Will look at later, got to eat then nip out.
My config: (see comment below)

#! /bin/sh
gap=5
PANEL_HEIGHT=22
export gap
export PANEL_HEIGHT

#This creates negative padding equal to window gap so that gaps are shown only between windows and not on desktop edges.
bspc config window_gap $gap;
bspc config top_padding $(($PANEL_HEIGHT-$gap))
bspc config left_padding -$gap
bspc config right_padding -$gap
bspc config bottom_padding -$gap

#Various settings
bspc config gapless_monocle     false #Default setup uses negative padding, and gapless monocle looks really weird like that
bspc config borderless_monocle  true
bspc config single_monocle true
bspc config paddingless_monocle false
#bspc config ignore_ewmh_focus      true
#bspc config initial_polarity second_child
bspc config remove_disabled_monitors true
bspc config remove_unplugged_monitors true
## Honor size hints: do not make windows smaller than they wish to be
#bspc config honor_size_hints true 

##Color settings
bspc config focused_border_color "#1ABB9B"
bspc config normal_border_color "#222D32"
#"#000000"
bspc config presel_feedback_color "#1ABB9B"
#"#8F3724"
bspc config border_width 1

bspc config focus_follows_pointer true
#bspc config pointer_follows_focus true #Some keybindings automatically enable and disable this setting

#Settings for manual splitting
bspc config split_ratio         0.52

#bspc monitor -d i ii iii iv v vi vii viii ix x
#bspc monitor -d One Two Three Four Five Six Seven Eight Nine Ten
#bspc monitor -d I II III IV V VI VII VIII IX X
#bspc monitor -d • • • • • • • • • •
#bspc monitor -d I II III IV V VI

###This creates and names desktops for multiple monitors.
workspaces_multimonitor &

bspc rule -a screenkey --unmanage
bspc rule -a gcolor2 state=floating center=true
bspc rule -a lxappearance state=floating center=true
bspc rule -a gmrun state=floating center=true
bspc rule -a lxterminal state=floating center=true sticky=true
#bspc rule -a urxvt state=floating center=true
bspc rule -a viewnior state=floating center=true
bspc rule -a file-roller state=floating center=true
bspc rule -a floaterm state=floating center=true
bspc rule -a spotify state=pseudo_tiled
#bspc rule -a nautilus state=pseudo_tiled
#bspc rule -a skype state=pseudo_tiled
bspc rule -a file-roller state=pseudo_tiled
bspc rule -a transmission-gtk state=pseudo_tiled
bspc rule -a conky sticky=on manage=off lower=on
bspc rule -a astime sticky=on
bspc rule -a yad state=floating
bspc rule -a Docky layer=above border=off manage=on
bspc rule -a Plank layer=above border=off manage=on
bspc rule -a wbar layer=above
bspc rule -a dockbarx layer=above
bspc rule -a google-chrome-unstable private=on
bspc rule -a google-chrome-stable private=on
bspc rule -a chromium private=on
bspc rule -a firefox private=on
bspc rule -a midori private=on
bspc rule -a gnome-pie border=off manage=off
bspc rule -a wpa_gui state=pseudo_tiled
bspc rule -a libreoffice state=tiled
bspc rule -a '*:libreofficedev' state=tiled
bspc rule -a '*:soffice' state=tiled
#bspc rule -a firefox desktop=I
#bspc rule -a calibre desktop=II
#bspc rule -a geany desktop=II
#bspc rule -a deluge desktop=III
bspc rule -a 9menu border=off manage=off
bspc rule -a tint2 border=off manage=off
#bspc desktop I --layout monocle
#bspc desktop II --layout monocle


##  Autogap adjusts windowgap automatically according to the number of
##  windows on the desktop. Using it disables negative window gap.
#autogap &

##  This script balances all windows when new one is spawned 
#euclid_balancer &

##Edge-switcher switches to next workspace when moves moves to the 
##edge of the monitor (behavior similar to enlightenment)
#edge-switcher &

###External rules
##Pseudo automatic mode: always splits focused window when opening new window
bspc config external_rules_command /usr/bin/pseudo_automatic_mode
##Adjust new window: splits biggest windows to keep windows about the same size
#bspc config external_rules_command /usr/bin/adjust-new-window

##Autostart apps
#Keybindings daemon
#sxhkd &
#Source autostartfile. Uncomment this if you use bspwm-git
#. $HOME/.config/bspwm/autostart


# Alter compton settings if using intel graphics
GRAPHIC_CARD=$(lspci | grep -i "vga" | sed 's/.*://' | sed 's/(.*//' | sed 's/^[ \t]*//')
#if [[ $(echo $GRAPHIC_CARD | grep -i 'intel\|lenovo') != "" ]]; then MCODE='initrd=\intel-ucode.img'
#  sed -i 's/"xrender"/"glx"/' ~/.config/compton.conf
#  grep -q 'vsync = "opengl-swc";' ~/.config/compton.conf || echo 'vsync = "opengl-swc";' >> ~/.config/compton.conf
#fi
echo steve > tttt&
. ~/.config/bspwm/mybspwm.sh&
#limepanel&
tint2 ~/.config/tint2/tint2rc&

I tried your config, I have the same problem with it as you, so the fault is in the config. I am down to line ~ 98 we are pretty much identical so far except euclid-balancer in mine is commented out.

I'm running a stock version of manjaro-bspwm rn and my rc is the same as above with the euclid-balancer commented out as well.

@emninger back up your bspwmrc, try mine, remove the section from "echo steve"

Then slowly modify to match your config, checking at each stage.

@airclay if you try @emninger's config does it screw up the same way?

My config is pretty fresh, not had time to do much :rofl: I put most of my changes in mybspwm & sourced it:

#!/bin/bash

numlockx on&

running=$(pgrep -c variety)
if [ "$running" == "0" ]; then
     variety&
fi

running=$(pgrep -c copyq)
if [ "$running" == "0" ]; then
     copyq&
fi

#/usr/bin/nm-applet
running=$(pgrep -c nm-applet)
if [ "$running" == "0" ]; then
     /usr/bin/nm-applet&
fi

running=$(pgrep -c autokey-gtk)
if [ "$running" == "0" ]; then
    autokey-gtk&
fi

killall volumeicon
running=$(pgrep -c volumeicon)
if [ "$running" == "0" ]; then
    volumeicon&
fi

lxqt-notificationd&
lxpolkit&

setxkbmap -option "terminate:ctrl_alt_bksp"
setxkbmap -option "caps:none"
setxkbmap -option "shift:both_capslock"
setxkbmap -layout gb -option ctrl:nocaps

libinput-gestures-setup restart&

xmodmap ~/.Xmodmap&

killall xcape&

sleep 1

xcape -e "Hyper_L=space" &
xcape -e 'Alt_L=Super_L|3'&
xcape -e 'Control_L=Super_L|1'&
xcape -e 'Shift_R=Super_L|d'&
picom&

killall plank&
killall latte-dock&

killall stalonetray
#stalonetray --geometry 1x1+700-880

ok so it's got to be an issue in the "#Autostart apps" block

@emninger config works if I use the stock version

##Autostart apps
#Keybindings daemon
#sxhkd &
#Source autostartfile. Uncomment this if you use bspwm-git
#. $HOME/.config/bspwm/autostart
limepanel &

I would first try removing sxhkd and seeing how that goes. I'm not exactly familiar with how it is being autostarted yet actually, being it's commented out in the standard version.

sxhkd is started by /usr/bin/bspwm-session I think.

yes it is!

So, I'm not able to test any further as I'm not using the other applications for my panel nor would I have the same configs. The issue (if not from calling sxhkd twice) is probably in one of them.

Try running from the terminal

 workspaces_multimonitor

You can also just put this to your bspwmrc:

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

Heureka, @Chrysostomus! :smiley:

That's it. Where i have to bind in (to which config file?) this statement? Because, in the bspwmrc it's apparently not respected - or in some way "overruled" by some other config file

A big thank you to you all for your help and engagement!
:heart:

Glad you got it sorted !!

@Chrysostomus only set up bspwm again yesterday afternoon (and herbst, qtile, xmonad next), boredom! Am on annual leave and country is on shutdown. Looking back at the forum it was 2017 when I pestered you with questions!! :smiley:

I had an idea, yesterday, a LARBS type script, for bspwm. You could call it CARBS, if they weren't bad for you :wink:

1 Like
  1. It was you all, not me :wink:

  2. Not completely: I still have to figure out/get help, why the statement in bspwmrc is not respected - and whereto, consequentely it should be moved ... (?)

Forum kindly sponsored by