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,53 +71,57 @@ 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]*)
icon="$ICON_NONE" if [[ $M ]]; then
case $id in icon="$ICON_NONE"
f*) # free desktop case $id in
_FG=$COLOR_FREE_FG f*) # free desktop
_BG=$COLOR_FREE_BG _FG=$COLOR_FREE_FG
;; _BG=$COLOR_FREE_BG
F*) # focused free desktop ;;
_FG=$COLOR_FOCUSED_FREE_FG F*) # focused free desktop
_BG=$COLOR_FOCUSED_FREE_BG _FG=$COLOR_FOCUSED_FREE_FG
;; _BG=$COLOR_FOCUSED_FREE_BG
o*) # occupied desktop ;;
_FG=$COLOR_OCCUPIED_FG o*) # occupied desktop
_BG=$COLOR_OCCUPIED_BG _FG=$COLOR_OCCUPIED_FG
icon="$ICON_FULL" _BG=$COLOR_OCCUPIED_BG
;; icon="$ICON_FULL"
O*) # focused occupied desktop ;;
_FG=$COLOR_FOCUSED_OCCUPIED_FG O*) # focused occupied desktop
_BG=$COLOR_FOCUSED_OCCUPIED_BG _FG=$COLOR_FOCUSED_OCCUPIED_FG
icon="$ICON_FULL" _BG=$COLOR_FOCUSED_OCCUPIED_BG
;; icon="$ICON_FULL"
u*) # urgent desktop ;;
_FG=$COLOR_URGENT_FG u*) # urgent desktop
_BG=$COLOR_URGENT_BG _FG=$COLOR_URGENT_FG
icon="$ICON_FULL" _BG=$COLOR_URGENT_BG
;; icon="$ICON_FULL"
U*) # focused urgent desktop ;;
_FG=$COLOR_FOCUSED_URGENT_FG U*) # focused urgent desktop
_BG=$COLOR_FOCUSED_URGENT_BG _FG=$COLOR_FOCUSED_URGENT_FG
icon="$ICON_FULL" _BG=$COLOR_FOCUSED_URGENT_BG
;; icon="$ICON_FULL"
esac ;;
# eval "icon=\$ICON_$(echo ${name#??} | tr '[:lower:]' '[:upper:]')" esac
wm="${wm}%{F$_FG}%{B$_BG}%{A:bspc desktop -f ${name}:} ${icon:-$name} %{A}%{B-}%{F-}" # eval "icon=\$ICON_$(echo ${name#??} | tr '[:lower:]' '[:upper:]')"
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}"