Dotfiles V.1.1.5
Updated Neovim Plugins as well as cleaned up aerospace config and sketbar config and added fastfetch config
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
PERCENTAGE="$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1)"
|
||||
CHARGING="$(pmset -g batt | grep 'AC Power')"
|
||||
@@ -8,21 +8,32 @@ if [ "$PERCENTAGE" = "" ]; then
|
||||
fi
|
||||
|
||||
case "${PERCENTAGE}" in
|
||||
9[0-9]|100) ICON=""
|
||||
9[0-9]|100)
|
||||
ICON=""
|
||||
COLOR="0xFFA6DA95"
|
||||
;;
|
||||
[6-8][0-9]) ICON=""
|
||||
[6-8][0-9])
|
||||
ICON=""
|
||||
COLOR="0xFFEED49F"
|
||||
;;
|
||||
[3-5][0-9]) ICON=""
|
||||
[3-5][0-9])
|
||||
ICON=""
|
||||
COLOR="0xFFF5A97F"
|
||||
;;
|
||||
[1-2][0-9]) ICON=""
|
||||
[1-2][0-9])
|
||||
ICON=""
|
||||
COLOR="0xFFED8796"
|
||||
;;
|
||||
*) ICON=""
|
||||
*)
|
||||
ICON=""
|
||||
COLOR="0xFFED8796"
|
||||
esac
|
||||
|
||||
if [[ "$CHARGING" != "" ]]; then
|
||||
ICON=""
|
||||
COLOR="0xFFA6DA95"
|
||||
fi
|
||||
|
||||
# The item invoking this script (name $NAME) will get its icon and label
|
||||
# updated with the current battery status
|
||||
sketchybar --set "$NAME" icon="$ICON" label="${PERCENTAGE}%"
|
||||
sketchybar --set "$NAME" icon.color="$COLOR" icon="$ICON" label.color="$COLOR" label="${PERCENTAGE}%"
|
||||
|
||||
31
.config/sketchybar/plugins/battery_popup.sh
Executable file
31
.config/sketchybar/plugins/battery_popup.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
sketchybar --set battery popup.drawing=toggle \
|
||||
popup.background.drawing=on \
|
||||
popup.background.color="0xff363a4f" \
|
||||
popup.background.corner_radius=3
|
||||
|
||||
|
||||
if /usr/local/bin/battery status | grep -q 'Your battery'; then
|
||||
sketchybar --set batteryStatus label="Maintaining" \
|
||||
label.color="0xffa6da95"
|
||||
sketchybar --set batteryMaintain label="Stop Maintaining" \
|
||||
label.color="0xffed8796" \
|
||||
click_script="/usr/local/bin/battery maintain stop && sketchybar --set battery popup.drawing=toggle"
|
||||
else
|
||||
sketchybar --set batteryStatus label="Not Maintaining" \
|
||||
label.color="0xffed8796"
|
||||
sketchybar --set batteryMaintain label="Maintain" \
|
||||
label.color="0xffa6da95" \
|
||||
click_script="/usr/local/bin/battery maintain 80 && sketchybar --set battery popup.drawing=toggle"
|
||||
fi
|
||||
|
||||
if [[ "$CHARGING" != "" ]]; then
|
||||
sketchybar --set batteryCharge label="Stop Charging" \
|
||||
label.color="0xffed8796"\
|
||||
click_script="/usr/local/bin/battery charging off && sketchybar --set battery popup.drawing=toggle"
|
||||
else
|
||||
sketchybar --set batteryCharge label="Start Charging" \
|
||||
label.color="0xffa6da95"\
|
||||
click_script="/usr/local/bin/battery charging on && sketchybar --set battery popup.drawing=toggle"
|
||||
fi
|
||||
5
.config/sketchybar/plugins/front_app.sh
Executable file
5
.config/sketchybar/plugins/front_app.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$SENDER" = "front_app_switched" ]; then
|
||||
sketchybar --set $NAME label="$INFO" icon="$($CONFIG_DIR/plugins/icon_map_fn.sh "$INFO")"
|
||||
fi
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
function icon_map() {
|
||||
case "$1" in
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
STATE="$(echo "$INFO" | jq -r '.state')"
|
||||
if [ "$STATE" = "playing" ]; then
|
||||
MEDIA="$(echo "$INFO" | jq -r '.title + " - " + .artist')"
|
||||
sketchybar --set $NAME label="$MEDIA" drawing=on
|
||||
else
|
||||
sketchybar --set $NAME drawing=off
|
||||
fi
|
||||
20
.config/sketchybar/plugins/pomodoro.sh
Executable file
20
.config/sketchybar/plugins/pomodoro.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
STATUS=$(/usr/local/bin/pomodoro status)
|
||||
|
||||
if [ -z "$STATUS" ]; then
|
||||
sketchybar --set pomodoro icon="" \
|
||||
label="Start a Session!" \
|
||||
icon.color="0xffed8796" \
|
||||
label.color="0xffed8796"
|
||||
elif /usr/local/bin/pomodoro status | grep -q "❗"; then
|
||||
sketchybar --set pomodoro icon="" \
|
||||
label="Good Job!" \
|
||||
icon.color="0xffed8796" \
|
||||
label.color="0xffed8796"
|
||||
elif /usr/local/bin/pomodoro status | grep -q "🍅"; then
|
||||
sketchybar --set pomodoro icon="" \
|
||||
label="$(/usr/local/bin/pomodoro status -f "%r")" \
|
||||
icon.color="0xfff5bde6" \
|
||||
label.color="0xfff5bde6"
|
||||
fi
|
||||
40
.config/sketchybar/plugins/pomodoro_popup.sh
Executable file
40
.config/sketchybar/plugins/pomodoro_popup.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
sketchybar --set pomodoro popup.drawing=toggle \
|
||||
popup.background.drawing=on \
|
||||
popup.background.color="0xff363a4f" \
|
||||
popup.background.corner_radius=3
|
||||
|
||||
STATUS=$(/usr/local/bin/pomodoro status)
|
||||
|
||||
if [ "$STATUS" = "" ]; then
|
||||
sketchybar --set focus icon="" \
|
||||
label="Focus 50:00" \
|
||||
icon.color="0xfff5bde6" \
|
||||
label.color="0xfff5bde6" \
|
||||
click_script="/usr/local/bin/pomodoro start --duration 50 && sketchybar --set pomodoro popup.drawing=toggle"
|
||||
sketchybar --set shortBreak icon="" \
|
||||
label="Short Break 5:00" \
|
||||
icon.color="0xffcad3f5" \
|
||||
label.color="0xffcad3f5"
|
||||
sketchybar --set longBreak icon="" \
|
||||
label="Long Break 15:00" \
|
||||
icon.color="0xffcad3f5" \
|
||||
label.color="0xffcad3f5"
|
||||
else
|
||||
sketchybar --set focus icon="" \
|
||||
label="Focus 50:00" \
|
||||
icon.color="0xfff5bde6" \
|
||||
label.color="0xfff5bde6" \
|
||||
click_script="/usr/local/bin/pomodoro start --duration 50 && sketchybar --set pomodoro popup.drawing=toggle"
|
||||
sketchybar --set shortBreak icon="" \
|
||||
label="Short Break 5:00" \
|
||||
icon.color="0xff91d7e3" \
|
||||
label.color="0xff91d7e3" \
|
||||
click_script="sketchybar --set pomodoro update_freq=0 icon='' label='Break Time!' icon.color='0xff91d7e3' label.color='0xff91d7e3' popup.drawing=toggle && /usr/local/bin/pomodoro break && sketchybar --set pomodoro update_freq=1"
|
||||
sketchybar --set longBreak icon="" \
|
||||
label="Long Break 15:00" \
|
||||
icon.color="0xff91d7e3" \
|
||||
label.color="0xff91d7e3" \
|
||||
click_script="sketchybar --set pomodoro update_freq=0 icon='' label='Break Time!' icon.color='0xff91d7e3' label.color='0xff91d7e3' popup.drawing=toggle && /usr/local/bin/pomodoro break 15 && sketchybar --set pomodoro update_freq=1"
|
||||
fi
|
||||
@@ -4,29 +4,11 @@ source "$CONFIG_DIR/colors.sh"
|
||||
|
||||
if [ "$1" = "$FOCUSED_WORKSPACE" ]; then
|
||||
sketchybar --set $NAME background.drawing=on \
|
||||
background.color=$ACCENT_COLOR \
|
||||
background.color=$BLUE \
|
||||
label.color=$BAR_COLOR \
|
||||
icon.color=$BAR_COLOR
|
||||
else
|
||||
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"
|
||||
|
||||
label.color=$BLUE \
|
||||
icon.color=$BLUE
|
||||
fi
|
||||
|
||||
@@ -7,14 +7,20 @@ if [ "$SENDER" = "volume_change" ]; then
|
||||
VOLUME="$INFO"
|
||||
|
||||
case "$VOLUME" in
|
||||
[6-9][0-9]|100) ICON=""
|
||||
[6-9][0-9]|100)
|
||||
ICON=""
|
||||
COLOR="0xff8aadf4"
|
||||
;;
|
||||
[3-5][0-9]) ICON=""
|
||||
[3-5][0-9])
|
||||
ICON=""
|
||||
COLOR="0xff8aadf4"
|
||||
;;
|
||||
[1-9]|[1-2][0-9]) ICON=""
|
||||
;;
|
||||
*) ICON=""
|
||||
*)
|
||||
ICON=""
|
||||
COLOR="0xffed8796"
|
||||
esac
|
||||
|
||||
sketchybar --set "$NAME" icon="$ICON" label="$VOLUME%"
|
||||
sketchybar --set "$NAME" icon.color="$COLOR" icon="$ICON" label.color="$COLOR" label="$VOLUME%"
|
||||
fi
|
||||
|
||||
21
.config/sketchybar/plugins/wifi.sh
Executable file
21
.config/sketchybar/plugins/wifi.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
if networksetup -getairportpower en0 | grep -q "On"; then
|
||||
SSID=$(ipconfig getsummary en0 | awk -F ' SSID : ' '/ SSID : / {print $2}')
|
||||
if [ -z "$SSID" ]; then
|
||||
sketchybar --set wifi icon="" \
|
||||
label="Disconnected" \
|
||||
label.color="0xffed8796" \
|
||||
icon.color="0xffed8796"
|
||||
else
|
||||
sketchybar --set wifi icon="" \
|
||||
label="$SSID" \
|
||||
label.color="0xffc6a0f6" \
|
||||
icon.color="0xffc6a0f6"
|
||||
fi
|
||||
else
|
||||
sketchybar --set wifi icon="" \
|
||||
label="Off" \
|
||||
label.color="0xffed8796" \
|
||||
icon.color="0xffed8796"
|
||||
fi
|
||||
Reference in New Issue
Block a user