diff --git a/config/bitbar/bin/chunkwm.1s.zsh b/config/bitbar/bin/chunkwm.1s.zsh new file mode 100755 index 0000000..33a03ae --- /dev/null +++ b/config/bitbar/bin/chunkwm.1s.zsh @@ -0,0 +1,31 @@ +#!/bin/zsh + +# chunkwm mode +# v1.0 +# Danielle McLean +# 00dani +# Display current desktop ID and layout from chunkwm. +# brew,chunkwm + +# For info about chunkwm, see: https://github.com/koekeishiya/chunkwm + +chunkc=/usr/local/bin/chunkc + +modes=( + bsp 🌳 + monocle 🔍 + float ⛵ +) +typeset -A icons +icons=($modes) + +id=$($chunkc tiling::query --desktop id) +mode=$($chunkc tiling::query --desktop mode) +print -l "$icons[$mode] $id" "---" +for m i in $modes; do + if [[ $mode = $m ]]; then + print $i $m + else + print "$i $m | terminal=false bash=$chunkc param1=tiling::desktop param2=--layout param3=$m" + fi +done