Dotfiles with the latest changes

This commit is contained in:
2024-10-28 14:02:46 +01:00
parent d39336c479
commit fa6b78a382
108 changed files with 4459 additions and 467 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
sketchybar --add item battery right \
--set battery update-freq=120 \
--set battery update_freq=120 \
script="$PLUGIN_DIR/battery.sh" \
--subscribe battery system_woke power_source_change

View File

@@ -1,9 +0,0 @@
#!/bin/bash
sketchybar --add item front_app left \
--set front_app background.color=$ACCENT_COLOR \
icon.color=$BAR_COLOR \
icon.font="sketchybar-app-font:Regular:16.0" \
label.color=$BAR_COLOR \
script="$PLUGIN_DIR/front_app.sh" \
--subscribe front_app front_app_switched

View File

@@ -1,23 +1,17 @@
#!/bin/bash
#!/bin/sh
SPACE_SIDS=(1 2 3 4 5 6 7 8 9 10)
sketchybar --add event aerospace_workspace_change
for sid in "${SPACE_SIDS[@]}"
SPACE_STRS=(    󰏆   󰐫 )
for str in "${SPACE_STRS[@]}"
do
sketchybar --add space space.$sid left \
--set space.$sid space=$sid \
icon=$sid \
label.font="sketchybar-app-font:Regular:16.0" \
label.padding_right=20 \
label.y_offset=-1 \
script="$PLUGIN_DIR/space.sh"
sketchybar -m --add space $str left \
--subscribe $str aerospace_workspace_change \
--set $str icon=$str \
associated_display=1 \
label.font="sketchybar-app-font:Regular:16.0" \
label.padding_right=20 \
label.y_offset=-1\
script="$PLUGIN_DIR/space.sh $str"
done
sketchybar --add item space_separator left \
--set space_separator icon"" \
icon.color=$ACCENT_COLOR \
icon.padding_left=4 \
label.drawing=off \
background.drawing=off \
script="$PLUGIN_DIR/space_windows.sh" \
--subscribe space_separator space_windows_change

View File

@@ -1,10 +0,0 @@
#!/bin/sh
# Some events send additional information specific to the event in the $INFO
# variable. E.g. the front_app_switched event sends the name of the newly
# focused application in the $INFO variable:
# https://felixkratz.github.io/SketchyBar/config/events#events-and-scripting
if [ "$SENDER" = "front_app_switched" ]; then
sketchybar --set $NAME label=$INFO icon="$($CONFIG_DIR/plugins/icon_map_fn.sh $INFO)"
fi

View File

@@ -1,18 +1,32 @@
#!/bin/sh
# The $SELECTED variable is available for space components and indicates if
# the space invoking this script (with name: $NAME) is currently selected:
# https://felixkratz.github.io/SketchyBar/config/components#space----associate-mission-control-spaces-with-an-item
#!/bin/bash
source "$CONFIG_DIR/colors.sh"
if [ $SELECTED = true ]; then
sketchybar --set $NAME background.drawing=on \
background.color=$ACCENT_COLOR \
label.color=$BAR_COLOR \
icon.color=$BAR_COLOR
if [ "$1" = "$FOCUSED_WORKSPACE" ]; then
sketchybar --set $NAME background.drawing=on \
background.color=$ACCENT_COLOR \
label.color=$BAR_COLOR \
icon.color=$BAR_COLOR
else
sketchybar --set $NAME background.color=off \
label.color=$ACCENT_COLOR \
icon.color=$ACCENT_COLOR
sketchybar --set $NAME background.drawing=off \
label.color=$ACCENT_COLOR \
icon.color=$ACCENT_COLOR
fi
if [ "$SENDER" = "aerospace_workspace_change" ]; then
apps=$(aerospace list-windows --workspace $1 | awk -F'|' '{gsub(/^ *| *$/, "", $2); print $2}')
icon_strip=" "
if [ "${apps}" != "" ]; then
while read -r app
do
icon_strip+=" $($CONFIG_DIR/plugins/icon_map_fn.sh "$app")"
done <<< "${apps}"
else
icon_strip=" —"
fi
sketchybar --set $1 label="$icon_strip"
fi

View File

@@ -1,18 +0,0 @@
#!/bin/bash
if [ "$SENDER" = "space_windows_change" ]; then
space="$(echo "$INFO" | jq -r '.space')"
apps="$(echo "$INFO" | jq -r '.apps | keys[]')"
icon_strip=" "
if [ "${apps}" != "" ]; then
while read -r app
do
icon_strip+=" $($CONFIG_DIR/plugins/icon_map_fn.sh "$app")"
done <<< "${apps}"
else
icon_strip=" —"
fi
sketchybar --set space.$space label="$icon_strip"
fi

View File

@@ -17,7 +17,7 @@ ITEM_DIR="$CONFIG_DIR/items"
# 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=40 blur_radius=30 color=$BAR_COLOR
sketchybar --bar position=top height=30 blur_radius=30 color=$BAR_COLOR
##### Changing Defaults #####
# We now change some default values, which are applied to all further items.
@@ -44,7 +44,6 @@ sketchybar --default "${default[@]}"
# --Left Side Items --
source $ITEM_DIR/spaces.sh
source $ITEM_DIR/front_app.sh
# --Middle Items --