authorgravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-05-07 08:20:01-07:00
committergravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-05-07 08:20:01-07:00
log474cf9441e765dd0c6c8f76b9d16c1d7b63a6442
tree0e1565d747e08d0845f2d60bf929a9e6581abebd
parentfbad532ae9e5541455ffb0829262a4859ff1165d
signature Commit is signed but in an unrecognized format.

sketchybar stuff


11 files changed, 200 insertions(+), 137 deletions(-)

.gitignore+2
...@@ -1 +1,3 @@...@@ -1 +1,3 @@
1flake.lock1flake.lock
2.DS_STORE
3**/.DS_STORE
files/sketchybar/executable_colors.sh created100644→100755
files/sketchybar/executable_icons.sh deleted-31
...@@ -1,31 +0,0 @@
1#!/usr/bin/env sh
2
3# General Icons
4LOADING=􀖇
5APPLE=􀣺
6PREFERENCES=􀺽
7ACTIVITY=􀒓
8LOCK=􀒳
9BELL=􀋚
10BELL_DOT=􀝗
11
12# Git Icons
13GIT_ISSUE=􀍷
14GIT_DISCUSSION=􀒤
15GIT_PULL_REQUEST=􀙡
16GIT_COMMIT=􀡚
17GIT_INDICATOR=􀂓
18
19# Spotify Icons
20SPOTIFY_BACK=􀊎
21SPOTIFY_PLAY_PAUSE=􀊈
22SPOTIFY_NEXT=􀊐
23SPOTIFY_SHUFFLE=􀊝
24SPOTIFY_REPEAT=􀊞
25
26# Yabai Icons
27YABAI_STACK=􀏭
28YABAI_FULLSCREEN_ZOOM=􀏜
29YABAI_PARENT_ZOOM=􀥃
30YABAI_FLOAT=􀢌
31YABAI_GRID=􀧍
files/sketchybar/icons.sh created+31
...@@ -0,0 +1,31 @@
1#!/usr/bin/env sh
2
3# General Icons
4LOADING=􀖇
5APPLE=􀣺
6PREFERENCES=􀺽
7ACTIVITY=􀒓
8LOCK=􀒳
9BELL=􀋚
10BELL_DOT=􀝗
11
12# Git Icons
13GIT_ISSUE=􀍷
14GIT_DISCUSSION=􀒤
15GIT_PULL_REQUEST=􀙡
16GIT_COMMIT=􀡚
17GIT_INDICATOR=􀂓
18
19# Spotify Icons
20SPOTIFY_BACK=􀊎
21SPOTIFY_PLAY_PAUSE=􀊈
22SPOTIFY_NEXT=􀊐
23SPOTIFY_SHUFFLE=􀊝
24SPOTIFY_REPEAT=􀊞
25
26# Yabai Icons
27YABAI_STACK=􀏭
28YABAI_FULLSCREEN_ZOOM=􀏜
29YABAI_PARENT_ZOOM=􀥃
30YABAI_FLOAT=􀢌
31YABAI_GRID=􀧍
files/sketchybar/plugins/executable_yabai.sh deleted-76
...@@ -1,76 +0,0 @@
1#!/bin/sh
2
3window_state() {
4 source "$HOME/.config/sketchybar/colors.sh"
5 source "$HOME/.config/sketchybar/icons.sh"
6
7 WINDOW=$(yabai -m query --windows --window)
8 CURRENT=$(echo "$WINDOW" | jq '.["stack-index"]')
9
10 args=()
11 if [[ $CURRENT -gt 0 ]]; then
12 LAST=$(yabai -m query --windows --window stack.last | jq '.["stack-index"]')
13 args+=(--set $NAME icon=$YABAI_STACK icon.color=$RED label.drawing=on label=$(printf "[%s/%s]" "$CURRENT" "$LAST"))
14 yabai -m config active_window_border_color $RED > /dev/null 2>&1 &
15
16 else
17 args+=(--set $NAME label.drawing=off)
18 case "$(echo "$WINDOW" | jq '.["is-floating"]')" in
19 "false")
20 if [ "$(echo "$WINDOW" | jq '.["has-fullscreen-zoom"]')" = "true" ]; then
21 args+=(--set $NAME icon=$YABAI_FULLSCREEN_ZOOM icon.color=$GREEN)
22 yabai -m config active_window_border_color $GREEN > /dev/null 2>&1 &
23 elif [ "$(echo "$WINDOW" | jq '.["has-parent-zoom"]')" = "true" ]; then
24 args+=(--set $NAME icon=$YABAI_PARENT_ZOOM icon.color=$BLUE)
25 yabai -m config active_window_border_color $BLUE > /dev/null 2>&1 &
26 else
27 args+=(--set $NAME icon=$YABAI_GRID icon.color=$ORANGE)
28 yabai -m config active_window_border_color $WHITE > /dev/null 2>&1 &
29 fi
30 ;;
31 "true")
32 args+=(--set $NAME icon=$YABAI_FLOAT icon.color=$MAGENTA)
33 yabai -m config active_window_border_color $MAGENTA > /dev/null 2>&1 &
34 ;;
35 esac
36 fi
37
38 sketchybar -m "${args[@]}"
39}
40
41windows_on_spaces () {
42 CURRENT_SPACES="$(yabai -m query --displays | jq -r '.[].spaces | @sh')"
43
44 args=()
45 while read -r line
46 do
47 for space in $line
48 do
49 icon_strip=" "
50 apps=$(yabai -m query --windows --space $space | jq -r ".[].app")
51 for app in $apps
52 do
53 icon_strip+=" $($HOME/.config/sketchybar/plugins/icon_map.sh "$app")"
54 done
55 args+=(--set space.$space label="$icon_strip" label.drawing=on)
56 done
57 done <<< "$CURRENT_SPACES"
58
59 sketchybar -m "${args[@]}"
60}
61
62mouse_clicked() {
63 yabai -m window --toggle float
64 update
65}
66
67case "$SENDER" in
68 "mouse.clicked") mouse_clicked
69 ;;
70 "forced") exit 0
71 ;;
72 "window_focus") window_state
73 ;;
74 "windows_on_spaces") windows_on_spaces
75 ;;
76esac
flake.lock+125
...@@ -1,5 +1,33 @@...@@ -1,5 +1,33 @@
1{1{
2 "nodes": {2 "nodes": {
3 "apple-fonts": {
4 "inputs": {
5 "nixpkgs": [
6 "nixpkgs"
7 ],
8 "ny": "ny",
9 "sf-arabic": "sf-arabic",
10 "sf-armenian": "sf-armenian",
11 "sf-compact": "sf-compact",
12 "sf-georgian": "sf-georgian",
13 "sf-hebrew": "sf-hebrew",
14 "sf-mono": "sf-mono",
15 "sf-pro": "sf-pro"
16 },
17 "locked": {
18 "lastModified": 1740961576,
19 "narHash": "sha256-9L6d3owtajM72YvUOpK1zYle2nM0BpsuopbF9lm9lJs=",
20 "owner": "Lyndeno",
21 "repo": "apple-fonts.nix",
22 "rev": "4df58996ed654f6ce9b71b41c1826484c6870739",
23 "type": "github"
24 },
25 "original": {
26 "owner": "Lyndeno",
27 "repo": "apple-fonts.nix",
28 "type": "github"
29 }
30 },
3 "base16": {31 "base16": {
4 "inputs": {32 "inputs": {
5 "fromYaml": "fromYaml"33 "fromYaml": "fromYaml"
...@@ -805,8 +833,21 @@...@@ -805,8 +833,21 @@
805 "type": "github"833 "type": "github"
806 }834 }
807 },835 },
836 "ny": {
837 "flake": false,
838 "locked": {
839 "narHash": "sha256-3257NAH4qlan2YHVLpNRy7x8IJqR2pal3OzFo/ykqXs=",
840 "type": "file",
841 "url": "https://devimages-cdn.apple.com/design/resources/download/NY.dmg"
842 },
843 "original": {
844 "type": "file",
845 "url": "https://devimages-cdn.apple.com/design/resources/download/NY.dmg"
846 }
847 },
808 "root": {848 "root": {
809 "inputs": {849 "inputs": {
850 "apple-fonts": "apple-fonts",
810 "darwin": "darwin",851 "darwin": "darwin",
811 "home-manager": "home-manager",852 "home-manager": "home-manager",
812 "moonlight": "moonlight",853 "moonlight": "moonlight",
...@@ -864,6 +905,90 @@...@@ -864,6 +905,90 @@
864 "type": "github"905 "type": "github"
865 }906 }
866 },907 },
908 "sf-arabic": {
909 "flake": false,
910 "locked": {
911 "narHash": "sha256-/0gjRimqvZyE60xYxxPdlU+7Q2LJnnvtbmwOP0YmS9U=",
912 "type": "file",
913 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Arabic.dmg"
914 },
915 "original": {
916 "type": "file",
917 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Arabic.dmg"
918 }
919 },
920 "sf-armenian": {
921 "flake": false,
922 "locked": {
923 "narHash": "sha256-rRoDkbNMYkzOHZmQm96Zv80TZvRlAeoxkv4pMHP5nUg=",
924 "type": "file",
925 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Armenian.dmg"
926 },
927 "original": {
928 "type": "file",
929 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Armenian.dmg"
930 }
931 },
932 "sf-compact": {
933 "flake": false,
934 "locked": {
935 "narHash": "sha256-J72Lyt2wy83E46wN8w6/Rih9kilM9wEjtY6KnbF0DsA=",
936 "type": "file",
937 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Compact.dmg"
938 },
939 "original": {
940 "type": "file",
941 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Compact.dmg"
942 }
943 },
944 "sf-georgian": {
945 "flake": false,
946 "locked": {
947 "narHash": "sha256-IevVNOC28IiR45YfI3PsZzXLMRxuB5u7UiE53Zn6tRU=",
948 "type": "file",
949 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Georgian.dmg"
950 },
951 "original": {
952 "type": "file",
953 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Georgian.dmg"
954 }
955 },
956 "sf-hebrew": {
957 "flake": false,
958 "locked": {
959 "narHash": "sha256-Dw84kYwMpCtKKKqm8cZcQ9TZ7GayU5MO7W0LJw0Rcwk=",
960 "type": "file",
961 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Hebrew.dmg"
962 },
963 "original": {
964 "type": "file",
965 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Hebrew.dmg"
966 }
967 },
968 "sf-mono": {
969 "flake": false,
970 "locked": {
971 "narHash": "sha256-ICdHRFdNL7PM/fXJUzS7LgZxZiqcyIuCMHLze4En4vg=",
972 "type": "file",
973 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Mono.dmg"
974 },
975 "original": {
976 "type": "file",
977 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Mono.dmg"
978 }
979 },
980 "sf-pro": {
981 "flake": false,
982 "locked": {
983 "narHash": "sha256-Q/pOQ4MGhW/ZtLka+UUQcwSoZFDWW34XvutxL4GvzUY=",
984 "type": "file",
985 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg"
986 },
987 "original": {
988 "type": "file",
989 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg"
990 }
991 },
867 "stylix": {992 "stylix": {
868 "inputs": {993 "inputs": {
869 "base16": "base16",994 "base16": "base16",
flake.nix+5
...@@ -13,6 +13,11 @@...@@ -13,6 +13,11 @@
13 inputs.nixpkgs.follows = "nixpkgs";13 inputs.nixpkgs.follows = "nixpkgs";
14 };14 };
1515
16 apple-fonts = {
17 url = "github:Lyndeno/apple-fonts.nix";
18 inputs.nixpkgs.follows = "nixpkgs";
19 };
20
16 nixvim = {21 nixvim = {
17 url = "github:nix-community/nixvim";22 url = "github:nix-community/nixvim";
18 inputs.nixpkgs.follows = "nixpkgs";23 inputs.nixpkgs.follows = "nixpkgs";
modules/macos/homebrew.nix+1
...@@ -22,6 +22,7 @@ _: {...@@ -22,6 +22,7 @@ _: {
22 "zulip"22 "zulip"
23 "zen-browser"23 "zen-browser"
24 "supertuxkart"24 "supertuxkart"
25 "sf-symbols"
2526
26 "mediosz/tap/swipeaerospace"27 "mediosz/tap/swipeaerospace"
27 ];28 ];
modules/macos/tiling/aerospace.nix+4-1
...@@ -110,7 +110,10 @@...@@ -110,7 +110,10 @@
110 up = "volume up";110 up = "volume up";
111 shift-down = ["volume set 0" "mode main"];111 shift-down = ["volume set 0" "mode main"];
112 };112 };
113 after-startup-command = ["exec-and-forget sketchybar"];113 after-startup-command = [
114 "exec-and-forget sketchybar"
115 "exec-and-forget open /Applications/SwipeAeroSpace.app"
116 ];
114 exec-on-workspace-change = [117 exec-on-workspace-change = [
115 "/bin/bash"118 "/bin/bash"
116 "-c"119 "-c"
modules/macos/tiling/sketchybar-home.nix+30-29
...@@ -1,5 +1,11 @@...@@ -1,5 +1,11 @@
1{pkgs, ...}: let1{
2 folder = "../../../files/sketchybar/";2 pkgs,
3 config,
4 ...
5}: let
6 # folder = "${config.home.homeDirectory}.dotfiles/files/sketchybar";
7 # folder = "~/.dotfiles/files/sketchybar";
8 folder = ../../../files/sketchybar;
3in {9in {
4 home.file = {10 home.file = {
5 sketchybarrc = {11 sketchybarrc = {
...@@ -27,16 +33,16 @@ in {...@@ -27,16 +33,16 @@ in {
27 # launchctl unload -F /System/Library/LaunchAgents/com.apple.OSDUIHelper.plist > /dev/null 2>&1 &33 # launchctl unload -F /System/Library/LaunchAgents/com.apple.OSDUIHelper.plist > /dev/null 2>&1 &
2834
29 # Setting up the general bar appearance and default values35 # Setting up the general bar appearance and default values
30 ${pkgs.sketchybar}/bin/sketchybar --bar height=50 \36 ${pkgs.sketchybar}/bin/sketchybar --bar height=40 \
31 color=$BAR_COLOR \37 color=$BAR_COLOR \
32 shadow=off \38 shadow=off \
33 position=top \39 position=top \
34 sticky=on \40 sticky=on \
35 padding_right=7 \41 padding_right=0 \
36 padding_left=7 \42 padding_left=0 \
37 corner_radius=12 \43 corner_radius=12 \
38 y_offset=20 \44 y_offset=0 \
39 margin=40 \45 margin=2 \
40 blur_radius=0 \46 blur_radius=0 \
41 notch_width=0 \47 notch_width=0 \
42 --default updates=when_shown \48 --default updates=when_shown \
...@@ -83,7 +89,7 @@ in {...@@ -83,7 +89,7 @@ in {
83 icons = {89 icons = {
84 executable = true;90 executable = true;
85 target = ".config/sketchybar/icons.sh";91 target = ".config/sketchybar/icons.sh";
86 text = builtins.readFile "${folder}/executable_icons.sh";92 source = folder + /icons.sh;
87 };93 };
88 colors = {94 colors = {
89 executable = true;95 executable = true;
...@@ -120,12 +126,12 @@ in {...@@ -120,12 +126,12 @@ in {
120 items_apple = {126 items_apple = {
121 executable = true;127 executable = true;
122 target = ".config/sketchybar/items/apple.sh";128 target = ".config/sketchybar/items/apple.sh";
123 text = builtins.readFile "${folder}/items/executable_apple.sh";129 source = folder + /items/executable_apple.sh;
124 };130 };
125 items_brew = {131 items_brew = {
126 executable = true;132 executable = true;
127 target = ".config/sketchybar/items/brew.sh";133 target = ".config/sketchybar/items/brew.sh";
128 text = builtins.readFile "${folder}/items/executable_brew.sh";134 source = folder + /items/executable_brew.sh;
129 };135 };
130 items_calendar = {136 items_calendar = {
131 executable = true;137 executable = true;
...@@ -149,12 +155,12 @@ in {...@@ -149,12 +155,12 @@ in {
149 items_cpu = {155 items_cpu = {
150 executable = true;156 executable = true;
151 target = ".config/sketchybar/items/cpu.sh";157 target = ".config/sketchybar/items/cpu.sh";
152 text = builtins.readFile "${folder}/items/executable_cpu.sh";158 source = folder + /items/executable_cpu.sh;
153 };159 };
154 items_divider = {160 items_divider = {
155 executable = true;161 executable = true;
156 target = ".config/sketchybar/items/divider.sh";162 target = ".config/sketchybar/items/divider.sh";
157 text = builtins.readFile "${folder}/items/executable_divider.sh";163 source = folder + /items/executable_divider.sh;
158 };164 };
159 items_front_app = {165 items_front_app = {
160 executable = true;166 executable = true;
...@@ -165,7 +171,7 @@ in {...@@ -165,7 +171,7 @@ in {
165 sketchybar --add event window_focus \171 sketchybar --add event window_focus \
166 --add event windows_on_spaces \172 --add event windows_on_spaces \
167 --add item system.aerospace left \173 --add item system.aerospace left \
168 --set system.aerospace script="$PLUGIN_DIR/yabai.sh" \174 --set system.aerospace script="$PLUGIN_DIR/aerospace.sh" \
169 icon.font="$FONT:Bold:16.0" \175 icon.font="$FONT:Bold:16.0" \
170 label.drawing=off \176 label.drawing=off \
171 icon.width=30 \177 icon.width=30 \
...@@ -190,7 +196,7 @@ in {...@@ -190,7 +196,7 @@ in {
190 items_github = {196 items_github = {
191 executable = true;197 executable = true;
192 target = ".config/sketchybar/items/github.sh";198 target = ".config/sketchybar/items/github.sh";
193 text = builtins.readFile "${folder}/items/executable_github.sh";199 source = folder + /items/executable_github.sh;
194 };200 };
195 items_spaces = {201 items_spaces = {
196 executable = true;202 executable = true;
...@@ -216,7 +222,7 @@ in {...@@ -216,7 +222,7 @@ in {
216 background.drawing=on \222 background.drawing=on \
217 script="$PLUGIN_DIR/aerospace.sh $sid" \223 script="$PLUGIN_DIR/aerospace.sh $sid" \
218 click_script="aerospace workspace $sid" \224 click_script="aerospace workspace $sid" \
219 label.font="JetBrainsMono Nerd Font:Regular:16.0" \225 label.font="Iosevka Nerd Font:Regular:16.0" \
220 label.padding_right=33 \226 label.padding_right=33 \
221 label.background.height=26 \227 label.background.height=26 \
222 label.background.drawing=on \228 label.background.drawing=on \
...@@ -225,7 +231,7 @@ in {...@@ -225,7 +231,7 @@ in {
225 done231 done
226 ${pkgs.sketchybar}/bin/sketchybar --add item separator left \232 ${pkgs.sketchybar}/bin/sketchybar --add item separator left \
227 --set separator icon= \233 --set separator icon= \
228 icon.font="JetBrainsMono Nerd Font:Regular:16.0" \234 icon.font="Iosevka Nerd Font:Regular:16.0" \
229 background.padding_left=26 \235 background.padding_left=26 \
230 background.padding_right=15 \236 background.padding_right=15 \
231 label.drawing=off \237 label.drawing=off \
...@@ -236,7 +242,7 @@ in {...@@ -236,7 +242,7 @@ in {
236 items_spotify = {242 items_spotify = {
237 executable = true;243 executable = true;
238 target = ".config/sketchybar/items/spotify.sh";244 target = ".config/sketchybar/items/spotify.sh";
239 text = builtins.readFile "${folder}/items/executable_spotify.sh";245 source = folder + /items/executable_spotify.sh;
240 };246 };
241 items_volume = {247 items_volume = {
242 executable = true;248 executable = true;
...@@ -277,32 +283,32 @@ in {...@@ -277,32 +283,32 @@ in {
277 plugins_brew = {283 plugins_brew = {
278 executable = true;284 executable = true;
279 target = ".config/sketchybar/plugins/brew.sh";285 target = ".config/sketchybar/plugins/brew.sh";
280 text = builtins.readFile "${folder}/plugins/executable_brew.sh";286 source = folder + /plugins/executable_brew.sh;
281 };287 };
282 plugins_calendar = {288 plugins_calendar = {
283 executable = true;289 executable = true;
284 target = ".config/sketchybar/plugins/calendar.sh";290 target = ".config/sketchybar/plugins/calendar.sh";
285 text = builtins.readFile "${folder}/plugins/executable_calendar.sh";291 source = folder + /plugins/executable_calendar.sh;
286 };292 };
287 plugins_github = {293 plugins_github = {
288 executable = true;294 executable = true;
289 target = ".config/sketchybar/plugins/github.sh";295 target = ".config/sketchybar/plugins/github.sh";
290 text = builtins.readFile "${folder}/plugins/executable_github.sh";296 source = folder + /plugins/executable_github.sh;
291 };297 };
292 plugins_icon_map = {298 plugins_icon_map = {
293 executable = true;299 executable = true;
294 target = ".config/sketchybar/plugins/icon_map.sh";300 target = ".config/sketchybar/plugins/icon_map.sh";
295 text = builtins.readFile "${folder}/plugins/executable_icon_map.sh";301 source = folder + /plugins/executable_icon_map.sh;
296 };302 };
297 plugins_space = {303 plugins_space = {
298 executable = true;304 executable = true;
299 target = ".config/sketchybar/plugins/space.sh";305 target = ".config/sketchybar/plugins/space.sh";
300 text = builtins.readFile "${folder}/plugins/executable_space.sh";306 source = folder + /plugins/executable_space.sh;
301 };307 };
302 plugins_spotify = {308 plugins_spotify = {
303 executable = true;309 executable = true;
304 target = ".config/sketchybar/plugins/spotify.sh";310 target = ".config/sketchybar/plugins/spotify.sh";
305 text = builtins.readFile "${folder}/plugins/executable_spotify.sh";311 source = folder + /plugins/executable_spotify.sh;
306 };312 };
307 plugins_volume = {313 plugins_volume = {
308 executable = true;314 executable = true;
...@@ -347,15 +353,10 @@ in {...@@ -347,15 +353,10 @@ in {
347 fi353 fi
348 '';354 '';
349 };355 };
350 plugins_yabai = {
351 executable = true;
352 target = ".config/sketchybar/plugins/yabai.sh";
353 text = builtins.readFile "${folder}/plugins/executable_yabai.sh";
354 };
355 plugins_zen = {356 plugins_zen = {
356 executable = true;357 executable = true;
357 target = ".config/sketchybar/plugins/zen.sh";358 target = ".config/sketchybar/plugins/zen.sh";
358 text = builtins.readFile "${folder}/plugins/executable_zen.sh";359 source = folder + /plugins/executable_zen.sh;
359 };360 };
360 plugins_aerospace = {361 plugins_aerospace = {
361 executable = true;362 executable = true;
modules/shared/extras.nix+2
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1{1{
2 inputs,
2 pkgs,3 pkgs,
3 userSettings,4 userSettings,
4 ...5 ...
...@@ -13,6 +14,7 @@...@@ -13,6 +14,7 @@
13 iosevka14 iosevka
14 nerd-fonts.symbols-only15 nerd-fonts.symbols-only
15 nerd-fonts.iosevka16 nerd-fonts.iosevka
17 inputs.apple-fonts.packages.${pkgs.system}.sf-pro
16 ];18 ];
1719
18 # Set your time zone.20 # Set your time zone.