Author Topic: [Solved]Can't get lemonbar to display workspaces  (Read 2452 times)

0 Members and 1 Guest are viewing this topic.

Offline tanaymkis

  • Jr. Mitglied
  • **
  • Posts: 72
  • I'm new. Be nice!
  • Branch: Stable
  • Desktop: i3
  • Kernel: 3.18.22-1-MANJARO i686
  • Skill: Novice
[Solved]Can't get lemonbar to display workspaces
« on: 30. January 2016, 13:00:29 »
OK, so here it is. I have just installed and nearly configured bspwm. Everything is configured except for my bar.
With the example config the workspaces work and I can see buttons for workspace.
So I made a custom script for lemonbar{ largely inspired from a script on github } but can't get workspaces to display on it.
I have googled but found nothing useful. It is probably a noob problem. So please help!

The configs for the bar are attached.
« Last Edit: 30. January 2016, 17:20:16 by oberon »

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: Can't get lemonbar to display workspaces
« Reply #1 on: 30. January 2016, 14:19:48 »
While I don't know exactly why your desktop showing fails, I can tell that this part is the problem:
Code: [Select]
workspaces() {
    for workspace in `bspc query -D`
    do
        if [ $workspace = "`bspc query -d -D`" ]
        then
            workspaces="$workspaces %{F#FFff0000}$workspace"
        else
            workspaces="$workspaces %{F-}$workspace"
         fi
    done
    echo $workspaces
}

# and in your while loop
echo "%{l} $(workspaces) %{F-}"     # ... etc

This seems to be very inefficiemt way of doing this, and not to work for you. What bspwm panel scripts usually have instead of this is
Code: [Select]
bspc control --subscribe > $PANEL_FIFO &Before the while loop that echos all the other variables into $PANEL_FIFO.
Then the part that actually sends them to panel would be:

Code: [Select]
cat "$PANEL_FIFO" | panel_bar | lemonbar \
    -g x"$PANEL_HEIGHT" \
    -f "$PANEL_FONT" \
    -f "$ICON_FONT" \
    -f "$ICON_FONT2" \
    -F "$COLOR_FOREGROUND" \
    -B "$COLOR_BACKGROUND" \
    -u 2 \
    | zsh

I think that might be better way to do it. In your original way, the script is constantly polling for workspace data, and separately for every workspace. This way, bspwm just tells your script all the data at once,and only if something changes. Your panel_bar looked like this should probably wprk woth it too (I only took a superficial glance though).
« Last Edit: 30. January 2016, 17:20:02 by oberon »

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: Can't get lemonbar to display workspaces
« Reply #2 on: 30. January 2016, 14:42:09 »
Looks very cool, that scriot by the way.
« Last Edit: 30. January 2016, 17:19:48 by oberon »

Offline tanaymkis

  • Jr. Mitglied
  • **
  • Posts: 72
  • I'm new. Be nice!
  • Branch: Stable
  • Desktop: i3
  • Kernel: 3.18.22-1-MANJARO i686
  • Skill: Novice
Re: Can't get lemonbar to display workspaces
« Reply #3 on: 30. January 2016, 15:09:23 »
Thanks ! Now, I just need to get rid of LVDS1 on the right hand site
« Last Edit: 30. January 2016, 17:19:36 by oberon »

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: [Solved]Can't get lemonbar to display workspaces
« Reply #4 on: 30. January 2016, 16:20:40 »
Try commenting out these lines in panel_bar:

Code: [Select]
case $item in
M*)
# active monitor
if [ $num_mon -lt 2 ] ; then
    wm_infos="$wm_infos %{F$COLOR_ACTIVE_MONITOR_FG}%{B$COLOR_ACTIVE_MONITOR_BG}$PADDING${name}$PADDING%{B-}%{F-}  "
fi
;;
m*)
# inactive monitor
if [ $num_mon -gt 1 ] ; then
    wm_infos="$wm_infos %{F$COLOR_INACTIVE_MONITOR_FG}%{B$COLOR_INACTIVE_MONITOR_BG}$PADDING${name}$PADDING%{B-}%{F-}  "
fi
;;

If possible, post screenshots of your finished panel once you get it working how you like it.
« Last Edit: 30. January 2016, 17:19:25 by oberon »

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: [Solved]Can't get lemonbar to display workspaces
« Reply #5 on: 30. January 2016, 16:24:37 »
Also, would you mind posting your panel_config?

forewarning: When you update bspwm-manjaro (or bspwm in general) to version 0.9.1 or greater, you need to replace
Code: [Select]
bspc control --subscribewith
Code: [Select]
bspc subscribe
Syntax changed in the last update.
« Last Edit: 30. January 2016, 17:19:14 by oberon »

Offline tanaymkis

  • Jr. Mitglied
  • **
  • Posts: 72
  • I'm new. Be nice!
  • Branch: Stable
  • Desktop: i3
  • Kernel: 3.18.22-1-MANJARO i686
  • Skill: Novice
Re: [Solved]Can't get lemonbar to display workspaces
« Reply #6 on: 30. January 2016, 16:28:16 »
I already know about that, I use bspwm-git from AUR. There is also node instead of window and a few other changes.

And as for my panel_config, it is attached.

EDIT: Here is the screenshot even though it doesn't look  good.
« Last Edit: 30. January 2016, 17:19:00 by oberon »

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: [Solved]Can't get lemonbar to display workspaces
« Reply #7 on: 31. January 2016, 02:02:18 »
Thanks. I think it is actually rather nice.

Offline tanaymkis

  • Jr. Mitglied
  • **
  • Posts: 72
  • I'm new. Be nice!
  • Branch: Stable
  • Desktop: i3
  • Kernel: 3.18.22-1-MANJARO i686
  • Skill: Novice
Re: [Solved]Can't get lemonbar to display workspaces
« Reply #8 on: 31. January 2016, 03:33:58 »
Thanks Chyrsostomus ,for all your help.

Offline simgin

  • Held Mitglied
  • *****
  • Posts: 774
  • Branch: All.
  • Desktop: XFCE+Alpine Linux, Mate+Fedora, Ubuntu Server + Mate and NoX+LinuxBBQ
  • GPU Card: GeForce 8600M & GT 555M 2GB
  • Skill: Intermediate
Re: [Solved]Can't get lemonbar to display workspaces
« Reply #9 on: 01. February 2016, 01:01:03 »
^ Chrys is right, that scrot is nice, seriously. Less is more!

cheerio
simgin

Offline tanaymkis

  • Jr. Mitglied
  • **
  • Posts: 72
  • I'm new. Be nice!
  • Branch: Stable
  • Desktop: i3
  • Kernel: 3.18.22-1-MANJARO i686
  • Skill: Novice
Re: [Solved]Can't get lemonbar to display workspaces
« Reply #10 on: 02. February 2016, 17:17:47 »
@simgin Thanks , I think it is enough [for now].  ;D