diff --git a/.config/bitbar/chunkwm-ws.1s.sh b/.config/bitbar/chunkwm-ws.1s.sh index ec72cd9..e5477a3 100755 --- a/.config/bitbar/chunkwm-ws.1s.sh +++ b/.config/bitbar/chunkwm-ws.1s.sh @@ -10,12 +10,21 @@ current_desktop=$(chunkc tiling::query --desktop id) last_desktop=$(chunkc get _last_active_desktop) monitor=$(chunkc tiling::query --monitor-for-desktop $current_desktop) desktops=$(chunkc tiling::query --desktops-for-monitor $monitor) -highlighed=$(awk '{ - gsub("'${current_desktop}'", "'${TEAL}${current_desktop}${NC}'"); - gsub("'${last_desktop}'", "'${RED}${last_desktop}${NC}'"); - print; }' <<< $desktops) +highlighted="" +for desktop in $desktops +do + if (( $desktop == $current_desktop )) + then + highlighted+=" ${TEAL}$desktop${NC}" + elif (( $desktop == $last_desktop )) + then + highlighted+=" ${RED}$desktop${NC}" + else + highlighted+=" $desktop" + fi +done -echo ${highlighed} +echo -e ${highlighted} echo "---" for i in ~/.chunkwm_layouts/* do