commit e06409ff8b00b288af3c47e9f15e6190dc258e0f
parent bde7ed9a6343c4f8dd549e397c9c8c79b2d7a721
Author: jacobsGit <JacobDoesLinux@protonmail.com>
Date: Mon, 20 Jan 2020 21:13:31 -0800
made another lemonbar config
Diffstat:
2 files changed, 77 insertions(+), 7 deletions(-)
diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc
@@ -10,11 +10,11 @@ bspc monitor -d general browsing writing coding video editing music
# padding and gaps
-bspc config left_padding 8
-bspc config right_padding 8
-bspc config top_padding 8
-bspc config bottom_padding 8
-bspc config window_gap 8
+bspc config left_padding 3
+bspc config right_padding 3
+bspc config top_padding 3
+bspc config bottom_padding 25
+bspc config window_gap 3
@@ -33,7 +33,7 @@ bspc config split_ratio 0.5
# monocle settings
bspc config single_monocle false
bspc config borderless_monocle false
-bspc config gapless_monocle false
+bspc config gapless_monocle true
@@ -47,6 +47,7 @@ bspc rule -a qutebrowser desktop='^2' state=fullscreen follow=on
# init proccesses
xrdb -load ~/.Xresources
-
killall ncmpcpp
st -c ncmpcpp -e ncmpcpp &
+killall lemonbar
+lemon &
diff --git a/lemonbar/bin/lemon b/lemonbar/bin/lemon
@@ -0,0 +1,69 @@
+#!/bin/dash
+# Jacob Edwards, 2020
+# complete, functianal, lemonbar config.
+
+
+# kill lemonbar if it's running
+if [ -n "$( pidof -s lemonbar )" ]; then
+ killall lemonbar
+ bspc config bottom_padding 3
+ exit 0
+fi
+
+
+bspc config bottom_padding 25
+bspwm_workspace(){
+ printf '%%{F#f5a}'
+ bspc query --desktops --desktop --names
+}
+
+
+atime(){
+ date '+%%{F#444}%R'
+}
+
+
+adate(){
+ date '+%%{F#444}%d/%m/%y'
+}
+
+
+mpd_playing(){
+ printf "%%{F#6f4f2f}$( mpc status | head -n 2 | tail -n 1 | awk '{print $1}' ) %%{F#6f3f3f}$(mpc current)"
+}
+
+
+battery(){
+ batdir='/sys/class/power_supply/BAT0'
+
+ # I think my battery is weird, it displays unknown when charging.
+ if [ "$( cat "$batdir/status" )" = 'Unknown' ]; then
+ local prefix='^%%{F#3fafaf}'
+ else
+ local prefix='- %%{F#8f3f3f}'
+ fi
+
+ local perc="$( cat "$batdir/capacity" )"
+ printf "%%{F#777}$prefix$perc%%{F#888}%%"
+}
+
+
+
+
+while true; do
+ ws="$( bspwm_workspace )"
+ adate="$( adate )"
+ atime="$( atime )"
+ mpd="$( mpd_playing )"
+ bat="$( battery )"
+
+ echo "%{l} $atime $ws%{c}$mpd %{r}$adate $bat "
+ sleep 0.25
+done | lemonbar\
+ -f Roboto Medium\
+ -F '#ffffff'\
+ -B '#000000'\
+ -g 'x22+0+0'\
+ -b\
+ -a 0\
+ -o 1