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:
Anish Lakhwara
2025-09-12 14:26:38 -07:00
parent 01c65f54af
commit 2ca6feff4d
43 changed files with 2114 additions and 164 deletions
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
sketchybar --set "$NAME" icon="󰸗 " label="$(date '+%a %d. %b')"
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
LABEL=$(date '+%H:%M')
sketchybar --set "$NAME" icon=" " label="$LABEL"
+3
View File
@@ -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}')"
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
case "$SENDER" in
"front_app_switched")
sketchybar --set "$NAME" label="$INFO"
;;
esac
+30
View File
@@ -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}% "
+20
View File
@@ -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%"
+19
View File
@@ -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
+11
View File
@@ -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
+16
View File
@@ -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
+5
View File
@@ -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
+5
View File
@@ -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