#+title: SketchyBar Configuration Set the plugin directory. #+begin_src sh :tangle ~/.config/sketchybar/sketchybarrc :mkdirp yes :tangle-mode o755 PLUGIN_DIR="$CONFIG_DIR/plugins" #+end_src Place the bar at the of the screen with full transparency. #+begin_src sh :tangle ~/.config/sketchybar/sketchybarrc :mkdirp yes :tangle-mode o755 sketchybar --bar position=top height=40 blur_radius=30 color=0x00000000 #+end_src Add small padding to left and right, use Symbols font for icons and Source Code Pro for text. Make all text white and add padding on left and right for labels and icons. #+begin_src sh :tangle ~/.config/sketchybar/sketchybarrc :mkdirp yes :tangle-mode o755 default=( padding_left=5 padding_right=5 icon.font="Symbols Nerd Font:Bold:17.0" label.font="Sauce Code Pro Nerd Font:Bold:14.0" icon.color=0xffffffff label.color=0xffffffff icon.padding_left=4 icon.padding_right=4 label.padding_left=4 label.padding_right=4 ) sketchybar --default "${default[@]}" #+end_src Add clickable space icons for 10 spaces. #+begin_src sh :tangle ~/.config/sketchybar/sketchybarrc :mkdirp yes :tangle-mode o755 SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9" "10") for i in "${!SPACE_ICONS[@]}" do sid="$(($i+1))" space=( space="$sid" icon="${SPACE_ICONS[i]}" icon.padding_left=7 icon.padding_right=7 background.color=0x40ffffff background.corner_radius=5 background.height=25 label.drawing=off script="$PLUGIN_DIR/space.sh" click_script="yabai -m space --focus $sid" ) sketchybar --add space space."$sid" left --set space."$sid" "${space[@]}" done #+end_src Add a chevron before listing the open application. #+begin_src sh :tangle ~/.config/sketchybar/sketchybarrc :mkdirp yes :tangle-mode o755 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 #+end_src Display a clock, volume, battery, CPU usage, and memory usage on the right. #+begin_src sh :tangle ~/.config/sketchybar/sketchybarrc :mkdirp yes :tangle-mode o755 sketchybar --add item clock 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 cpu right \ --set cpu update_freq=10 script="$PLUGIN_DIR/cpu.sh" \ --add item mem right \ --set mem update_freq=10 script="$PLUGIN_DIR/mem.sh" sketchybar --update #+end_src