diff options
Diffstat (limited to 'mac/.config/sketchybar.mon/sketchybar/items')
9 files changed, 284 insertions, 0 deletions
diff --git a/mac/.config/sketchybar.mon/sketchybar/items/apple.sh b/mac/.config/sketchybar.mon/sketchybar/items/apple.sh new file mode 100755 index 0000000..fde05b4 --- /dev/null +++ b/mac/.config/sketchybar.mon/sketchybar/items/apple.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +POPUP_OFF='sketchybar --set apple.logo popup.drawing=off' +POPUP_CLICK_SCRIPT='sketchybar --set $NAME popup.drawing=toggle' + +apple_logo=( + icon=$APPLE + icon.font="$FONT:Black:16.0" + icon.color=$WHITE + padding_right=15 + label.drawing=off + click_script="$POPUP_CLICK_SCRIPT" + popup.height=35 +) + +apple_prefs=( + icon=$PREFERENCES + label="Preferences" + click_script="open -a 'System Preferences'; $POPUP_OFF" +) + +apple_activity=( + icon=$ACTIVITY + label="Activity" + click_script="open -a 'Activity Monitor'; $POPUP_OFF" +) + +apple_lock=( + icon=$LOCK + label="Lock Screen" + click_script="pmset displaysleepnow; $POPUP_OFF" +) + +sketchybar --add item apple.logo left \ + --set apple.logo "${apple_logo[@]}" \ + \ + --add item apple.prefs popup.apple.logo \ + --set apple.prefs "${apple_prefs[@]}" \ + \ + --add item apple.activity popup.apple.logo \ + --set apple.activity "${apple_activity[@]}" \ + \ + --add item apple.lock popup.apple.logo \ + --set apple.lock "${apple_lock[@]}" diff --git a/mac/.config/sketchybar.mon/sketchybar/items/battery.sh b/mac/.config/sketchybar.mon/sketchybar/items/battery.sh new file mode 100755 index 0000000..7955060 --- /dev/null +++ b/mac/.config/sketchybar.mon/sketchybar/items/battery.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +battery=( + script="$PLUGIN_DIR/battery.sh" + icon.font="$FONT:Regular:19.0" + padding_right=3 + padding_left=0 + label.drawing=off + update_freq=120 + updates=on +) +sketchybar --add item battery right \ + --set battery "${battery[@]}"\ + icon.font.size=15 update_freq=120 script="$PLUGIN_DIR/battery.sh" \ + --subscribe battery power_source_change system_woke + diff --git a/mac/.config/sketchybar.mon/sketchybar/items/calendar.sh b/mac/.config/sketchybar.mon/sketchybar/items/calendar.sh new file mode 100755 index 0000000..62aadc8 --- /dev/null +++ b/mac/.config/sketchybar.mon/sketchybar/items/calendar.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +calendar=( + icon= + icon.font="$FONT:Black:12.0" + icon.padding_right=0 + label.align=right + padding_left=15 + update_freq=30 + script="$PLUGIN_DIR/calendar.sh" + click_script="$PLUGIN_DIR/zen.sh" +) + +sketchybar --add item calendar right \ + --set calendar "${calendar[@]}" \ + --subscribe calendar system_woke diff --git a/mac/.config/sketchybar.mon/sketchybar/items/cpu.sh b/mac/.config/sketchybar.mon/sketchybar/items/cpu.sh new file mode 100755 index 0000000..249595d --- /dev/null +++ b/mac/.config/sketchybar.mon/sketchybar/items/cpu.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +cpu_top=( + label.font="$FONT:Semibold:7" + label=CPU + icon.drawing=off + width=0 + padding_right=15 + y_offset=6 +) + +cpu_percent=( + label.font="$FONT:Heavy:12" + label=CPU + y_offset=-4 + padding_right=15 + width=55 + icon.drawing=off + update_freq=4 + mach_helper="$HELPER" +) + +cpu_sys=( + width=0 + graph.color=$RED + graph.fill_color=$RED + label.drawing=off + icon.drawing=off + background.height=30 + background.drawing=on + background.color=$TRANSPARENT +) + +cpu_user=( + graph.color=$BLUE + label.drawing=off + icon.drawing=off + background.height=30 + background.drawing=on + background.color=$TRANSPARENT +) + +sketchybar --add item cpu.top right \ + --set cpu.top "${cpu_top[@]}" \ + \ + --add item cpu.percent right \ + --set cpu.percent "${cpu_percent[@]}" \ + \ + --add graph cpu.sys right 75 \ + --set cpu.sys "${cpu_sys[@]}" \ + \ + --add graph cpu.user right 75 \ + --set cpu.user "${cpu_user[@]}" diff --git a/mac/.config/sketchybar.mon/sketchybar/items/front_app.sh b/mac/.config/sketchybar.mon/sketchybar/items/front_app.sh new file mode 100755 index 0000000..77f79ff --- /dev/null +++ b/mac/.config/sketchybar.mon/sketchybar/items/front_app.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +front_app=( + label.font="$FONT:Black:12.0" + icon.background.drawing=on + display=active + script="$PLUGIN_DIR/front_app.sh" + click_script="open -a 'Mission Control'" +) +sketchybar --add item front_app left \ + --set front_app "${front_app[@]}" \ + --subscribe front_app front_app_switched + diff --git a/mac/.config/sketchybar.mon/sketchybar/items/input_source.sh b/mac/.config/sketchybar.mon/sketchybar/items/input_source.sh new file mode 100755 index 0000000..c72f38f --- /dev/null +++ b/mac/.config/sketchybar.mon/sketchybar/items/input_source.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +sketchybar --add item input_source right +sketchybar --set input_source \ + icon.font="$FONT:Regular:20.0" \ + script="$PLUGIN_DIR/get_input_source.sh" \ + icon.color=0xffffffff \ + update_freq=1 + + diff --git a/mac/.config/sketchybar.mon/sketchybar/items/spaces.sh b/mac/.config/sketchybar.mon/sketchybar/items/spaces.sh new file mode 100755 index 0000000..d4284aa --- /dev/null +++ b/mac/.config/sketchybar.mon/sketchybar/items/spaces.sh @@ -0,0 +1,81 @@ +#!/bin/sh + +#SPACE_ICONS=("1" "2" "3" "4") + +# Destroy space on right click, focus space on left click. +# New space by left clicking separator (>) + +sketchybar --add event aerospace_workspace_change +#echo $(aerospace list-workspaces --monitor 1 --visible no --empty no) >> ~/aaaa + +for m in $(aerospace list-monitors | awk '{print $1}'); do + for i in $(aerospace list-workspaces --monitor $m); do + sid=$i + space=( + space="$sid" + icon="$sid" + icon.highlight_color=$RED + icon.padding_left=10 + icon.padding_right=10 + display=$m + padding_left=2 + padding_right=2 + label.padding_right=20 + label.color=$GREY + label.highlight_color=$WHITE + label.font="sketchybar-app-font:Regular:16.0" + label.y_offset=-1 + background.color=$BACKGROUND_1 + background.border_color=$BACKGROUND_2 + script="$PLUGIN_DIR/space.sh" + ) + + sketchybar --add space space.$sid left \ + --set space.$sid "${space[@]}" \ + --subscribe space.$sid mouse.clicked + + apps=$(aerospace list-windows --workspace $sid | awk -F'|' '{gsub(/^ *| *$/, "", $2); print $2}') + + icon_strip=" " + if [ "${apps}" != "" ]; then + while read -r app + do + icon_strip+=" $($CONFIG_DIR/plugins/icon_map.sh "$app")" + done <<< "${apps}" + else + icon_strip=" —" + fi + + sketchybar --set space.$sid label="$icon_strip" + done + + for i in $(aerospace list-workspaces --monitor $m --empty); do + sketchybar --set space.$i display=0 + done + +done + + +space_creator=( + icon= + icon.font="$FONT:Heavy:16.0" + padding_left=10 + padding_right=8 + label.drawing=off + display=active + #click_script='yabai -m space --create' + script="$PLUGIN_DIR/space_windows.sh" + # script="$PLUGIN_DIR/aerospace.sh" + icon.color=$WHITE +) + +# sketchybar --add item space_creator left \ +# --set space_creator "${space_creator[@]}" \ +# --subscribe space_creator space_windows_change +sketchybar --add item space_creator left \ + --set space_creator "${space_creator[@]}" \ + --subscribe space_creator aerospace_workspace_change + +# sketchybar --add item change_windows left \ +# --set change_windows script="$PLUGIN_DIR/change_windows.sh" \ +# --subscribe change_windows space_changes diff --git a/mac/.config/sketchybar.mon/sketchybar/items/volume.sh b/mac/.config/sketchybar.mon/sketchybar/items/volume.sh new file mode 100755 index 0000000..bc9466d --- /dev/null +++ b/mac/.config/sketchybar.mon/sketchybar/items/volume.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +volume_slider=( + script="$PLUGIN_DIR/volume.sh" + updates=on + label.drawing=off + icon.drawing=off + slider.highlight_color=$BLUE + slider.background.height=5 + slider.background.corner_radius=3 + slider.background.color=$BACKGROUND_2 + slider.knob= + slider.knob.drawing=on +) + +volume_icon=( + click_script="$PLUGIN_DIR/volume_click.sh" + padding_left=10 + icon=$VOLUME_100 + icon.width=0 + icon.align=left + icon.color=$GREY + icon.font="$FONT:Regular:14.0" + label.width=25 + label.align=left + label.font="$FONT:Regular:14.0" +) + +status_bracket=( + background.color=$BACKGROUND_1 + background.border_color=$BACKGROUND_2 +) + +sketchybar --add slider volume right \ + --set volume "${volume_slider[@]}" \ + --subscribe volume volume_change \ + mouse.clicked \ + --add item volume_icon right \ + --set volume_icon "${volume_icon[@]}" + +sketchybar --add bracket status brew github.bell wifi volume_icon \ + --set status "${status_bracket[@]}" + diff --git a/mac/.config/sketchybar.mon/sketchybar/items/weather.sh b/mac/.config/sketchybar.mon/sketchybar/items/weather.sh new file mode 100755 index 0000000..33b08d1 --- /dev/null +++ b/mac/.config/sketchybar.mon/sketchybar/items/weather.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +sketchybar --add item weather right \ + --set weather \ + script="$PLUGIN_DIR/weather.sh" \ + update_freq=1500 \ + --subscribe weather mouse.clicked + |
