# vim: set filetype=sh : # This is a demo config to showcase some of the most important commands. # It is meant to be changed and configured, as it is intentionally kept sparse. # For a (much) more advanced configuration example see my dotfiles: # https://github.com/FelixKratz/dotfiles PLUGIN_DIR="$HOME/.config/sketchybar/plugins" ##### Bar Appearance ##### # Configuring the general appearance of the bar. # These are only some of the options available. For all options see: # https://felixkratz.github.io/SketchyBar/config/bar # If you are looking for other colors, see the color picker: # https://felixkratz.github.io/SketchyBar/config/tricks#color-picker sketchybar --bar position=top \ height=32 \ blur_radius=30 \ color=0x00000000 \ padding_right=10 \ padding_left=10 \ y_offset=3 default=( icon.font="ComicShannsMono Nerd Font:Regular:11.0" label.font="ComicShannsMono Nerd Font:Bold:11.0" padding_left=1 padding_right=1 icon.color=$PRIMARY_COLOUR label.color=$PRIMARY_COLOUR icon.padding_left=10 icon.padding_right=1 label.padding_left=5 label.padding_right=10 background.padding_left=2 background.padding_right=2 background.corner_radius=10 ) sketchybar --default "${default[@]}" ##### Adding Mission Control Space Indicators ##### # Let's add some mission control spaces: # https://felixkratz.github.io/SketchyBar/config/components#space----associate-mission-control-spaces-with-an-item # to indicate active and available mission control spaces. SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9" "10") for i in "${!SPACE_ICONS[@]}" do sid="$(($i+1))" space=( icon.color=$PRIMARY_COLOUR background.color=$BACKGROUND_COLOUR space="$sid" icon="${SPACE_ICONS[i]}" icon.padding_left=12 icon.padding_right=12 background.height=32 background.padding_left=0 background.padding_right=0 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 ##### Adding Left Items ##### # We add some regular items to the left side of the bar, where # 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 sketchybar --add item front_app left \ --set front_app icon.drawing=off \ label.color=$PRIMARY_COLOUR \ padding_left=10 \ label.padding_left=10 \ background.color=$BACKGROUND_COLOUR \ background.height=32 \ script="$PLUGIN_DIR/front_app.sh" \ --subscribe front_app front_app_switched \ ##### Adding Right Items ##### sketchybar --add item clock right \ --set clock \ update_freq=10 \ icon.color=$PRIMARY_COLOUR \ label.color=$PRIMARY_COLOUR \ background.color=$BACKGROUND_COLOUR \ background.height=32 \ label.padding_right=20 \ script="$PLUGIN_DIR/clock.sh" sketchybar --add item battery right \ --set battery update_freq=10 \ script="$PLUGIN_DIR/battery.sh" \ icon.color=$SECONDARY_COLOUR \ label.color=$SECONDARY_COLOUR \ background.color=$BACKGROUND_COLOUR \ background.height=32 \ sketchybar --add item backlight right \ --set backlight icon="" \ icon.color=$TERTIARY_COLOUR \ label.color=$TERTIARY_COLOUR \ background.color=$BACKGROUND_COLOUR \ background.height=32 \ script="$PLUGIN_DIR/backlight.sh" \ --subscribe backlight brightness_change \ sketchybar --add item audio right \ --set audio icon = "" \ icon.color=$TERTIARY_COLOUR \ label.color=$TERTIARY_COLOUR \ background.color=$BACKGROUND_COLOUR \ background.height=32 \ script="$PLUGIN_DIR/volume.sh" \ --subscribe audio volume_change \ ##### Force all scripts to run the first time (never do this in a script) ##### sketchybar --update