Add bitbar script to show chunkwm workspaces

This commit is contained in:
Adam Goldsmith 2019-05-27 10:22:02 -04:00
parent 01568f1413
commit 98be7e5531
1 changed files with 25 additions and 0 deletions

25
.config/bitbar/chunkwm-ws.1s.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
PATH="/usr/local/bin/:$PATH"
TEAL='\033[0;36m'
RED='\033[0;31m'
NC='\033[0m'
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)
echo ${highlighed}
echo "---"
for i in ~/.chunkwm_layouts/*
do
echo "Load $(basename $i) | terminal=false bash='/usr/local/bin/chunkc' param1='tiling::desktop' param2='--deserialize' param3='$i'"
echo "Save $(basename $i) | alternate=true terminal=false bash='/usr/local/bin/chunkc' param1='tiling::desktop' param2='--serialize' param3='$i'"
done