slim down demo sketchybarrc

This commit is contained in:
Felix Kratz 2022-01-02 14:26:51 +01:00
parent 32d2cf34e4
commit 3c1c7214ee
4 changed files with 4 additions and 44 deletions

View file

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# Thanks to reddit:rudypaul
BIN_DIR="/usr/bin"
PLUTIL="${BIN_DIR}/plutil"
XPATH="${BIN_DIR}/xpath"
BASE64="${BIN_DIR}/base64"
dnd_enabled=$(
"${PLUTIL}" -extract dnd_prefs xml1 -o - ~/Library/Preferences/com.apple.ncprefs.plist |
"${XPATH}" -q -e 'string(//data)' |
"${BASE64}" -D |
"${PLUTIL}" -convert xml1 - -o - |
"${XPATH}" -q -e 'boolean(//key[text()="userPref"]/following-sibling::dict/key[text()="enabled"])'
)
if [ $dnd_enabled -eq 1 ]; then
sketchybar -m --set $NAME drawing=on
else
sketchybar -m --set $NAME drawing=off
fi

View file

@ -1,9 +0,0 @@
#!/usr/bin/env bash
MAX_DOWN=110000
MAX_UP=45000
UPDOWN=$(ifstat -i "en0" -b 0.1 1 | tail -n1)
DOWN=$(echo $UPDOWN | awk "{ print \$1 }" | cut -f1 -d ".")
UP=$(echo $UPDOWN | awk "{ print \$2 }" | cut -f1 -d ".")
sketchybar -m --push network_down $(echo $UPDOWN | awk "{ print \$1 / (1.0 * $MAX_DOWN) }")
--push network_up $(echo $UPDOWN | awk "{ print \$2 / (1.0 * $MAX_UP) }")

View file

@ -1,7 +0,0 @@
#!/usr/bin/env bash
if [ "$SELECTED" = "true" ]; then
sketchybar -m --set $NAME label.highlight=on icon.highlight=on
else
sketchybar -m --set $NAME label.highlight=off icon.highlight=off
fi

View file

@ -1,5 +1,5 @@
# This is a demo config to bring across some of the most important commands more easily.
#
# For a more advanced configuration example see https://github.com/FelixKratz/SketchyBar/discussions/47#discussioncomment-1774620
############## BAR ##############
sketchybar -m --bar height=25 \
blur_radius=50 \
@ -25,8 +25,8 @@ sketchybar -m --default label.padding_left=2 \
############## PRIMARY DISPLAY SPACES ##############
sketchybar -m --add space code left \
--set code associated_space=1 \
associated_display=1 \
--set code associated_display=1 \
associated_space=1 \
icon.font="Hack Nerd Font:Bold:20.0" \
icon= \
icon.highlight_color=0xff48aa2a \
@ -36,8 +36,8 @@ sketchybar -m --add space code left \
--add space tex left \
--set tex associated_display=1 \
associated_space=2 \
icon.highlight_color=0xfffab402 \
icon= \
icon.highlight_color=0xfffab402 \
label=tex \
click_script="yabai -m space --focus 2"
@ -49,7 +49,6 @@ sketchybar -m --add space misc left \
icon.font="Hack Nerd Font:Bold:20.0" \
icon= \
icon.highlight_color=0xff48aa2a \
icon.padding_left=0 \
label=misc \
click_script="yabai -m space --focus 5"
@ -64,7 +63,6 @@ sketchybar -m --default label.padding_left=2 \
sketchybar -m --add item space_separator left \
--set space_separator icon= \
associated_space=1 \
associated_space=3 \
icon.padding_left=15 \
label.padding_right=15 \
icon.font="Hack Nerd Font:Bold:15.0" \