mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(sketchybar): rebuild sketchybar config
This commit is contained in:
parent
d93d153827
commit
0af876301c
27 changed files with 615 additions and 1059 deletions
20
platforms/mac/sketchybar/plugins/sound.sh
Executable file
20
platforms/mac/sketchybar/plugins/sound.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
VOLUME=$(osascript -e "output volume of (get volume settings)")
|
||||
MUTED=$(osascript -e "output muted of (get volume settings)")
|
||||
|
||||
if [ "$MUTED" != "false" ]; then
|
||||
ICON=""
|
||||
VOLUME=0
|
||||
else
|
||||
case ${VOLUME} in
|
||||
100) ICON="" ;;
|
||||
[5-9]*) ICON="" ;;
|
||||
[0-9]*) ICON="" ;;
|
||||
*) ICON="" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
sketchybar -m \
|
||||
--set "$NAME" icon=$ICON \
|
||||
--set "$NAME" label="$VOLUME%"
|
||||
Loading…
Add table
Add a link
Reference in a new issue