summaryrefslogtreecommitdiff
path: root/mac/.config/sketchybar.allapp/sketchybarrc
diff options
context:
space:
mode:
Diffstat (limited to 'mac/.config/sketchybar.allapp/sketchybarrc')
-rwxr-xr-xmac/.config/sketchybar.allapp/sketchybarrc105
1 files changed, 105 insertions, 0 deletions
diff --git a/mac/.config/sketchybar.allapp/sketchybarrc b/mac/.config/sketchybar.allapp/sketchybarrc
new file mode 100755
index 0000000..cd46900
--- /dev/null
+++ b/mac/.config/sketchybar.allapp/sketchybarrc
@@ -0,0 +1,105 @@
+#!/bin/bash
+
+source "$CONFIG_DIR/colors.sh" # Loads all defined colors
+source "$CONFIG_DIR/icons.sh" # Loads all defined icons
+
+ITEM_DIR="$CONFIG_DIR/items" # Directory where the items are configured
+PLUGIN_DIR="$CONFIG_DIR/plugins" # Directory where all the plugin scripts are stored
+
+FONT="SF Pro" # Needs to have Regular, Bold, Semibold, Heavy and Black variants
+PADDINGS=3 # All paddings use this value (icon, label, background)
+
+# aerospace setting
+AEROSPACE_FOCUSED_MONITOR_NO=$(aerospace list-workspaces --focused)
+AEROSPACE_LIST_OF_WINDOWS_IN_FOCUSED_MONITOR=$(aerospace list-windows --workspace $AEROSPACE_FOCUSED_MONITOR_NO | awk -F'|' '{gsub(/^ *| *$/, "", $2); print $2}')
+
+# Setting up and starting the helper process
+HELPER=git.felix.helper
+killall helper
+(cd $CONFIG_DIR/helper && make)
+$CONFIG_DIR/helper/helper $HELPER > /dev/null 2>&1 &
+
+# Unload the macOS on screen indicator overlay for volume change
+launchctl unload -F /System/Library/LaunchAgents/com.apple.OSDUIHelper.plist > /dev/null 2>&1 &
+
+# Setting up the general bar appearance of the bar
+bar=(
+ height=45
+ color=$BAR_COLOR
+ border_width=2
+ border_color=$BAR_BORDER_COLOR
+ shadow=off
+ position=top
+ sticky=on
+ padding_right=10
+ padding_left=10
+ y_offset=-5
+ margin=-2
+ topmost=window
+ color=0x00000000
+ border_color=0x00000000
+)
+
+sketchybar --bar "${bar[@]}"
+
+# Setting up default values
+defaults=(
+ updates=when_shown
+ icon.font="$FONT:Regular:14.0"
+ icon.color=$ICON_COLOR
+ icon.padding_left=$PADDINS
+ icon.padding_right=$PADDINGS
+ label.font="$FONT:Semibold:13.0"
+ label.color=$LABEL_COLOR
+ label.padding_left=$PADDINGS
+ label.padding_right=$PADDINGS
+ label.shadow.drawing=on
+ label.shadow.distance=2
+ label.shadow.color=0xff000000
+ padding_right=$PADDINGS
+ padding_left=$PADDINGS
+ background.height=26
+ background.corner_radius=9
+ background.border_width=2
+ popup.background.border_width=2
+ popup.background.corner_radius=9
+ popup.background.border_color=$POPUP_BORDER_COLOR
+ popup.background.color=$POPUP_BACKGROUND_COLOR
+ popup.blur_radius=20
+ popup.background.shadow.drawing=on
+ scroll_texts=on
+
+)
+
+sketchybar --default "${defaults[@]}"
+
+
+# Left
+source "$ITEM_DIR/apple.sh"
+source "$ITEM_DIR/spaces.sh"
+source "$ITEM_DIR/front_app.sh"
+#source "$ITEM_DIR/yabai.sh"
+
+# Center
+# source "$ITEM_DIR/spotify.sh"
+# source "$ITEM_DIR/media.sh"
+
+# Right
+source "$ITEM_DIR/calendar.sh"
+source "$ITEM_DIR/input_source.sh"
+source "$ITEM_DIR/battery.sh"
+#source "$ITEM_DIR/brew.sh"
+#source "$ITEM_DIR/github.sh"
+source "$ITEM_DIR/wifi.sh"
+source "$ITEM_DIR/volume.sh"
+source "$ITEM_DIR/svim.sh"
+
+source "$ITEM_DIR/cpu.sh"
+source "$ITEM_DIR/weather.sh"
+
+sketchybar --hotload on
+
+# Forcing all item scripts to run (never do this outside of sketchybarrc)
+sketchybar --update
+
+echo "sketchybar configuation loaded.."