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:
@@ -0,0 +1,28 @@
|
||||
{ self, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../profiles/nvim
|
||||
../profiles/cli
|
||||
../profiles/direnv
|
||||
../profiles/git
|
||||
../profiles/task
|
||||
../profiles/kitty
|
||||
# ../profiles/firefox
|
||||
];
|
||||
|
||||
home.username = "anishlakhwara";
|
||||
home.homeDirectory = "/Users/anishlakhwara";
|
||||
home.stateVersion = "22.05";
|
||||
|
||||
programs.zsh.initExtra = ''
|
||||
PATH=/Users/anishlakhwara/.sourcegraph/bin:/Users/anishlakhwara/.sourcegraph/sg.zsh_autocomplete:/Users/anishlakhwara/google-cloud-sdk/bin:/Users/anishlakhwara/google-cloud-sdk/completion.zsh.inc:/Users/anishlakhwara/google-cloud-sdk/path.zsh.inc:/Users/anishlakhwara/.sg:/opt/homebrew/bin:$PATH
|
||||
'';
|
||||
|
||||
# Managing sketchybar plugins from home-manager
|
||||
home.file = {
|
||||
".config/sketchybar" = {
|
||||
source = ./sketchybar;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
COLOR="$CYAN"
|
||||
|
||||
sketchybar --add item battery right \
|
||||
--set battery \
|
||||
update_freq=60 \
|
||||
icon.color="$COLOR" \
|
||||
icon.padding_left=10 \
|
||||
label.padding_right=10 \
|
||||
label.color="$COLOR" \
|
||||
background.height=26 \
|
||||
background.corner_radius="$CORNER_RADIUS" \
|
||||
background.padding_right=5 \
|
||||
background.border_width="$BORDER_WIDTH" \
|
||||
background.border_color="$COLOR" \
|
||||
background.color="$BAR_COLOR" \
|
||||
background.drawing=on \
|
||||
script="$PLUGIN_DIR/power.sh" \
|
||||
--subscribe battery power_source_change
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
COLOR="$CYAN"
|
||||
|
||||
sketchybar --add item battery right \
|
||||
--set battery \
|
||||
update_freq=60 \
|
||||
icon.color="$COLOR" \
|
||||
icon.padding_left=10 \
|
||||
label.padding_right=10 \
|
||||
label.color="$COLOR" \
|
||||
background.height=26 \
|
||||
background.corner_radius="$CORNER_RADIUS" \
|
||||
background.padding_right=5 \
|
||||
background.border_width="$BORDER_WIDTH" \
|
||||
background.border_color="$COLOR" \
|
||||
background.color="$BAR_COLOR" \
|
||||
background.drawing=on \
|
||||
script="$PLUGIN_DIR/power.sh" \
|
||||
--subscribe battery power_source_change
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
COLOR="$BLUE"
|
||||
|
||||
sketchybar --add item calendar right \
|
||||
--set calendar update_freq=15 \
|
||||
icon.color="$COLOR" \
|
||||
icon.padding_left=10 \
|
||||
label.color="$COLOR" \
|
||||
label.padding_right=10 \
|
||||
background.height=26 \
|
||||
background.corner_radius="$CORNER_RADIUS" \
|
||||
background.padding_right=5 \
|
||||
background.border_width="$BORDER_WIDTH" \
|
||||
background.border_color="$COLOR" \
|
||||
background.color="$BAR_COLOR" \
|
||||
background.drawing=on \
|
||||
script="$PLUGIN_DIR/calendar.sh"
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
COLOR="$MAGENTA"
|
||||
|
||||
sketchybar --add item clock right \
|
||||
--set clock update_freq=60 \
|
||||
icon.padding_left=10 \
|
||||
icon.color="$COLOR" \
|
||||
icon=" " \
|
||||
label.color="$COLOR" \
|
||||
label.padding_right=5 \
|
||||
label.width=43 \
|
||||
align=center \
|
||||
background.height=26 \
|
||||
background.corner_radius="$CORNER_RADIUS" \
|
||||
background.padding_right=2 \
|
||||
background.border_width="$BORDER_WIDTH" \
|
||||
background.border_color="$COLOR" \
|
||||
background.color="$BAR_COLOR" \
|
||||
background.drawing=on \
|
||||
script="$PLUGIN_DIR/clock.sh"
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
COLOR="$YELLOW"
|
||||
|
||||
sketchybar --add item cpu right \
|
||||
--set cpu \
|
||||
update_freq=3 \
|
||||
icon.color="$COLOR" \
|
||||
icon.padding_left=10 \
|
||||
label.color="$COLOR" \
|
||||
label.padding_right=10 \
|
||||
background.height=26 \
|
||||
background.corner_radius="$CORNER_RADIUS" \
|
||||
background.padding_right=5 \
|
||||
background.border_width="$BORDER_WIDTH" \
|
||||
background.border_color="$COLOR" \
|
||||
background.color="$BAR_COLOR" \
|
||||
background.drawing=on \
|
||||
script="$PLUGIN_DIR/cpu.sh"
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
COLOR="$WHITE"
|
||||
|
||||
sketchybar \
|
||||
--add item front_app left \
|
||||
--set front_app script="$PLUGIN_DIR/front_app.sh" \
|
||||
icon.drawing=off \
|
||||
background.height=26 \
|
||||
background.padding_left=0 \
|
||||
background.padding_right=10 \
|
||||
background.border_width="$BORDER_WIDTH" \
|
||||
background.border_color="$COLOR" \
|
||||
background.corner_radius="$CORNER_RADIUS" \
|
||||
background.color="$BAR_COLOR" \
|
||||
label.color="$COLOR" \
|
||||
label.padding_left=10 \
|
||||
label.padding_right=10 \
|
||||
associated_display=active \
|
||||
--subscribe front_app front_app_switched
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9" "10")
|
||||
|
||||
sketchybar --add item spacer.1 left \
|
||||
--set spacer.1 background.drawing=off \
|
||||
label.drawing=off \
|
||||
icon.drawing=off \
|
||||
width=10
|
||||
|
||||
for i in {0..9}; do
|
||||
sid=$((i + 1))
|
||||
sketchybar --add space space.$sid left \
|
||||
--set space.$sid associated_space=$sid \
|
||||
label.drawing=off \
|
||||
icon.padding_left=10 \
|
||||
icon.padding_right=10 \
|
||||
background.padding_left=-5 \
|
||||
background.padding_right=-5 \
|
||||
script="$PLUGIN_DIR/space.sh"
|
||||
done
|
||||
|
||||
sketchybar --add item spacer.2 left \
|
||||
--set spacer.2 background.drawing=off \
|
||||
label.drawing=off \
|
||||
icon.drawing=off \
|
||||
width=5
|
||||
|
||||
sketchybar --add bracket spaces '/space.*/' \
|
||||
--set spaces background.border_width="$BORDER_WIDTH" \
|
||||
background.border_color="$RED" \
|
||||
background.corner_radius="$CORNER_RADIUS" \
|
||||
background.color="$BAR_COLOR" \
|
||||
background.height=26 \
|
||||
background.drawing=on
|
||||
|
||||
sketchybar --add item separator left \
|
||||
--set separator icon= \
|
||||
icon.font="$FONT:Regular:16.0" \
|
||||
background.padding_left=26 \
|
||||
background.padding_right=15 \
|
||||
label.drawing=off \
|
||||
associated_display=active \
|
||||
icon.color="$YELLOW"
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
COLOR="$ORANGE"
|
||||
|
||||
sketchybar --add item spotify q \
|
||||
--set spotify \
|
||||
scroll_texts=on \
|
||||
icon= \
|
||||
icon.color="$COLOR" \
|
||||
icon.padding_left=10 \
|
||||
background.color="$BAR_COLOR" \
|
||||
background.height=26 \
|
||||
background.corner_radius="$CORNER_RADIUS" \
|
||||
background.border_width="$BORDER_WIDTH" \
|
||||
background.border_color="$COLOR" \
|
||||
background.padding_right=-5 \
|
||||
background.drawing=on \
|
||||
label.padding_right=10 \
|
||||
label.max_chars=20 \
|
||||
associated_display=active \
|
||||
updates=on \
|
||||
script="$PLUGIN_DIR/spotify.sh" \
|
||||
--subscribe spotify media_change
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
COLOR="$GREEN"
|
||||
|
||||
sketchybar \
|
||||
--add item sound right \
|
||||
--set sound \
|
||||
icon.color="$COLOR" \
|
||||
icon.padding_left=10 \
|
||||
label.color="$COLOR" \
|
||||
label.padding_right=10 \
|
||||
background.height=26 \
|
||||
background.corner_radius="$CORNER_RADIUS" \
|
||||
background.padding_right=5 \
|
||||
background.border_width="$BORDER_WIDTH" \
|
||||
background.border_color="$COLOR" \
|
||||
background.color="$BAR_COLOR" \
|
||||
background.drawing=on \
|
||||
script="$PLUGIN_DIR/sound.sh" \
|
||||
--subscribe sound volume_change
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
sketchybar -m --add item vpn right \
|
||||
--set vpn icon= \
|
||||
update_freq=5 \
|
||||
script="~/.config/sketchybar/plugins/vpn.sh"
|
||||
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
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Color Palette
|
||||
# Tokyonight Night
|
||||
BLACK=0xff24283b
|
||||
WHITE=0xffa9b1d6
|
||||
MAGENTA=0xffbb9af7
|
||||
BLUE=0xff7aa2f7
|
||||
CYAN=0xff7dcfff
|
||||
GREEN=0xff9ece6a
|
||||
YELLOW=0xffe0af68
|
||||
ORANGE=0xffff9e64
|
||||
RED=0xfff7768e
|
||||
BAR_COLOR=0xff1a1b26
|
||||
COMMENT=0xff565f89
|
||||
|
||||
# Tokyonight Day
|
||||
# BLACK=0xffe9e9ed
|
||||
# WHITE=0xff3760bf
|
||||
# MAGENTA=0xff9854f1
|
||||
# BLUE=0xff2e7de9
|
||||
# CYAN=0xff007197
|
||||
# GREEN=0xff587539
|
||||
# YELLOW=0xff8c6c3e
|
||||
# ORANGE=0xffb15c00
|
||||
# RED=0xfff52a65
|
||||
# BAR_COLOR=0xffe1e2e7
|
||||
|
||||
TRANSPARENT=0x00000000
|
||||
|
||||
# General bar colors
|
||||
ICON_COLOR=$WHITE # Color of all icons
|
||||
LABEL_COLOR=$WHITE # Color of all labels
|
||||
|
||||
ITEM_DIR="$HOME/.config/sketchybar/items"
|
||||
PLUGIN_DIR="$HOME/.config/sketchybar/plugins"
|
||||
|
||||
FONT="Iosevka Nerd Font"
|
||||
|
||||
PADDINGS=3
|
||||
|
||||
POPUP_BORDER_WIDTH=2
|
||||
POPUP_CORNER_RADIUS=11
|
||||
POPUP_BACKGROUND_COLOR=$BLACK
|
||||
POPUP_BORDER_COLOR=$COMMENT
|
||||
|
||||
CORNER_RADIUS=15
|
||||
BORDER_WIDTH=2
|
||||
|
||||
SHADOW=on
|
||||
Reference in New Issue
Block a user