#!/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