mirror of
https://github.com/mr0xb/dotfiles.git
synced 2026-08-28 11:54:57 -04:00
updates
This commit is contained in:
parent
bc4d4c403a
commit
715eb53860
57 changed files with 7755 additions and 3 deletions
26
.config/sketchybar/helpers/event_providers.sh
Executable file
26
.config/sketchybar/helpers/event_providers.sh
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
aerospace_workspace_change() {
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
CURRENT_WORKSPACE=$(aerospace list-workspaces --focused)
|
||||
|
||||
args=()
|
||||
while read -r line
|
||||
do
|
||||
if [[ $line =~ (aerospace\.workspace\.[0-9]+) ]]; then
|
||||
WORKSPACE_NUMBER=${line##*.}
|
||||
if [ "$WORKSPACE_NUMBER" = "$CURRENT_WORKSPACE" ]; then
|
||||
args+=(--set "${line}" icon.highlight=on)
|
||||
else
|
||||
args+=(--set "${line}" icon.highlight=off)
|
||||
fi
|
||||
fi
|
||||
done <<< "$(sketchybar --query bar | jq -r '.items[]')"
|
||||
|
||||
[ ${#args[@]} -gt 0 ] && sketchybar "${args[@]}"
|
||||
}
|
||||
|
||||
case "$SENDER" in
|
||||
"aerospace_workspace_change") aerospace_workspace_change
|
||||
;;
|
||||
esac
|
||||
Loading…
Reference in a new issue