feat(sketchybar): simplify further
This commit is contained in:
parent
86091c0e15
commit
71c14a90c1
4 changed files with 27 additions and 154 deletions
|
@ -15,7 +15,7 @@ sketchybar --bar \
|
|||
# to swap between Catppuccin Mocha and Latte
|
||||
sketchybar -m --add event theme_changed AppleInterfaceThemeChangedNotification
|
||||
sketchybar \
|
||||
--add item colordummy left \
|
||||
--add item colordummy center \
|
||||
--set colordummy \
|
||||
drawing=off \
|
||||
script="$PLUGIN_DIR/colordummy.sh" \
|
||||
|
@ -26,26 +26,26 @@ sketchybar --default \
|
|||
updates=when_shown \
|
||||
drawing=on \
|
||||
icon.font="Symbols Nerd Font:2048-em:18.0" \
|
||||
label.font="Inter:Regular:16.0" \
|
||||
label.padding_left=1 \
|
||||
label.padding_right=1 \
|
||||
icon.padding_left=8 \
|
||||
icon.padding_right=8
|
||||
label.font="SF Pro:Regular:16.0" \
|
||||
label.padding_left=2 \
|
||||
label.padding_right=2 \
|
||||
icon.padding_left=2 \
|
||||
icon.padding_right=2
|
||||
# }}}
|
||||
|
||||
## left side of the bar {{{
|
||||
# spaces for yabai wm
|
||||
SPACE_ICONS=(
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
"Ⅰ"
|
||||
"Ⅱ"
|
||||
"Ⅲ"
|
||||
"Ⅳ"
|
||||
"Ⅴ"
|
||||
"Ⅵ"
|
||||
"Ⅶ"
|
||||
"Ⅷ"
|
||||
"Ⅸ"
|
||||
"Ⅹ"
|
||||
)
|
||||
for i in "${!SPACE_ICONS[@]}"
|
||||
do
|
||||
|
@ -63,29 +63,6 @@ do
|
|||
click_script="yabai -m space --focus $((i+1))"
|
||||
done
|
||||
|
||||
# window title
|
||||
sketchybar \
|
||||
--add item window_title left \
|
||||
--set window_title \
|
||||
background.padding_left=8 \
|
||||
script="$PLUGIN_DIR/window_title.sh" \
|
||||
--subscribe window_title front_app_switched
|
||||
## }}}
|
||||
|
||||
## middle of the bar {{{
|
||||
# Apple Music Status
|
||||
sketchybar -m --add event song_update com.apple.Music.playerInfo
|
||||
sketchybar \
|
||||
--add item music center \
|
||||
--set music \
|
||||
label.font="Victor Mono:Bold Italic:16.0" \
|
||||
script="$PLUGIN_DIR/music.sh" \
|
||||
--subscribe music song_update
|
||||
# }}}
|
||||
|
||||
## right side of the bar {{{
|
||||
# this starts at the rightmost item
|
||||
# items should be self explanatory by their name, and are separated by a blank line
|
||||
sketchybar \
|
||||
\
|
||||
--add item clock right \
|
||||
|
@ -93,24 +70,10 @@ sketchybar \
|
|||
script="$PLUGIN_DIR/clock.sh" \
|
||||
update_freq=10 \
|
||||
lazy=true \
|
||||
\
|
||||
--add item date right \
|
||||
--set date \
|
||||
script="$PLUGIN_DIR/ddate.sh" \
|
||||
update_freq=60 \
|
||||
lazy=true \
|
||||
\
|
||||
--add item mullvad right \
|
||||
--set mullvad \
|
||||
script="$PLUGIN_DIR/mullvad.sh" \
|
||||
update_freq=30 \
|
||||
\
|
||||
--add item battery right \
|
||||
--set battery \
|
||||
update_freq=30 \
|
||||
script="$PLUGIN_DIR/battery.sh" \
|
||||
lazy=true \
|
||||
--subscribe battery system_woke
|
||||
update_freq=30
|
||||
|
||||
##### fin #####
|
||||
sketchybar --update
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
sketchybar --set "$NAME" label="$(date '+%H:%M')" icon=" "
|
||||
sketchybar --set "$NAME" label="$(date '+%m-%d %H:%M')"
|
||||
|
|
|
@ -8,29 +8,9 @@ else
|
|||
fi
|
||||
|
||||
if [[ $THEME == 'dark' ]]; then
|
||||
ROSEWATER="f2d5cf"
|
||||
FLAMINGO="eebebe"
|
||||
PINK="f4b8e4"
|
||||
MAUVE="ca9ee6"
|
||||
RED="e78284"
|
||||
MAROON="ea999c"
|
||||
PEACH="ef9f76"
|
||||
YELLOW="e5c890"
|
||||
GREEN="a6d189"
|
||||
TEAL="81c8be"
|
||||
SKY="99d1db"
|
||||
SAPPHIRE="85c1dc"
|
||||
BLUE="8caaee"
|
||||
LAVENDER="babbf1"
|
||||
TEXT="c6d0f5"
|
||||
SUBTEXT1="b5bfe2"
|
||||
SUBTEXT0="a5adce"
|
||||
OVERLAY2="949cbb"
|
||||
OVERLAY1="838ba7"
|
||||
OVERLAY0="737994"
|
||||
SURFACE2="626880"
|
||||
SURFACE1="51576d"
|
||||
SURFACE0="414559"
|
||||
BASE="303446"
|
||||
MANTLE="292c3c"
|
||||
CRUST="232634"
|
||||
|
@ -39,29 +19,9 @@ if [[ $THEME == 'dark' ]]; then
|
|||
MANTLE="000000"
|
||||
CRUST="000000"
|
||||
else
|
||||
ROSEWATER="dc8a78"
|
||||
FLAMINGO="dd7878"
|
||||
PINK="ea76cb"
|
||||
MAUVE="8839ef"
|
||||
RED="d20f39"
|
||||
MAROON="e64553"
|
||||
PEACH="fe640b"
|
||||
YELLOW="df8e1d"
|
||||
GREEN="40a02b"
|
||||
TEAL="179299"
|
||||
SKY="04a5e5"
|
||||
SAPPHIRE="209fb5"
|
||||
BLUE="1e66f5"
|
||||
LAVENDER="7287fd"
|
||||
TEXT="4c4f69"
|
||||
SUBTEXT1="5c5f77"
|
||||
SUBTEXT0="6c6f85"
|
||||
OVERLAY2="7c7f93"
|
||||
OVERLAY1="8c8fa1"
|
||||
OVERLAY0="9ca0b0"
|
||||
SURFACE2="acb0be"
|
||||
SURFACE1="bcc0cc"
|
||||
SURFACE0="ccd0da"
|
||||
CRUST="dce0e8"
|
||||
MANTLE="e6e9ef"
|
||||
BASE="eff1f5"
|
||||
|
@ -72,29 +32,9 @@ function color() {
|
|||
color="$1"
|
||||
|
||||
case $1 in
|
||||
rosewater) color=$ROSEWATER ;;
|
||||
flamingo) color=$FLAMINGO ;;
|
||||
pink) color=$PINK ;;
|
||||
mauve) color=$MAUVE ;;
|
||||
red) color=$RED ;;
|
||||
maroon) color=$MAROON ;;
|
||||
peach) color=$PEACH ;;
|
||||
yellow) color=$YELLOW ;;
|
||||
green) color=$GREEN ;;
|
||||
teal) color=$TEAL ;;
|
||||
sky) color=$SKY ;;
|
||||
sapphire) color=$SAPPHIRE ;;
|
||||
blue) color=$BLUE ;;
|
||||
lavender) color=$LAVENDER ;;
|
||||
text) color=$TEXT ;;
|
||||
subtext1) color=$SUBTEXT1 ;;
|
||||
subtext0) color=$SUBTEXT0 ;;
|
||||
overlay2) color=$OVERLAY2 ;;
|
||||
overlay1) color=$OVERLAY1 ;;
|
||||
overlay0) color=$OVERLAY0 ;;
|
||||
surface2) color=$SURFACE2 ;;
|
||||
surface1) color=$SURFACE1 ;;
|
||||
surface0) color=$SURFACE0 ;;
|
||||
crust) color=$CRUST ;;
|
||||
mantle) color=$MANTLE ;;
|
||||
base) color=$BASE ;;
|
||||
|
@ -110,49 +50,21 @@ sketchybar \
|
|||
\
|
||||
--default \
|
||||
icon.color=$(color pink) \
|
||||
label.color=$(color text) \
|
||||
label.color=$(color pink) \
|
||||
\
|
||||
--set /space/ \
|
||||
icon.color=$(color mauve 128) \
|
||||
icon.highlight_color=$(color pink) \
|
||||
\
|
||||
--set window_title \
|
||||
icon.color=$(color text) \
|
||||
label.color=$(color text) \
|
||||
\
|
||||
--set music \
|
||||
icon.color=$(color subtext1) \
|
||||
label.color=$(color subtext1) \
|
||||
\
|
||||
--set clock \
|
||||
icon.color=$(color mauve) \
|
||||
label.color=$(color mauve) \
|
||||
\
|
||||
--set date \
|
||||
icon.color=$(color blue) \
|
||||
label.color=$(color blue) \
|
||||
icon.color=$(color pink) \
|
||||
label.color=$(color pink) \
|
||||
\
|
||||
--set mullvad \
|
||||
icon.color=$(color green) \
|
||||
label.color=$(color green) \
|
||||
\
|
||||
--set battery \
|
||||
icon.color=$(color yellow) \
|
||||
label.color=$(color yellow) \
|
||||
\
|
||||
--set sound \
|
||||
icon.color=$(color peach) \
|
||||
label.color=$(color peach) \
|
||||
\
|
||||
--set mail \
|
||||
icon.color=$(color red) \
|
||||
label.color=$(color red) \
|
||||
\
|
||||
--set tasks \
|
||||
icon.color=$(color red) \
|
||||
label.color=$(color red)
|
||||
icon.color=$(color pink) \
|
||||
label.color=$(color pink)
|
||||
|
||||
# set the yabai colours as well
|
||||
yabai -m config active_window_border_color $(color pink)
|
||||
yabai -m config normal_window_border_color $(color mauve)
|
||||
yabai -m config insert_feedback_color $(color yellow)
|
||||
yabai -m config active_window_border_color $(color base)
|
||||
yabai -m config normal_window_border_color $(color base)
|
||||
yabai -m config insert_feedback_color $(color base)
|
||||
|
|
|
@ -9,12 +9,10 @@ fi
|
|||
|
||||
while read -r LINE; do
|
||||
if echo "$LINE" | grep -q 'Connected'; then
|
||||
# regex grep the relay, e.g. se7 for sweden-7
|
||||
OUTPUT=$(echo "$LINE" | grep -oE "\w{2}\d+")
|
||||
ICON=" "
|
||||
else
|
||||
ICON=" "
|
||||
fi
|
||||
|
||||
sketchybar --set "$NAME" icon="$ICON" label="${OUTPUT^^}"
|
||||
sketchybar --set "$NAME" icon="$ICON"
|
||||
done < <(mullvad status listen)
|
||||
|
|
Loading…
Reference in a new issue