os/arch (lemonbar): only show main monitor desktops in bar

This commit is contained in:
Henrik Lissner 2016-12-25 14:22:50 -05:00
parent af4e5aa3cc
commit af0845be6d
2 changed files with 52 additions and 48 deletions

View file

@ -71,20 +71,23 @@ parse() {
name=${id#?} name=${id#?}
case $id in case $id in
[mM]*) [mM]*)
[ "$num_mon" -lt 2 ] && shift && continue M="$name"
case $id in [[ $M != "C" ]] && M=
m*) # monitor # [ "$num_mon" -lt 2 ] && shift && continue
_FG=$COLOR_MONITOR_FG # case $id in
_BG=$COLOR_MONITOR_BG # m*) # monitor
;; # _FG=$COLOR_MONITOR_FG
M*) # focused monitor # _BG=$COLOR_MONITOR_BG
_FG=$COLOR_FOCUSED_MONITOR_FG # ;;
_BG=$COLOR_FOCUSED_MONITOR_BG # M*) # focused monitor
;; # _FG=$COLOR_FOCUSED_MONITOR_FG
esac # _BG=$COLOR_FOCUSED_MONITOR_BG
wm="${wm}%{F$_FG}%{B$_BG}%{A:bspc monitor -f ${name}:} ${name} %{A}%{B-}%{F-}" # ;;
# esac
# wm="${wm}%{F$_FG}%{B$_BG}%{A:bspc monitor -f ${name}:} ${name} %{A}%{B-}%{F-}"
;; ;;
[fFoOuU]*) [fFoOuU]*)
if [[ $M ]]; then
icon="$ICON_NONE" icon="$ICON_NONE"
case $id in case $id in
f*) # free desktop f*) # free desktop
@ -118,6 +121,7 @@ parse() {
esac esac
# eval "icon=\$ICON_$(echo ${name#??} | tr '[:lower:]' '[:upper:]')" # eval "icon=\$ICON_$(echo ${name#??} | tr '[:lower:]' '[:upper:]')"
wm="${wm}%{F$_FG}%{B$_BG}%{A:bspc desktop -f ${name}:} ${icon:-$name} %{A}%{B-}%{F-}" wm="${wm}%{F$_FG}%{B$_BG}%{A:bspc desktop -f ${name}:} ${icon:-$name} %{A}%{B-}%{F-}"
fi
;; ;;
esac esac
shift shift

View file

@ -21,10 +21,10 @@ COLOR_DIM="#155872"
COLOR_ALTBG="#FF${bg#?}" COLOR_ALTBG="#FF${bg#?}"
COLOR_NONE="#00${bg#?}" COLOR_NONE="#00${bg#?}"
COLOR_MONITOR_FG="#8dbcdf" COLOR_MONITOR_FG="${COLOR_5}"
COLOR_MONITOR_BG="${COLOR_0}" COLOR_MONITOR_BG="${COLOR_0}"
COLOR_FOCUSED_MONITOR_FG="#b1d0e8" COLOR_FOCUSED_MONITOR_FG="${COLOR_0}"
COLOR_FOCUSED_MONITOR_BG="${COLOR_4}" COLOR_FOCUSED_MONITOR_BG="${COLOR_5}"
COLOR_FREE_FG="${COLOR_DIM}" COLOR_FREE_FG="${COLOR_DIM}"
COLOR_FREE_BG="${COLOR_BG}" COLOR_FREE_BG="${COLOR_BG}"