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#?}
case $id in
[mM]*)
[ "$num_mon" -lt 2 ] && shift && continue
case $id in
m*) # monitor
_FG=$COLOR_MONITOR_FG
_BG=$COLOR_MONITOR_BG
;;
M*) # focused monitor
_FG=$COLOR_FOCUSED_MONITOR_FG
_BG=$COLOR_FOCUSED_MONITOR_BG
;;
esac
wm="${wm}%{F$_FG}%{B$_BG}%{A:bspc monitor -f ${name}:} ${name} %{A}%{B-}%{F-}"
M="$name"
[[ $M != "C" ]] && M=
# [ "$num_mon" -lt 2 ] && shift && continue
# case $id in
# m*) # monitor
# _FG=$COLOR_MONITOR_FG
# _BG=$COLOR_MONITOR_BG
# ;;
# M*) # focused monitor
# _FG=$COLOR_FOCUSED_MONITOR_FG
# _BG=$COLOR_FOCUSED_MONITOR_BG
# ;;
# esac
# wm="${wm}%{F$_FG}%{B$_BG}%{A:bspc monitor -f ${name}:} ${name} %{A}%{B-}%{F-}"
;;
[fFoOuU]*)
if [[ $M ]]; then
icon="$ICON_NONE"
case $id in
f*) # free desktop
@ -118,6 +121,7 @@ parse() {
esac
# 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
shift

View file

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