summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorRyan Schanzenbacher <ryan@rschanz.org>2026-08-24 01:09:49 -0400
committerRyan Schanzenbacher <ryan@rschanz.org>2026-08-24 01:09:49 -0400
commitcabf188ae487120d4b9ac1fe21fff45403a787b4 (patch)
treed9fa0f83426f6465029fb1de334665127e65d1d2 /users
parent0ce4331f742863ec03c711c27b0a0dee7e8cc187 (diff)
various fixes to guix
Diffstat (limited to 'users')
-rw-r--r--users/ryan/common.nix16
-rw-r--r--users/ryan/darwin.nix3
-rw-r--r--users/ryan/linux.nix63
-rw-r--r--users/ryan/linux/foreign.nix25
-rw-r--r--users/ryan/linux/guix.nix73
-rw-r--r--users/ryan/linux/hypr/hyprland.conf56
-rwxr-xr-xusers/ryan/linux/hypr/scripts/autostart.sh2
-rw-r--r--users/ryan/linux/waybar/config112
-rwxr-xr-xusers/ryan/linux/waybar/modules/storage.sh77
-rw-r--r--users/ryan/linux/waybar/style.css2
-rw-r--r--users/ryan/linux/wpaperd/config.toml2
11 files changed, 312 insertions, 119 deletions
diff --git a/users/ryan/common.nix b/users/ryan/common.nix
index 58346e7..610a975 100644
--- a/users/ryan/common.nix
+++ b/users/ryan/common.nix
@@ -5,6 +5,9 @@
5 5
6 news.display = "silent"; 6 news.display = "silent";
7 7
8 # Keep everything in lockstep
9 home.stateVersion = "26.05";
10
8 # My own modules 11 # My own modules
9 ryan.neovim.enable = true; 12 ryan.neovim.enable = true;
10 13
@@ -143,6 +146,12 @@
143 then "sudo darwin-rebuild switch --flake ~/.config/nix/." 146 then "sudo darwin-rebuild switch --flake ~/.config/nix/."
144 else "home-manager switch --flake ~/.config/home-manager/#ryan"; 147 else "home-manager switch --flake ~/.config/home-manager/#ryan";
145 }; 148 };
149 plugins = [
150 {
151 name = "zsh-vi-mode";
152 src = "${pkgs.zsh-vi-mode}/share/zsh-vi-mode";
153 }
154 ];
146 }; 155 };
147 156
148 # Shared across darwin and linux; the guix side already deferred these 157 # Shared across darwin and linux; the guix side already deferred these
@@ -159,7 +168,7 @@
159 jq 168 jq
160 htop 169 htop
161 (pkgs.zathura.override { 170 (pkgs.zathura.override {
162 plugins = [ pkgs.zathuraPkgs.zathura-pdf-mupdf ]; 171 plugins = [ pkgs.zathuraPkgs.zathura_pdf_mupdf ];
163 }) 172 })
164 go 173 go
165 pass 174 pass
@@ -177,6 +186,11 @@
177 kdePackages.kdenlive 186 kdePackages.kdenlive
178 audacity 187 audacity
179 blender 188 blender
189
190 nerd-fonts.anonymice
191 nerd-fonts.monofur
192 nerd-fonts.lilex
193 nerd-fonts.fira-code
180 ]; 194 ];
181 195
182 xdg.configFile."aerc" = { 196 xdg.configFile."aerc" = {
diff --git a/users/ryan/darwin.nix b/users/ryan/darwin.nix
index e721347..568306a 100644
--- a/users/ryan/darwin.nix
+++ b/users/ryan/darwin.nix
@@ -8,8 +8,6 @@
8 ./modules/ubersicht 8 ./modules/ubersicht
9 ]; 9 ];
10 10
11 home.stateVersion = "26.05"; # Please read the comment before changing.
12
13 ryan.sketchybar.enable = true; 11 ryan.sketchybar.enable = true;
14 12
15 programs.zen-browser = { 13 programs.zen-browser = {
@@ -30,7 +28,6 @@
30 28
31 home.packages = with pkgs; [ 29 home.packages = with pkgs; [
32 iina # Media player (frontend to mpv essentially) 30 iina # Media player (frontend to mpv essentially)
33 nerd-fonts.anonymice
34 jujutsu 31 jujutsu
35 netbird-tui 32 netbird-tui
36 ]; 33 ];
diff --git a/users/ryan/linux.nix b/users/ryan/linux.nix
index 5e6d767..3935de5 100644
--- a/users/ryan/linux.nix
+++ b/users/ryan/linux.nix
@@ -6,31 +6,36 @@
6 6
7 home.username = "ryan"; 7 home.username = "ryan";
8 home.homeDirectory = "/home/ryan"; 8 home.homeDirectory = "/home/ryan";
9 home.stateVersion = "23.11"; # Please read the comment before changing.
10 9
11 nixpkgs.config.allowUnfree = true; 10 nixpkgs.config.allowUnfree = true;
12 11
13 xdg.configFile."nix/nix.conf".text = "experimental-features = nix-command flakes\n";
14 xdg.configFile."nix/registry.json".text = builtins.toJSON {
15 version = 2;
16 flakes = [
17 {
18 from = { type = "indirect"; id = "nixpkgs"; };
19 to = {
20 type = "path";
21 path = inputs.nixpkgs.outPath;
22 lastModified = inputs.nixpkgs.lastModified;
23 narHash = inputs.nixpkgs.narHash;
24 };
25 }
26 ];
27 };
28
29 fonts.fontconfig.enable = true; 12 fonts.fontconfig.enable = true;
30 fonts.fontconfig.defaultFonts = { 13 fonts.fontconfig.defaultFonts = {
31 monospace = [ "DejaVu Sans Mono" ]; 14 monospace = [ "DejaVu Sans Mono" ];
32 sansSerif = [ "DejaVu Sans" ]; 15 sansSerif = [ "Noto Sans" "DejaVu Sans" ];
33 serif = [ "DejaVu Serif" ]; 16 serif = [ "Noto Serif" "DejaVu Serif" ];
17 };
18
19 gtk = {
20 enable = true;
21 font = {
22 name = "Noto Sans";
23 size = 10;
24 };
25 theme = {
26 name = "Adwaita";
27 package = pkgs.gnome-themes-extra;
28 };
29 iconTheme = {
30 name = "Adwaita";
31 package = pkgs.adwaita-icon-theme;
32 };
33 colorScheme = "dark";
34 };
35
36 qt = {
37 enable = true;
38 platformTheme.name = "gtk3";
34 }; 39 };
35 40
36 home.pointerCursor = { 41 home.pointerCursor = {
@@ -47,6 +52,7 @@
47 wayland.windowManager.hyprland = { 52 wayland.windowManager.hyprland = {
48 enable = true; 53 enable = true;
49 package = pkgs.hyprland; 54 package = pkgs.hyprland;
55 configType = "hyprlang";
50 portalPackage = pkgs.xdg-desktop-portal-hyprland; 56 portalPackage = pkgs.xdg-desktop-portal-hyprland;
51 extraConfig = builtins.readFile ./linux/hypr/hyprland.conf; 57 extraConfig = builtins.readFile ./linux/hypr/hyprland.conf;
52 }; 58 };
@@ -60,6 +66,7 @@
60 "hypr/scripts" = { source = ./linux/hypr/scripts; recursive = true; }; 66 "hypr/scripts" = { source = ./linux/hypr/scripts; recursive = true; };
61 "hypr/family_guy.mp4".source = ./linux/hypr/family_guy.mp4; 67 "hypr/family_guy.mp4".source = ./linux/hypr/family_guy.mp4;
62 "hypr/subwaysurfer.webm".source = ./linux/hypr/subwaysurfer.webm; 68 "hypr/subwaysurfer.webm".source = ./linux/hypr/subwaysurfer.webm;
69 "wallpapers".source = ../../files/Wallpapers;
63 70
64 "waybar" = { source = ./linux/waybar; recursive = true; }; 71 "waybar" = { source = ./linux/waybar; recursive = true; };
65 "alacritty" = { source = ./linux/alacritty; recursive = true; }; 72 "alacritty" = { source = ./linux/alacritty; recursive = true; };
@@ -103,26 +110,16 @@
103 waybar 110 waybar
104 fuzzel 111 fuzzel
105 112
106 nerd-fonts.anonymice
107 nerd-fonts.monofur
108 nerd-fonts.lilex
109 nerd-fonts.fira-code
110 noto-fonts 113 noto-fonts
111 dejavu_fonts 114 dejavu_fonts
112 liberation_ttf 115 liberation_ttf
113 noto-fonts-cjk-sans 116 noto-fonts-cjk-sans
114 noto-fonts-color-emoji 117 noto-fonts-color-emoji
115 118
116 # hyprlock built by nix needs Guix's PAM/fontconfig libs preloaded to run 119 inputs.clipboard-sync.packages.${pkgs.stdenv.hostPlatform.system}.default
117 # under the Guix system profile - same interop hack as before.
118 (pkgs.writeScriptBin "hyprlock" ''
119 #! ${pkgs.bash}/bin/bash
120 export LD_PRELOAD="/run/current-system/profile/lib/libpam.so.0:/run/current-system/profile/lib/libfontconfig.so:$LD_PRELOAD"
121 exec ${pkgs.hyprlock}/bin/hyprlock "$@"
122 '')
123 120
124 # Guix's mesa doesn't match nixpkgs', so GL apps built by nix need nixGL. 121 # hyprlock itself is provided by the host-specific module (e.g.
125 inputs.nixgl.packages.${pkgs.system}.nixGLIntel 122 # linux/guix.nix wraps it with an LD_PRELOAD shim; a plain NixOS host
126 inputs.clipboard-sync.packages.${pkgs.system}.default 123 # would just add pkgs.hyprlock here instead).
127 ]; 124 ];
128} 125}
diff --git a/users/ryan/linux/foreign.nix b/users/ryan/linux/foreign.nix
new file mode 100644
index 0000000..b1b06ab
--- /dev/null
+++ b/users/ryan/linux/foreign.nix
@@ -0,0 +1,25 @@
1{ inputs, ... }:
2
3# Applies to any standalone (non-NixOS) home-manager install, where
4# home-manager owns the user profile on its own instead of being wired in
5# via a NixOS module. NixOS manages nix.conf/the flake registry and doesn't
6# need the genericLinux target at all, so this is skipped on NixOS hosts.
7{
8 targets.genericLinux.enable = true;
9
10 xdg.configFile."nix/nix.conf".text = "experimental-features = nix-command flakes\n";
11 xdg.configFile."nix/registry.json".text = builtins.toJSON {
12 version = 2;
13 flakes = [
14 {
15 from = { type = "indirect"; id = "nixpkgs"; };
16 to = {
17 type = "path";
18 path = inputs.nixpkgs.outPath;
19 lastModified = inputs.nixpkgs.lastModified;
20 narHash = inputs.nixpkgs.narHash;
21 };
22 }
23 ];
24 };
25}
diff --git a/users/ryan/linux/guix.nix b/users/ryan/linux/guix.nix
new file mode 100644
index 0000000..acee0f3
--- /dev/null
+++ b/users/ryan/linux/guix.nix
@@ -0,0 +1,73 @@
1{ pkgs, inputs, ... }:
2
3# Workarounds specific to running home-manager on top of Guix System (as
4# opposed to NixOS, or some other foreign distro). Keep this narrow -
5# anything that would also apply to e.g. WSL belongs in ./foreign.nix
6# instead.
7{
8 # Guix doesn't run a systemd user session the way home-manager expects,
9 # so activation shouldn't try to start/restart systemd user units.
10 systemd.user.startServices = false;
11
12 # Guix Home's login shell (bash, via /etc/passwd) sources ~/.bash_profile
13 # -> ~/.profile, which runs ~/.guix-home/setup-environment and
14 # ~/.guix-home/on-first-login. The latter is what actually starts this
15 # user's shepherd instance (which manages pipewire/pulseaudio and other
16 # home services) if it isn't running yet. zsh has no equivalent of
17 # ~/.profile, so with zsh as the login shell that chain never runs and
18 # shepherd (and anything it starts, e.g. audio) never comes up. Replicate
19 # it in .zprofile, which - like .bash_profile - only runs for login shells.
20 programs.zsh.profileExtra = ''
21 if [ -f "$HOME/.guix-home/setup-environment" ]; then
22 HOME_ENVIRONMENT="$HOME/.guix-home"
23 . "$HOME_ENVIRONMENT/setup-environment"
24 "$HOME_ENVIRONMENT/on-first-login"
25 unset HOME_ENVIRONMENT
26 fi
27 '';
28
29 # gtk3.nix (see ../linux.nix's gtk.* config) mirrors GTK settings into
30 # dconf, which needs a session D-Bus during activation. This host has no
31 # /etc/dbus-1/session.conf and no session bus running at switch time, so
32 # dconf's dbus-run-session activation step fails. GTK is still themed via
33 # gtk-3.0/gtk-4.0 settings.ini; dconf mainly matters for GNOME/libadwaita
34 # apps, which aren't in play here.
35 dconf.enable = false;
36
37 # Guix Home used to run gpg-agent as a shepherd service and export
38 # SSH_AUTH_SOCK into the whole session before Hyprland started. That
39 # service is disabled now, and zsh's SSH_AUTH_SOCK export (see
40 # programs.zsh in common.nix) only reaches shells, not apps Hyprland
41 # spawns directly - so launch the agent and push the socket path into
42 # Hyprland's own env here instead. A NixOS host would have a real
43 # systemd --user session doing this via gpg-agent.socket activation,
44 # so this only belongs on Guix.
45 wayland.windowManager.hyprland.extraConfig = ''
46 exec-once = sh -c 'gpgconf --launch gpg-agent; hyprctl setenv SSH_AUTH_SOCK "$(gpgconf --list-dirs agent-ssh-socket)"'
47 '';
48
49 # base-system.scm enables pcscd-service-type, so pcscd already owns the
50 # Yubikey's USB CCID interface. scdaemon's internal libusb CCID driver
51 # then fails to open the device (`ccid open error: skip`) and doesn't
52 # fall back to PC/SC on its own, so `gpg --card-status`/`--edit-card`
53 # report "No such device". Force scdaemon through pcscd instead. A NixOS
54 # host would only need this if it also runs services.pcscd itself.
55 programs.gpg.scdaemonSettings.disable-ccid = true;
56
57 home.packages = [
58 # hyprlock built by nix needs Guix's PAM libs preloaded to authenticate
59 # against Guix's PAM stack. Don't also preload Guix's libfontconfig.so
60 # here: it's a "fontconfig-minimal" build that lacks symbols (e.g.
61 # FcConfigSetDefaultSubstitute) which nix's pango expects, causing a
62 # symbol lookup error at startup. Let hyprlock use nix's own fontconfig
63 # from its normal closure instead.
64 (pkgs.writeScriptBin "hyprlock" ''
65 #! ${pkgs.bash}/bin/bash
66 export LD_PRELOAD="/run/current-system/profile/lib/libpam.so.0:$LD_PRELOAD"
67 exec ${pkgs.hyprlock}/bin/hyprlock "$@"
68 '')
69
70 # Guix's mesa doesn't match nixpkgs', so GL apps built by nix need nixGL.
71 inputs.nixgl.packages.${pkgs.stdenv.hostPlatform.system}.nixGLIntel
72 ];
73}
diff --git a/users/ryan/linux/hypr/hyprland.conf b/users/ryan/linux/hypr/hyprland.conf
index e51b54c..42d8a52 100644
--- a/users/ryan/linux/hypr/hyprland.conf
+++ b/users/ryan/linux/hypr/hyprland.conf
@@ -113,7 +113,7 @@ animations {
113 113
114dwindle { 114dwindle {
115 # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more 115 # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
116 pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below 116 #pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
117 preserve_split = yes # you probably want this 117 preserve_split = yes # you probably want this
118} 118}
119 119
@@ -130,9 +130,9 @@ device {
130} 130}
131 131
132# Example windowrule v1 132# Example windowrule v1
133# windowrule = float, ^(kitty)$ 133# windowrule = float on, ^(kitty)$
134# Example windowrule v2 134# Example windowrule v2
135# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ 135# windowrulev2 = float on,match:class ^(kitty)$,match:title ^(kitty)$
136# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more 136# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
137 137
138 138
@@ -147,8 +147,8 @@ bind = $mainMod SHIFT, E, exit
147bind = $mainMod SHIFT, Space, togglefloating 147bind = $mainMod SHIFT, Space, togglefloating
148bind = $mainMod SHIFT, Return, pin, active 148bind = $mainMod SHIFT, Return, pin, active
149bind = $mainMod, D, exec, fuzzel --width=35 --font='Hack:weight=bold:size=12' --background-color='282a36fa' --selection-color='3d4460fa' --line-height=20 --border-radius=20 149bind = $mainMod, D, exec, fuzzel --width=35 --font='Hack:weight=bold:size=12' --background-color='282a36fa' --selection-color='3d4460fa' --line-height=20 --border-radius=20
150bind = $mainMod, P, pseudo, # dwindle 150#bind = $mainMod, P, pseudo, # dwindle
151bind = $mainMod, J, togglesplit, # dwindle 151#bind = $mainMod, J, togglesplit, # dwindle
152bind = $mainMod, F, fullscreen, 1 152bind = $mainMod, F, fullscreen, 1
153bind = $mainMod SHIFT, F, fullscreen 153bind = $mainMod SHIFT, F, fullscreen
154bind = ,XF86MonBrightnessUp, exec, light -A 10 154bind = ,XF86MonBrightnessUp, exec, light -A 10
@@ -252,46 +252,46 @@ bind = $mainMod SHIFT CTRL ALT, L, exec, xdg-open https://linkedin.com
252# Window Rules 252# Window Rules
253 253
254# Firefox PiP 254# Firefox PiP
255windowrulev2 = float, class:^(zen-beta)$, title:^(Picture-in-Picture)$ 255windowrule = float on, match:class ^(zen-beta)$, match:title ^(Picture-in-Picture)$
256windowrulev2 = pin, class:^(zen-beta)$, title:^(Picture-in-Picture)$ 256windowrule = pin on, match:class ^(zen-beta)$, match:title ^(Picture-in-Picture)$
257windowrulev2 = size 22% 22%, class:^(zen-beta)$, title:^(Picture-in-Picture)$ 257windowrule = size 22% 22%, match:class ^(zen-beta)$, match:title ^(Picture-in-Picture)$
258windowrulev2 = move 76% 8%, class:^(zen-beta)$, title:^(Picture-in-Picture)$ 258windowrule = move 76% 8%, match:class ^(zen-beta)$, match:title ^(Picture-in-Picture)$
259 259
260# Firefox Sharing Indicator 260# Firefox Sharing Indicator
261windowrulev2 = float, class:^(firefox)$, title:^(Firefox — Sharing Indicator)$ 261windowrule = float on, match:class ^(firefox)$, match:title ^(Firefox — Sharing Indicator)$
262windowrulev2 = size 56 31, class:^(firefox)$, title:^(Firefox — Sharing Indicator)$ 262windowrule = size 56 31, match:class ^(firefox)$, match:title ^(Firefox — Sharing Indicator)$
263windowrulev2 = move 50% 0, class:^(firefox)$, title:^(Firefox — Sharing Indicator)$ 263windowrule = move 50% 0, match:class ^(firefox)$, match:title ^(Firefox — Sharing Indicator)$
264windowrulev2 = suppressevent fullscreen maximize, class:^(firefox)$, title:^(Firefox — Sharing Indicator)$ 264windowrule = suppress_event = fullscreen maximize, match:class ^(firefox)$, match:title ^(Firefox — Sharing Indicator)$
265 265
266# Weather 266# Weather
267windowrulev2 = float,class:^(ala-wttr)$ 267windowrule = float on,match:class ^(ala-wttr)$
268windowrulev2 = size 822 1026, class:^(ala-wttr)$ 268windowrule = size 822 1026, match:class ^(ala-wttr)$
269 269
270# Floating terminal 270# Floating terminal
271windowrulev2 = float,class:^(float-foot)$ 271windowrule = float on,match:class ^(float-foot)$
272windowrulev2 = size 930 680,class:^(float-foot)$ 272windowrule = size 930 680,match:class ^(float-foot)$
273windowrulev2 = center,class:^(float-foot)$ 273windowrule = center on,match:class ^(float-foot)$
274 274
275# Change color of pinned windows 275# Change color of pinned windows
276windowrulev2 = bordercolor rgba(bf0000ee) rgba(ab00adee) 45deg,pinned:1 276windowrule = border_color rgba(bf0000ee) rgba(ab00adee) 45deg,match:pin 1
277 277
278# Fun Keybinds 278# Fun Keybinds
279# Subway surfer 279# Subway surfer
280bind = $mainMod CTRL SHIFT, S, exec, mpv ~/.config/hypr/subwaysurfer.webm 280bind = $mainMod CTRL SHIFT, S, exec, mpv ~/.config/hypr/subwaysurfer.webm
281windowrulev2 = float,class:^(mpv)$, title:^(subwaysurfer.webm - mpv)$ 281windowrule = float on,match:class ^(mpv)$, match:title ^(subwaysurfer.webm - mpv)$
282windowrulev2 = size 310 554,class:^(mpv)$, title:^(subwaysurfer.webm - mpv)$ 282windowrule = size 310 554,match:class ^(mpv)$, match:title ^(subwaysurfer.webm - mpv)$
283windowrulev2 = move 81% 46% ,class:^(mpv)$, title:^(subwaysurfer.webm - mpv)$ 283windowrule = move 81% 46% ,match:class ^(mpv)$, match:title ^(subwaysurfer.webm - mpv)$
284windowrulev2 = pin,class:^(mpv)$, title:^(subwaysurfer.webm - mpv)$ 284windowrule = pin on,match:class ^(mpv)$, match:title ^(subwaysurfer.webm - mpv)$
285 285
286# Family guy funny moments 286# Family guy funny moments
287bind = $mainMod CTRL SHIFT, F, exec, mpv ~/.config/hypr/family_guy.mp4 287bind = $mainMod CTRL SHIFT, F, exec, mpv ~/.config/hypr/family_guy.mp4
288windowrulev2 = float,class:^(mpv)$, title:^(family_guy.mp4 - mpv)$ 288windowrule = float on,match:class ^(mpv)$, match:title ^(family_guy.mp4 - mpv)$
289windowrulev2 = size 595 336,class:^(mpv)$, title:^(family_guy.mp4 - mpv)$ 289windowrule = size 595 336,match:class ^(mpv)$, match:title ^(family_guy.mp4 - mpv)$
290windowrulev2 = move 67% 5% ,class:^(mpv)$, title:^(family_guy.mp4 - mpv)$ 290windowrule = move 67% 5% ,match:class ^(mpv)$, match:title ^(family_guy.mp4 - mpv)$
291windowrulev2 = pin,class:^(mpv)$, title:^(family_guy.mp4 - mpv)$ 291windowrule = pin on,match:class ^(mpv)$, match:title ^(family_guy.mp4 - mpv)$
292 292
293# Satty windowrules 293# Satty windowrules
294windowrulev2 = fullscreen,class:^(com.gabm.satty)$ 294windowrule = fullscreen on,match:class ^(com.gabm.satty)$
295 295
296exec-once = ~/.config/hypr/scripts/autostart.sh 296exec-once = ~/.config/hypr/scripts/autostart.sh
297 297
diff --git a/users/ryan/linux/hypr/scripts/autostart.sh b/users/ryan/linux/hypr/scripts/autostart.sh
index 706f82f..080f6e9 100755
--- a/users/ryan/linux/hypr/scripts/autostart.sh
+++ b/users/ryan/linux/hypr/scripts/autostart.sh
@@ -6,8 +6,6 @@ mako &
6 6
7#swaybg -i ~/.config/hypr/Wallpapers/above-clouds.jpg & 7#swaybg -i ~/.config/hypr/Wallpapers/above-clouds.jpg &
8 8
9nice -n13 swww init &
10
11#~/.config/hypr/wallpaper-daemon.sh & 9#~/.config/hypr/wallpaper-daemon.sh &
12wpaperd -d & 10wpaperd -d &
13 11
diff --git a/users/ryan/linux/waybar/config b/users/ryan/linux/waybar/config
index 62e6b20..4459ce7 100644
--- a/users/ryan/linux/waybar/config
+++ b/users/ryan/linux/waybar/config
@@ -5,50 +5,69 @@
5 5
6 "modules-left": ["hyprland/workspaces", "hyprland/submap"], 6 "modules-left": ["hyprland/workspaces", "hyprland/submap"],
7 "modules-center": ["hyprland/window"], 7 "modules-center": ["hyprland/window"],
8 "modules-right": ["tray", "custom/spotify", "privacy", "custom/weather", "custom/mail", "custom/storage", "backlight", "bluetooth", "pulseaudio", "network", "idle_inhibitor", "battery", "battery#num2", "clock"], 8 "modules-right": ["tray", "privacy", "custom/weather", "custom/mail", "custom/storage", "backlight", "bluetooth", "pulseaudio", "network", "idle_inhibitor", "battery", "battery#num2", "clock"],
9
9 "hyprland/submap": { 10 "hyprland/submap": {
10 "format": " {}" 11 "format": " {}"
11 }, 12 },
13
12 "hyprland/workspaces": { 14 "hyprland/workspaces": {
13 "format": "{id}", 15 "format": "{id}",
14 "all-outputs": false, 16 "all-outputs": false,
15 "disable-scroll": true 17 "disable-scroll": true
16 }, 18 },
19
17 "hyprland/window": { 20 "hyprland/window": {
18 "max-length": 80, 21 "max-length": 80,
19 "tooltip": false, 22 "tooltip": false,
20 "separate-outputs": true 23 "separate-outputs": true
21 }, 24 },
25
22 "clock": { 26 "clock": {
23 "format": "{:%a %d %b %H:%M}", 27 "format": "{:%a %d %b %H:%M}",
24 "tooltip": false 28 "tooltip": false
25 }, 29 },
30
26 "battery": { 31 "battery": {
27 "format": "{capacity}% {icon}", 32 "format": "{capacity}% {icon}",
28 "format-alt": "{time} {icon}", 33 "format-alt": "{time} {icon}",
29 "format-icons": ["", "", "", "", ""], 34 "format-icons": [
30 "format-charging": "{capacity}% ", 35 "󰁺",
36 "󰁻",
37 "󰁼",
38 "󰁽",
39 "󰁹"
40 ],
41 "format-charging": "{capacity}% 󰂄",
31 "interval": 30, 42 "interval": 30,
32 "states": { 43 "states": {
33 "warning": 25, 44 "warning": 25,
34 "critical": 10 45 "critical": 10
35 }, 46 },
36 "tooltip": false, 47 "tooltip": false,
37 "bat":"BAT0" 48 "bat": "BAT0"
38 }, 49 },
50
39 "battery#num2": { 51 "battery#num2": {
40 "format": "{capacity}% {icon}", 52 "format": "{capacity}% {icon}",
41 "format-alt": "{time} {icon}", 53 "format-alt": "{time} {icon}",
42 "format-icons": ["", "", "", "", ""], 54 "format-icons": [
43 "format-charging": "{capacity}% ", 55 "󰁺",
56 "󰁻",
57 "󰁼",
58 "󰁽",
59 "󰁹"
60 ],
61 "format-charging": "{capacity}% 󰂄",
44 "interval": 30, 62 "interval": 30,
45 "states": { 63 "states": {
46 "warning": 25, 64 "warning": 25,
47 "critical": 10 65 "critical": 10
48 }, 66 },
49 "tooltip": false, 67 "tooltip": false,
50 "bat":"BAT1" 68 "bat": "BAT1"
51 }, 69 },
70
52 "bluetooth": { 71 "bluetooth": {
53 "format": "󰂯", 72 "format": "󰂯",
54 "format-disabled": "󰂲", 73 "format-disabled": "󰂲",
@@ -56,60 +75,75 @@
56 "format-connected-battery": "󰂱 {device_battery_percentage}%", 75 "format-connected-battery": "󰂱 {device_battery_percentage}%",
57 "on-click": "foot bluetui", 76 "on-click": "foot bluetui",
58 "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected", 77 "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected",
59 "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}", 78 "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
60 "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}", 79 "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
61 "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%" 80 "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%"
62 }, 81 },
82
63 "network": { 83 "network": {
64 "format-alt": "{ipaddr}/{cidr} {icon} {bandwidthTotalBytes}󰹹", 84 "format-alt": "{ipaddr}/{cidr} {icon} {bandwidthTotalBytes}󰹹",
65 "format": "{ipaddr}/{cidr} {icon}", 85 "format": "{ipaddr}/{cidr} {icon}",
66 "format-alt-click": "click-right", 86 "format-alt-click": "click-right",
67 "format-icons": { 87 "format-icons": {
68 "wifi": ["󰤟", "󰤢" ,"󰤥", "󰤨"], 88 "wifi": [
69 "ethernet": [""], 89 "󰤟",
70 "disconnected": ["󰤭"] 90 "󰤢",
91 "󰤥",
92 "󰤨"
93 ],
94 "ethernet": [
95 "󰈀"
96 ],
97 "disconnected": [
98 "󰤭"
99 ]
71 }, 100 },
72 "on-click": "foot -t alacritty doas nmtui", 101 "on-click": "foot -t alacritty doas nmtui",
73 "tooltip": false 102 "tooltip": false
74 }, 103 },
104
75 "privacy": { 105 "privacy": {
76 "icon-spacing":4, 106 "icon-spacing": 4,
77 "icon-size":18, 107 "icon-size": 18,
78 "transition-duration":250, 108 "transition-duration": 250,
79 "modules": [ 109 "modules": [
80 { 110 {
81 "type":"screenshare", 111 "type": "screenshare",
82 "tooltip":true, 112 "tooltip": true,
83 "tooltip-icon-size":24 113 "tooltip-icon-size": 24
84 }, 114 },
85 { 115 {
86 "type":"audio-in", 116 "type": "audio-in",
87 "tooltip":true, 117 "tooltip": true,
88 "tooltip-icon-size":24 118 "tooltip-icon-size": 24
89 } 119 }
90 ] 120 ]
91 }, 121 },
122
92 "pulseaudio": { 123 "pulseaudio": {
93 "format-alt": "{icon}", 124 "format-alt": "{icon}",
94 "format": "{volume} {icon}", 125 "format": "{volume} {icon}",
95 "format-alt-click": "click-right", 126 "format-alt-click": "click-right",
96 "format-muted": "", 127 "format-muted": "",
97 "format-icons": { 128 "format-icons": {
98 "phone": [" ", " ", " ", " "], 129 "phone": [
99 "default": ["", "", "", ""] 130 " ",
131 " ",
132 " ",
133 " "
134 ],
135 "default": [
136 "",
137 "",
138 "",
139 ""
140 ]
100 }, 141 },
101 "scroll-step": 1, 142 "scroll-step": 1,
102 "on-click": "pavucontrol", 143 "on-click": "pavucontrol",
103 "tooltip": false 144 "tooltip": false
104 }, 145 },
105 "custom/spotify": { 146
106 "interval": 2,
107 "return-type": "json",
108 "exec": "~/.config/waybar/modules/spotify.sh",
109 "exec-if": "~/.config/waybar/modules/check-for-music.sh",
110 "escape": true,
111 "on-click": "playerctl play-pause"
112 },
113 "custom/storage": { 147 "custom/storage": {
114 "format-alt": "{} ", 148 "format-alt": "{} ",
115 "format": "{percentage}% ", 149 "format": "{percentage}% ",
@@ -118,14 +152,19 @@
118 "interval": 60, 152 "interval": 60,
119 "exec": "~/.config/waybar/modules/storage.sh" 153 "exec": "~/.config/waybar/modules/storage.sh"
120 }, 154 },
155
121 "backlight": { 156 "backlight": {
122 "format-alt": "{icon}", 157 "format-alt": "{icon}",
123 "format": "{percent}% {icon}", 158 "format": "{percent}% {icon}",
124 "format-alt-click": "click-right", 159 "format-alt-click": "click-right",
125 "format-icons": ["", ""], 160 "format-icons": [
161 "",
162 "󰃞"
163 ],
126 "on-scroll-up": "light -A 1", 164 "on-scroll-up": "light -A 1",
127 "on-scroll-down": "light -U 1" 165 "on-scroll-down": "light -U 1"
128 }, 166 },
167
129 "custom/weather_OLD": { 168 "custom/weather_OLD": {
130 "format-alt": "{}", 169 "format-alt": "{}",
131 "format": "{alt}: {}", 170 "format": "{alt}: {}",
@@ -136,14 +175,16 @@
136 "exec": "~/.config/waybar/modules/weather.sh", 175 "exec": "~/.config/waybar/modules/weather.sh",
137 "exec-if": "ping wttr.in -c1" 176 "exec-if": "ping wttr.in -c1"
138 }, 177 },
178
139 "custom/weather": { 179 "custom/weather": {
140 "format": "{} °F", 180 "format": "{} °F",
141 "tooltip": true, 181 "tooltip": true,
142 "interval": 3600, 182 "interval": 3600,
143 "exec": "exit=101; while [ $exit = 101 ]; do wttrbar --main-indicator temp_F --fahrenheit; exit=$(echo $?); sleep 1; done", 183 "exec": "exit=101; while [ $exit = 101 ]; do wttrbar --main-indicator temp_F --fahrenheit --nerd; exit=$(echo $?); sleep 1; done",
144 "on-click": "foot -a ala-wttr -H curl https://v2.wttr.in", 184 "on-click": "foot -a ala-wttr -H curl https://v2.wttr.in",
145 "return-type": "json" 185 "return-type": "json"
146 }, 186 },
187
147 "idle_inhibitor": { 188 "idle_inhibitor": {
148 "format": "{icon}", 189 "format": "{icon}",
149 "format-icons": { 190 "format-icons": {
@@ -152,6 +193,7 @@
152 }, 193 },
153 "tooltip": false 194 "tooltip": false
154 }, 195 },
196
155 "custom/mail": { 197 "custom/mail": {
156 "format": "", 198 "format": "",
157 "format-alt": "{alt} ", 199 "format-alt": "{alt} ",
@@ -161,7 +203,9 @@
161 "exec": "~/.config/waybar/modules/mail.py", 203 "exec": "~/.config/waybar/modules/mail.py",
162 "tooltip": false 204 "tooltip": false
163 }, 205 },
206
164 "tray": { 207 "tray": {
165 "icon-size": 18 208 "icon-size": 18
166 } 209 }
167} 210}
211
diff --git a/users/ryan/linux/waybar/modules/storage.sh b/users/ryan/linux/waybar/modules/storage.sh
index 90cc3dc..7cb7249 100755
--- a/users/ryan/linux/waybar/modules/storage.sh
+++ b/users/ryan/linux/waybar/modules/storage.sh
@@ -1,25 +1,70 @@
1#!/bin/sh 1#!/bin/sh
2 2
3mount="/" 3set -eu
4
5mountpoint="/"
4warning=20 6warning=20
5critical=10 7critical=10
6 8
7df -h -P -l "$mount" | awk -v warning=$warning -v critical=$critical ' 9error() {
8/\/.*/ { 10 jq -cn --arg message "$1" '{
9 text=$4 11 text: "N/A",
10 tooltip="Filesystem: "$1"\rSize: "$2"\rUsed: "$3"\rAvail: "$4"\rUse%: "$5"\rMounted on: "$6 12 percentage: 0,
11 use=$5 13 tooltip: $message,
12 exit 0 14 class: "critical"
15 }'
16 exit 0
13} 17}
14END { 18
15 class="" 19line=$(df -hP -l "$mountpoint" 2>/dev/null | tail -n 1) ||
16 gsub(/%$/,"",use) 20 error "Unable to read filesystem statistics"
17 if ((100 - use) < critical) { 21
22# df -P guarantees a single line per filesystem.
23set -- $line
24
25[ "$#" -ge 6 ] || error "Unable to parse filesystem statistics"
26
27filesystem=$1
28size=$2
29used=$3
30available=$4
31use=${5%\%}
32mounted=$6
33
34case "$use" in
35 ''|*[!0-9]*) error "Invalid filesystem usage percentage: $use%" ;;
36esac
37
38free=$((100 - use))
39
40if [ "$free" -le "$critical" ]; then
18 class="critical" 41 class="critical"
19 } else if ((100 - use) < warning) { 42elif [ "$free" -le "$warning" ]; then
20 class="warning" 43 class="warning"
21 } 44else
22 print "{\"text\":\""text"\", \"percentage\":"use",\"tooltip\":\""tooltip"\", \"class\":\""class"\"}" 45 class=""
23} 46fi
24' 47
48jq -cn \
49 --arg text "${use}%" \
50 --argjson percentage "$use" \
51 --arg filesystem "$filesystem" \
52 --arg size "$size" \
53 --arg used "$used" \
54 --arg available "$available" \
55 --arg mounted "$mounted" \
56 --arg class "$class" \
57 '{
58 text: $text,
59 percentage: $percentage,
60 tooltip: (
61 "Filesystem: " + $filesystem +
62 "\rSize: " + $size +
63 "\rUsed: " + $used +
64 "\rAvail: " + $available +
65 "\rUse%: " + $text +
66 "\rMounted on: " + $mounted
67 ),
68 class: $class
69 }'
25 70
diff --git a/users/ryan/linux/waybar/style.css b/users/ryan/linux/waybar/style.css
index 682a14e..ac78984 100644
--- a/users/ryan/linux/waybar/style.css
+++ b/users/ryan/linux/waybar/style.css
@@ -1,7 +1,7 @@
1* { 1* {
2 border: none; 2 border: none;
3 border-radius: 0; 3 border-radius: 0;
4 font-family: AnonymicePro Nerd Font; 4 font-family: FiraCode Nerd Font;
5 font-size: 15px; 5 font-size: 15px;
6 box-shadow: none; 6 box-shadow: none;
7 text-shadow: none; 7 text-shadow: none;
diff --git a/users/ryan/linux/wpaperd/config.toml b/users/ryan/linux/wpaperd/config.toml
index 9947370..9735c20 100644
--- a/users/ryan/linux/wpaperd/config.toml
+++ b/users/ryan/linux/wpaperd/config.toml
@@ -1,4 +1,4 @@
1[default] 1[default]
2duration = "30m" 2duration = "30m"
3path = "~/.config/hypr/Wallpapers/static/" 3path = "/home/ryan/.config/wallpapers/"
4transition-time = 2000 4transition-time = 2000