WIP: Integration branch with darwin and deck support
- Added darwin and jovian inputs - Added platform-specific package configurations - Added darwinConfigurations and deck nixosConfiguration - Copied darwin and deck specific files - Fixed darwin version compatibility Some configurations still need debugging
This commit is contained in:
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sketchybar --set "$NAME" icon=" " label="$(date '+%a %d. %b')"
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
LABEL=$(date '+%H:%M')
|
||||
sketchybar --set "$NAME" icon=" " label="$LABEL"
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sketchybar --set "$NAME" icon="" label="$(ps -A -o %cpu | awk '{s+=$1} END {s /= 8} END {printf "%.1f%%\n", s}')"
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
case "$SENDER" in
|
||||
"front_app_switched")
|
||||
sketchybar --set "$NAME" label="$INFO"
|
||||
;;
|
||||
esac
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PERCENTAGE=$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1)
|
||||
CHARGING=$(pmset -g batt | grep 'AC Power')
|
||||
|
||||
if [ "$PERCENTAGE" = "" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case ${PERCENTAGE} in
|
||||
9[0-9] | 100)
|
||||
ICON=" "
|
||||
;;
|
||||
[6-8][0-9])
|
||||
ICON=" "
|
||||
;;
|
||||
[3-5][0-9])
|
||||
ICON=" "
|
||||
;;
|
||||
[1-2][0-9])
|
||||
ICON=" "
|
||||
;;
|
||||
*) ICON=" " ;;
|
||||
esac
|
||||
|
||||
if [ "$CHARGING" != "" ]; then
|
||||
ICON=""
|
||||
fi
|
||||
|
||||
sketchybar --set "$NAME" icon="$ICON" label="${PERCENTAGE}% "
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VOLUME=$(osascript -e "output volume of (get volume settings)")
|
||||
MUTED=$(osascript -e "output muted of (get volume settings)")
|
||||
|
||||
if [ "$MUTED" != "false" ]; then
|
||||
ICON=" "
|
||||
VOLUME=0
|
||||
else
|
||||
case ${VOLUME} in
|
||||
100) ICON=" " ;;
|
||||
[5-9]*) ICON=" " ;;
|
||||
[0-9]*) ICON=" " ;;
|
||||
*) ICON=" " ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
sketchybar -m \
|
||||
--set "$NAME" icon=$ICON \
|
||||
--set "$NAME" label="$VOLUME%"
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source "$HOME/.config/sketchybar/variables.sh" # Loads all defined colors
|
||||
|
||||
SPACE_ICONS=(" " " " " " " " " " "6" "7" "8" "9" "10")
|
||||
|
||||
SPACE_CLICK_SCRIPT="yabai -m space --focus $SID 2>/dev/null"
|
||||
|
||||
if [ "$SELECTED" = "true" ]; then
|
||||
sketchybar --animate tanh 5 --set "$NAME" \
|
||||
icon.color="$RED" \
|
||||
icon="${SPACE_ICONS[$SID - 1]}" \
|
||||
click_script="$SPACE_CLICK_SCRIPT"
|
||||
else
|
||||
sketchybar --animate tanh 5 --set "$NAME" \
|
||||
icon.color="$COMMENT" \
|
||||
icon="${SPACE_ICONS[$SID - 1]}" \
|
||||
click_script="$SPACE_CLICK_SCRIPT"
|
||||
fi
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
STATE="$(echo "$INFO" | jq -r '.state')"
|
||||
APP="$(echo "$INFO" | jq -r '.app')"
|
||||
|
||||
if [ "$STATE" = "playing" ] && [ "$APP" == "Spotify" ]; then
|
||||
MEDIA="$(echo "$INFO" | jq -r '.title + " - " + .artist')"
|
||||
sketchybar --set "$NAME" label="$MEDIA" drawing=on
|
||||
else
|
||||
sketchybar --set "$NAME" drawing=off
|
||||
fi
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
### You need to edit sudoers file to run wg-quick without password
|
||||
|
||||
# %admin ALL = (ALL) NOPASSWD: /nix/store/s2qw0sxax8pckbzmyw6wrarahmx65bq9-wireguard-tools-1.0.20210914/bin/wg-quick
|
||||
|
||||
WG_PIDFILE="/var/run/wireguard/wg0.name"
|
||||
|
||||
if [ -f $WG_PIDFILE ]; then
|
||||
sketchybar -m --set vpn icon= \
|
||||
label="$VPN" \
|
||||
drawing=on \
|
||||
click_script="~/.config/sketchybar/plugins/wg_off.sh"
|
||||
else
|
||||
sketchybar -m --set vpn drawing=off click_script="~/.config/sketchybar/plugins/wg_on.sh"
|
||||
fi
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
### You need to edit sudoers file to run wg-quick without password
|
||||
|
||||
# %admin ALL = (ALL) NOPASSWD: /nix/store/s2qw0sxax8pckbzmyw6wrarahmx65bq9-wireguard-tools-1.0.20210914/bin/wg-quick
|
||||
|
||||
sudo wg-quick down wg0
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
### You need to edit sudoers file to run wg-quick without password
|
||||
|
||||
# %admin ALL = (ALL) NOPASSWD: /nix/store/s2qw0sxax8pckbzmyw6wrarahmx65bq9-wireguard-tools-1.0.20210914/bin/wg-quick
|
||||
|
||||
sudo wg-quick up wg0
|
||||
Reference in New Issue
Block a user