diff --git a/.spectrwm.conf b/.spectrwm.conf index d0f7510..5c43430 100644 --- a/.spectrwm.conf +++ b/.spectrwm.conf @@ -43,7 +43,7 @@ bar_font_color[1] = rgb:bb/c5/ff, rgb:e1/ac/ff, rgb:dd/ff/a7, rgb:ff/8b/92, r bar_font_color_selected = black bar_font = Mononoki Nerd Font:size=9, JoyPixels:size=9 bar_justify = center -bar_format = +|L+1<+N:+I +S (+D) +W +|R+A+1<+@fg=5; %a %b %d %R +bar_format = +|L+1<+N:+I +S (+D) +W +|R+A+1<+@fg=5; %a %b %d [%R] workspace_indicator = listcurrent,listactive,markcurrent,printnames bar_at_bottom = 0 stack_enabled = 1 @@ -93,7 +93,7 @@ name = ws[9]:gfx modkey = Mod4 # This allows you to include pre-defined key bindings for your keyboard layout. -keyboard_mapping = ~/.spectrwm_us.conf +# keyboard_mapping = ~/.spectrwm_us.conf # PROGRAMS diff --git a/baraction.sh b/baraction.sh index 8edb402..8680528 100755 --- a/baraction.sh +++ b/baraction.sh @@ -1,12 +1,6 @@ #!/bin/bash # baraction.sh for spectrwm status bar -## DATE -dte() { - dte="$(date +"%A, %B %d %l:%M%p")" - echo -e "$dte" -} - ## DISK hdd() { hdd="$(df -h | awk 'NR==4{print $3, $5}')" @@ -15,7 +9,7 @@ hdd() { ## RAM mem() { - mem=`free | awk '/Mem/ {printf "%d MiB/%d MiB\n", $3 / 1024.0, $2 / 1024.0 }'` + mem=`free | awk '/Mem/ {printf "%dM/%dM\n", $3 / 1024.0, $2 / 1024.0 }'` echo -e "$mem" } @@ -32,13 +26,18 @@ cpu() { ## VOLUME vol() { - vol=`amixer get Master | awk -F'[][]' 'END{ print $4":"$2 }'` + vol=`amixer get Master | awk -F'[][]' 'END{ print $4":"$2 }' | sed 's/on://g'` echo -e "VOL: $vol" } -SLEEP_SEC=5 +SLEEP_SEC=3 #loops forever outputting a line every SLEEP_SEC secs + +# It seems that we are limited to how many characters can be displayed via +# the baraction script output. And the the markup tags count in that limit. +# So I would love to add more functions to this script but it makes the +# echo output too long to display correctly. while :; do - echo "+@fg=1; +@fn=1;💻+@fn=0; $(cpu) +@fg=0; | +@fg=2; +@fn=1;💾+@fn=0; $(mem) +@fg=0; | +@fg=3; +@fn=1;💿+@fn=0; $(hdd) +@fg=0; | +@fg=4; +@fn=1;🔈+@fn=0; $(vol) +@fg=0; |" + echo "+@fg=1; +@fn=1;💻+@fn=0; $(cpu) +@fg=0; | +@fg=2; +@fn=1;💾+@fn=0; $(mem) +@fg=0; | +@fg=3; +@fn=1;💿+@fn=0; $(hdd) +@fg=0; | +@fg=4; +@fn=1;🔈+@fn=0; $(vol) +@fg=0; |" sleep $SLEEP_SEC done