aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Schanzenbacher <ryan@rschanz.org>2026-07-06 22:50:11 -0400
committerRyan Schanzenbacher <ryan@rschanz.org>2026-07-06 22:50:11 -0400
commit8f71fac972b4fe5a98459148d9b33d1748deaa7f (patch)
tree4889a076747ac560770ba16330a6ba6771ab6bc4
parent78690d5e544616e73562e13d0c27bd910480111c (diff)
initial simple-bar config
-rw-r--r--hosts/RyanMac/configuration.nix18
-rw-r--r--modules/darwin/random-wallpaper.nix45
-rw-r--r--users/ryan/home.nix3
-rw-r--r--users/ryan/modules/simple-bar/default.nix35
-rw-r--r--users/ryan/modules/simple-bar/server.nix34
-rw-r--r--users/ryan/modules/simple-bar/simplebarrc289
6 files changed, 378 insertions, 46 deletions
diff --git a/hosts/RyanMac/configuration.nix b/hosts/RyanMac/configuration.nix
index bb6bafc..1327c91 100644
--- a/hosts/RyanMac/configuration.nix
+++ b/hosts/RyanMac/configuration.nix
@@ -1,4 +1,4 @@
1{ pkgs, inputs, lib, ... }: 1{ config, pkgs, inputs, lib, ... }:
2let 2let
3 username = "ryan"; 3 username = "ryan";
4 4
@@ -86,6 +86,21 @@ in {
86 }; 86 };
87 extraConfig = '' 87 extraConfig = ''
88 yabai -m rule --add app='System Settings' manage=off 88 yabai -m rule --add app='System Settings' manage=off
89 ''
90 # Add simple-bar signals if enabled
91 + lib.optionalString config.home-manager.users.${username}.ryan.simple-bar.enable ''
92 yabai -m signal --add event=window_focused action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows when focused application changes"
93 yabai -m signal --add event=window_resized action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows when a window is resized"
94 yabai -m signal --add event=window_destroyed action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-ba spaces & windows when an application window is closed"
95 yabai -m signal --add event=space_changed action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows on space change"
96 yabai -m signal --add event=display_changed action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows on display focus change"
97 yabai -m signal --add event=window_title_changed action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows when current window title changes"
98 yabai -m signal --add event=space_destroyed action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows on space removal"
99 yabai -m signal --add event=space_created action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows on space creation"
100 yabai -m signal --add event=application_activated action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows when application is activated"
101 yabai -m signal --add event=display_added action="curl http://localhost:7776/yabai/displays/refresh" label="Refresh simple-bar displays when a new dispay is added"
102 yabai -m signal --add event=display_removed action="curl http://localhost:7776/yabai/displays/refresh" label="Refresh simple-bar displays when a dispay is removed"
103 yabai -m signal --add event=display_moved action="curl http://localhost:7776/yabai/displays/refresh" label="Refresh simple-bar displays when a dispay is moved"
89 ''; 104 '';
90 }; 105 };
91 106
@@ -157,6 +172,7 @@ in {
157 "ungoogled-chromium" 172 "ungoogled-chromium"
158 "tailscale-app" 173 "tailscale-app"
159 "netbird-ui" 174 "netbird-ui"
175 "ubersicht"
160 ]; 176 ];
161 }; 177 };
162 178
diff --git a/modules/darwin/random-wallpaper.nix b/modules/darwin/random-wallpaper.nix
deleted file mode 100644
index 793096f..0000000
--- a/modules/darwin/random-wallpaper.nix
+++ /dev/null
@@ -1,45 +0,0 @@
1{ config, lib, pkgs, ... }:
2let
3 cfg = config.local.randomWallpaper;
4 script = pkgs.writeShellApplication {
5 name = "set-random-wallpaper";
6 runtimeInputs = [ pkgs.coreutils pkgs.findutils ];
7 text = ''
8 set -euo pipefail
9 img=$(find "${cfg.directory}" \
10 -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' \) \
11 | shuf -n1)
12 [ -n "$img" ] || exit 0
13 #/usr/bin/osascript -e "tell application \"System Events\" to tell every desktop to set picture to \"$img\""
14 #desktoppr "$img"
15 URL="file://$img"
16 PLIST="${config.users.users.${config.system.primaryUser}.home}/Library/Application Support/com.apple.wallpaper/Store/Index.plist"
17 /usr/libexec/PlistBuddy -c "set AllSpacesAndDisplays:Desktop:Content:Choices:0:Files:0:relative $URL" "$PLIST"
18 /usr/bin/killall WallpaperAgent 2>/dev/null || true
19 '';
20 };
21in
22{
23 options.local.randomWallpaper = {
24 enable = lib.mkEnableOption "Random Rotating Wallpaper";
25 directory = lib.mkOption {
26 type = lib.types.str;
27 description = "Folder containing images";
28 };
29 interval = lib.mkOption {
30 type = lib.types.int;
31 default = 1800;
32 description = "Seconds between wallpaper changes";
33 };
34 };
35
36 config = lib.mkIf cfg.enable {
37 launchd.user.agents.random-wallpaper.serviceConfig = {
38 Label = "org.rschanz.wallpaperDaemon";
39 ProgramArguments = [ "${script}/bin/set-random-wallpaper" ];
40 StartInterval = cfg.interval;
41 RunAtLoad = true;
42 ProcessType = "Background";
43 };
44 };
45}
diff --git a/users/ryan/home.nix b/users/ryan/home.nix
index 5542baa..de34c60 100644
--- a/users/ryan/home.nix
+++ b/users/ryan/home.nix
@@ -15,6 +15,7 @@
15 15
16 # My own modules 16 # My own modules
17 ryan.neovim.enable = true; 17 ryan.neovim.enable = true;
18 ryan.simple-bar.enable = pkgs.stdenv.isDarwin;
18 19
19 programs.starship = { 20 programs.starship = {
20 enable = true; 21 enable = true;
@@ -88,6 +89,8 @@
88 }; 89 };
89 }; 90 };
90 91
92
93
91 services.gpg-agent = { 94 services.gpg-agent = {
92 enable = pkgs.stdenv.isLinux; 95 enable = pkgs.stdenv.isLinux;
93 enableSshSupport = true; 96 enableSshSupport = true;
diff --git a/users/ryan/modules/simple-bar/default.nix b/users/ryan/modules/simple-bar/default.nix
new file mode 100644
index 0000000..116216f
--- /dev/null
+++ b/users/ryan/modules/simple-bar/default.nix
@@ -0,0 +1,35 @@
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let
6 cfg = config.ryan.simple-bar;
7 # Fetch the git repo at a specific rev
8 "simple-bar-upstream" = builtins.fetchGit {
9 url = "https://github.com/Jean-Tinland/simple-bar";
10 rev = "fb5cada548a05bd01f727772c0a18fd8c7f65b42";
11 shallow = true;
12 };
13in
14{
15 options.ryan.simple-bar.enable = mkEnableOption "simple-bar";
16
17 config = mkIf cfg.enable {
18 home.file."Library/Application Support/Übersicht/widgets/simple-bar" = {
19 source = simple-bar-upstream;
20 recursive = false;
21 };
22 home.file.".simplebarrc".source = ./simplebarrc;
23
24 # Install the LaunchD services
25 launchd.agents.simple-bar-server = import ./server.nix { inherit config lib pkgs; };
26
27 launchd.agents.ubersicht = {
28 enable = true;
29 config = {
30 ProgramArguments = [ "/usr/bin/open" "-a" "Übersicht" ];
31 RunAtLoad = true;
32 };
33 };
34 };
35}
diff --git a/users/ryan/modules/simple-bar/server.nix b/users/ryan/modules/simple-bar/server.nix
new file mode 100644
index 0000000..f9b636c
--- /dev/null
+++ b/users/ryan/modules/simple-bar/server.nix
@@ -0,0 +1,34 @@
1{ pkgs, lib, ... }:
2let
3 src = builtins.fetchGit {
4 url = "https://github.com/Jean-Tinland/simple-bar-server.git";
5 rev = "0c99921d023b459e44bbba8cca6d8947262359b6";
6 shallow = true;
7 };
8
9 simple-bar-server = pkgs.buildNpmPackage {
10 pname = "simple-bar-server";
11 version = "0-unstable";
12 inherit src;
13
14 npmDepsHash = "sha256-JKUiOqAAoE/TJriErvaaT03uKtX8t1gFh+JzG4GcriI=";
15 dontNpmBuild = true; # no build script, it's just a server
16
17 installPhase = ''
18 runHook preInstall
19 mkdir -p $out/lib/simple-bar-server
20 cp -r . $out/lib/simple-bar-server/
21 runHook postInstall
22 '';
23 };
24in
25{
26 enable = true;
27 config = {
28 ProgramArguments = [ "${pkgs.nodejs}/bin/node" "${simple-bar-server}/lib/simple-bar-server/index.js" ];
29 KeepAlive = true;
30 RunAtLoad = true;
31 StandardOutPath = "/tmp/simple-bar-server.out.log";
32 StandardErrorPath = "/tmp/simple-bar-server.err.log";
33 };
34}
diff --git a/users/ryan/modules/simple-bar/simplebarrc b/users/ryan/modules/simple-bar/simplebarrc
new file mode 100644
index 0000000..8c32fb1
--- /dev/null
+++ b/users/ryan/modules/simple-bar/simplebarrc
@@ -0,0 +1,289 @@
1{
2 "$schema": "https://raw.githubusercontent.com/Jean-Tinland/simple-bar/refs/heads/master/lib/schemas/config.json",
3 "global": {
4 "theme": "auto",
5 "compactMode": false,
6 "floatingBar": false,
7 "noBarBg": false,
8 "noColorInData": true,
9 "bottomBar": false,
10 "sideDecoration": false,
11 "inlineSpacesOptions": false,
12 "disableAnimations": false,
13 "spacesBackgroundColorAsForeground": false,
14 "widgetsBackgroundColorAsForeground": false,
15 "widgetMaxWidth": "160px",
16 "slidingAnimationPace": 4,
17 "font": "JetBrains Mono, Monaco, Menlo, monospace",
18 "fontSize": "11px",
19 "yabaiPath": "$(which yabai)",
20 "aerospacePath": "$(which aerospace)",
21 "windowManager": "yabai",
22 "shell": "sh",
23 "terminal": "Terminal",
24 "disableNotifications": false,
25 "enableMissives": false,
26 "enableServer": true,
27 "serverSocketPort": 7777,
28 "yabaiServerRefresh": true,
29 "aerospaceServerRefresh": false
30 },
31 "themes": {
32 "lightTheme": "NightShiftLight",
33 "darkTheme": "NightShiftDark",
34 "colorMain": "",
35 "colorMainAlt": "",
36 "colorMinor": "",
37 "colorAccent": "",
38 "colorRed": "",
39 "colorGreen": "",
40 "colorYellow": "",
41 "colorOrange": "",
42 "colorBlue": "",
43 "colorMagenta": "",
44 "colorCyan": "",
45 "colorBlack": "",
46 "colorWhite": "",
47 "colorForeground": "",
48 "colorBackground": ""
49 },
50 "process": {
51 "showOnDisplay": "",
52 "displayForFocusedSpace": false,
53 "displayOnlyCurrent": false,
54 "centered": false,
55 "showCurrentSpaceMode": false,
56 "hideWindowTitle": false,
57 "displayOnlyIcon": true,
58 "expandAllProcesses": false,
59 "displaySkhdMode": false,
60 "displayStackIndex": true,
61 "displayOnlyCurrentStack": false
62 },
63 "spacesDisplay": {
64 "showOnDisplay": "",
65 "exclusions": "",
66 "titleExclusions": "",
67 "spacesExclusions": "",
68 "exclusionsAsRegex": false,
69 "displayAllSpacesOnAllScreens": false,
70 "hideDuplicateAppsInSpaces": false,
71 "displayStickyWindowsSeparately": false,
72 "hideCreateSpaceButton": false,
73 "hideEmptySpaces": false,
74 "showOptionsOnHover": true,
75 "switchSpacesWithoutYabai": false,
76 "customAeroSpaceDisplayIndexes": {}
77 },
78 "widgets": {
79 "processWidget": true,
80 "githubWidget": false,
81 "weatherWidget": true,
82 "netstatsWidget": false,
83 "cpuWidget": false,
84 "gpuWidget": false,
85 "memoryWidget": true,
86 "batteryWidget": true,
87 "wifiWidget": true,
88 "vpnWidget": false,
89 "zoomWidget": false,
90 "soundWidget": true,
91 "micWidget": false,
92 "dateWidget": true,
93 "timeWidget": true,
94 "keyboardWidget": false,
95 "spotifyWidget": false,
96 "cryptoWidget": false,
97 "stockWidget": false,
98 "youtubeMusicWidget": false,
99 "musicWidget": true,
100 "mpdWidget": false,
101 "browserTrackWidget": false,
102 "notificationsWidget": false,
103 "nextMeetingWidget": false
104 },
105 "githubWidgetOptions": {
106 "refreshFrequency": 600000,
107 "showOnDisplay": "",
108 "showIcon": true,
109 "hideWhenNoNotification": false,
110 "notificationUrl": "https://github.com/notifications",
111 "ghBinaryPath": "/opt/homebrew/bin/gh"
112 },
113 "weatherWidgetOptions": {
114 "refreshFrequency": 1800000,
115 "showOnDisplay": "",
116 "showIcon": true,
117 "unit": "F",
118 "hideLocation": false,
119 "hideGradient": false,
120 "customLocation": ""
121 },
122 "netstatsWidgetOptions": {
123 "refreshFrequency": 2000,
124 "showOnDisplay": "",
125 "showIcon": true,
126 "displayAsGraph": true,
127 "netstatsThreshold": 0
128 },
129 "cpuWidgetOptions": {
130 "refreshFrequency": 2000,
131 "showOnDisplay": "",
132 "showIcon": true,
133 "displayAsGraph": false,
134 "cpuUsageThreshold": 0,
135 "cpuMonitorApp": "Activity Monitor"
136 },
137 "gpuWidgetOptions": {
138 "refreshFrequency": 3000,
139 "showOnDisplay": "",
140 "showIcon": true,
141 "displayAsGraph": false,
142 "gpuMacmonBinaryPath": "/opt/homebrew/bin/macmon"
143 },
144 "memoryWidgetOptions": {
145 "refreshFrequency": 8000,
146 "showOnDisplay": "",
147 "showIcon": true,
148 "memoryUsageThreshold": 0,
149 "memoryMonitorApp": "Activity Monitor"
150 },
151 "batteryWidgetOptions": {
152 "refreshFrequency": 10000,
153 "showOnDisplay": "",
154 "showIcon": true,
155 "toggleCaffeinateOnClick": true,
156 "disableCaffeinateInvertedBackground": false,
157 "caffeinateOption": ""
158 },
159 "networkWidgetOptions": {
160 "refreshFrequency": 60000,
161 "showOnDisplay": "",
162 "showIcon": true,
163 "networkDevice": "en0",
164 "hideWifiIfDisabled": false,
165 "toggleWifiOnClick": false,
166 "hideNetworkName": true
167 },
168 "vpnWidgetOptions": {
169 "refreshFrequency": 8000,
170 "showOnDisplay": "",
171 "showIcon": true,
172 "vpnConnectionName": "",
173 "vpnShowConnectionName": false
174 },
175 "zoomWidgetOptions": {
176 "refreshFrequency": 5000,
177 "showOnDisplay": "",
178 "showVideo": true,
179 "showMic": true
180 },
181 "soundWidgetOptions": {
182 "refreshFrequency": 20000,
183 "showOnDisplay": "",
184 "showIcon": true
185 },
186 "micWidgetOptions": {
187 "refreshFrequency": 20000,
188 "showOnDisplay": "",
189 "showIcon": true
190 },
191 "dateWidgetOptions": {
192 "refreshFrequency": 30000,
193 "showOnDisplay": "",
194 "showIcon": true,
195 "shortDateFormat": true,
196 "locale": "en-UK",
197 "calendarApp": ""
198 },
199 "timeWidgetOptions": {
200 "refreshFrequency": 1000,
201 "showOnDisplay": "",
202 "showIcon": true,
203 "hour12": false,
204 "dayProgress": false,
205 "showSeconds": true
206 },
207 "keyboardWidgetOptions": {
208 "refreshFrequency": 20000,
209 "showOnDisplay": "",
210 "showIcon": true,
211 "keyboardMaxLength": 0
212 },
213 "cryptoWidgetOptions": {
214 "refreshFrequency": 300000,
215 "showOnDisplay": "",
216 "showIcon": true,
217 "denomination": "usd",
218 "identifiers": "bitcoin,ethereum,celo",
219 "precision": 5
220 },
221 "stockWidgetOptions": {
222 "refreshFrequency": 900000,
223 "showOnDisplay": "",
224 "showIcon": true,
225 "yahooFinanceApiKey": "YOUR_API_KEY",
226 "symbols": "AAPL,TSLA",
227 "showSymbol": true,
228 "showCurrency": true,
229 "showMarketPrice": true,
230 "showMarketChange": false,
231 "showMarketPercent": true,
232 "showColor": true
233 },
234 "spotifyWidgetOptions": {
235 "refreshFrequency": 10000,
236 "showOnDisplay": "",
237 "showIcon": true,
238 "showSpecter": true,
239 "showSpotifyMetadata": true
240 },
241 "youtubeMusicWidgetOptions": {
242 "refreshFrequency": 10000,
243 "showOnDisplay": "",
244 "showIcon": true,
245 "showSpecter": true,
246 "youtubeMusicPort": 26538
247 },
248 "musicWidgetOptions": {
249 "refreshFrequency": 10000,
250 "showOnDisplay": "",
251 "showIcon": true,
252 "showSpecter": true
253 },
254 "mpdWidgetOptions": {
255 "refreshFrequency": 10000,
256 "showOnDisplay": "",
257 "showIcon": true,
258 "showSpecter": true,
259 "mpdBinaryPath": "/opt/homebrew/bin/mpc",
260 "mpdPort": "6600",
261 "mpdHost": "127.0.0.1",
262 "mpdFormatString": "%title%[ - %artist%]|[%file%]"
263 },
264 "browserTrackWidgetOptions": {
265 "refreshFrequency": 10000,
266 "showOnDisplay": "",
267 "showIcon": true,
268 "showSpecter": true
269 },
270 "notificationsWidgetOptions": {
271 "refreshFrequency": 10000,
272 "showOnDisplay": "",
273 "excludedApps": ""
274 },
275 "nextMeetingWidgetOptions": {
276 "refreshFrequency": 60000,
277 "showOnDisplay": "",
278 "showJoinButton": true,
279 "showTimeOnly": false,
280 "icalBuddyPath": "",
281 "lookAheadHours": 12
282 },
283 "userWidgets": {
284 "userWidgetsList": {}
285 },
286 "customStyles": {
287 "styles": "/* your custom css styles here */"
288 }
289}