mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
style: format shell scripts
This commit is contained in:
parent
8c5babe80a
commit
76b5fd4118
18 changed files with 231 additions and 242 deletions
|
|
@ -42,9 +42,8 @@ sketchybar --default "${default[@]}"
|
|||
# to indicate active and available mission control spaces.
|
||||
|
||||
SPACE_ICONS=("" "" "" "" "" "" "7" "8" "9" "10")
|
||||
for i in "${!SPACE_ICONS[@]}"
|
||||
do
|
||||
sid="$(($i+1))"
|
||||
for i in "${!SPACE_ICONS[@]}"; do
|
||||
sid="$(($i + 1))"
|
||||
space=(
|
||||
space="$sid"
|
||||
icon="${SPACE_ICONS[i]}"
|
||||
|
|
@ -65,10 +64,10 @@ done
|
|||
# only the properties deviating from the current defaults need to be set
|
||||
|
||||
sketchybar --add item chevron left \
|
||||
--set chevron icon= label.drawing=off \
|
||||
--add item front_app left \
|
||||
--set front_app icon.drawing=off script="$PLUGIN_DIR/front_app.sh" \
|
||||
--subscribe front_app front_app_switched
|
||||
--set chevron icon= label.drawing=off \
|
||||
--add item front_app left \
|
||||
--set front_app icon.drawing=off script="$PLUGIN_DIR/front_app.sh" \
|
||||
--subscribe front_app front_app_switched
|
||||
|
||||
##### Adding Right Items #####
|
||||
# In the same way as the left items we can add items to the right side.
|
||||
|
|
@ -82,37 +81,36 @@ sketchybar --add item chevron left \
|
|||
# https://felixkratz.github.io/SketchyBar/config/events
|
||||
|
||||
sketchybar --add item clock center \
|
||||
--set clock update_freq=10 icon= script="$PLUGIN_DIR/clock.sh" \
|
||||
--add item volume right \
|
||||
--set volume script="$PLUGIN_DIR/volume.sh" \
|
||||
--subscribe volume volume_change \
|
||||
--add item battery right \
|
||||
--set battery update_freq=120 script="$PLUGIN_DIR/battery.sh" \
|
||||
--subscribe battery system_woke power_source_change \
|
||||
--add item apple_music right
|
||||
--set clock update_freq=10 icon= script="$PLUGIN_DIR/clock.sh" \
|
||||
--add item volume right \
|
||||
--set volume script="$PLUGIN_DIR/volume.sh" \
|
||||
--subscribe volume volume_change \
|
||||
--add item battery right \
|
||||
--set battery update_freq=120 script="$PLUGIN_DIR/battery.sh" \
|
||||
--subscribe battery system_woke power_source_change \
|
||||
--add item apple_music right
|
||||
|
||||
sketchybar --add item music right
|
||||
sketchybar --set music \
|
||||
script="$PLUGIN_DIR/music.sh" \
|
||||
update_freq=5 \
|
||||
label.color=0xffd7ba7d \
|
||||
background.corner_radius=5
|
||||
script="$PLUGIN_DIR/music.sh" \
|
||||
update_freq=5 \
|
||||
label.color=0xffd7ba7d \
|
||||
background.corner_radius=5
|
||||
|
||||
##### Force all scripts to run the first time (never do this in a script) #####
|
||||
sketchybar --update
|
||||
|
||||
|
||||
sketchybar --add event aerospace_workspace_change
|
||||
|
||||
for sid in $(aerospace list-workspaces --all); do
|
||||
sketchybar --add item space.$sid left \
|
||||
--subscribe space.$sid aerospace_workspace_change \
|
||||
--set space.$sid \
|
||||
background.color=0x44ffffff \
|
||||
background.corner_radius=5 \
|
||||
background.height=20 \
|
||||
background.drawing=off \
|
||||
label="$sid" \
|
||||
click_script="aerospace workspace $sid" \
|
||||
script="$CONFIG_DIR/plugins/aerospace.sh $sid"
|
||||
sketchybar --add item space.$sid left \
|
||||
--subscribe space.$sid aerospace_workspace_change \
|
||||
--set space.$sid \
|
||||
background.color=0x44ffffff \
|
||||
background.corner_radius=5 \
|
||||
background.height=20 \
|
||||
background.drawing=off \
|
||||
label="$sid" \
|
||||
click_script="aerospace workspace $sid" \
|
||||
script="$CONFIG_DIR/plugins/aerospace.sh $sid"
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue