summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2026-03-27 17:41:30 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2026-03-27 17:41:30 +0100
commit088015c62ca91f6253f8607fd55eb2f6f14085e5 (patch)
treec0d5e86710e5fe3df4f11260b4f58b27d032fdd9 /common
parent23dc7330b8ef7476eec432a3274f40b757254a37 (diff)
2026-03-27 updates by auto-switch
Diffstat (limited to 'common')
-rw-r--r--common/home/hyprland/default.nix32
-rw-r--r--common/home/scripts/loadconfig59
-rw-r--r--common/home/services/dunst/default.nix13
3 files changed, 75 insertions, 29 deletions
diff --git a/common/home/hyprland/default.nix b/common/home/hyprland/default.nix
index ff31c54..e2d0a27 100644
--- a/common/home/hyprland/default.nix
+++ b/common/home/hyprland/default.nix
@@ -37,7 +37,7 @@
"$mod+Shift, P, exec, wofi-pass"
"$mod+Shift, O, exec, wofi-pass otp"
"$mod+Shift, E, exec, webtrayctl show https://chat.nathanreiner.xyz"
- "$mod+Shift, J, exec, webtrayctl show https://jellyfin.nathanreiner.xyz"
+ "$mod+Shift+Alt, J, exec, webtrayctl show https://jellyfin.nathanreiner.xyz"
"$mod+Shift, S, exec, signal-desktop"
", Print, exec, grimshot copy area"
@@ -101,15 +101,15 @@
general = {
gaps_in = 0;
- gaps_out = 0;
+ gaps_out = 5;
layout = "master";
- border_size = 3;
- "col.active_border" = "rgba(b16286ff)";
+ border_size = 1;
+ "col.active_border" = "rgba(3c3836ff)";
"col.inactive_border" = "rgba(3c3836ff)";
};
decoration = {
- rounding = 0;
+ rounding = 4;
shadow = {
enabled = true;
range = true;
@@ -118,15 +118,14 @@
};
animations = {
- enabled = false;
- bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
+ enabled = true;
animation = [
- "windows, 1, 3, myBezier"
- "windowsOut, 1, 3, default, popin 80%"
- "border, 1, 10, default"
- "borderangle, 1, 8, default"
- "fade, 1, 3, default"
- "workspaces, 1, 3, default"
+ "windows, 1, 2, default"
+ "layers, 1, 2, default"
+ "border, 1, 2, default"
+ "borderangle, 1, 2, default"
+ "fade, 1, 2, default"
+ "workspaces, 1, 2, default"
];
};
@@ -153,10 +152,6 @@
};
};
- #gestures = {
- # gesture = "4, horizontal, workspace";
- #};
-
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
@@ -186,6 +181,9 @@
# Waydroid
"float, size 500 900, class:^(waydroid\\..*)$"
"float, size 500 900, class:^(Waydroid)$"
+
+ # Nextcloud
+ "float, move 100%-500 20, size 500 800, noborder, noblur, xray, pin, stayfocused, class:^(com.nextcloud\\..*)$, title:^(Nextcloud)$"
];
ecosystem = {
diff --git a/common/home/scripts/loadconfig b/common/home/scripts/loadconfig
index 9f3fe57..f355092 100644
--- a/common/home/scripts/loadconfig
+++ b/common/home/scripts/loadconfig
@@ -1,15 +1,54 @@
#!/bin/sh
-cmd=$(printf "test\nswitch" | wofi -d -p 'Loading Type')
+CONFIG_PATH=$HOME/global/system/config/
-[ -z "$cmd" ] && exit
+NID=$RANDOM
-echo CMD = $cmd
+cmd=$(printf "Test\nSwitch\nCommit\nUpdate" | wofi -d -p 'Select')
-alacritty --class Hyprland::WinClass::Floating -e sh -c "
-sudo nixos-rebuild $cmd --flake '$HOME/global/system/config/'
-echo
-echo Press [Return] to continue
-echo
-read
-"
+kind=test
+desc=Temporarily
+
+case "$cmd" in
+
+ Update)
+ nix flake update --flake "$CONFIG_PATH"
+ dunstify " NixOS - Config" "Updated Flake"
+ ;;&
+
+ Switch | Commit | Update)
+ git -C "$CONFIG_PATH" add .
+ git -C "$CONFIG_PATH" commit -m "$(date '+%Y-%m-%d updates by auto-switch')"
+ dunstify " NixOS - Config" "Created New Commit"
+
+ case "$cmd" in
+ Commit | Update) exit;
+ esac
+
+ kind=switch
+ desc=Permanently
+ ;;&
+
+ Test | Switch)
+ dunstify -r "$NID" " NixOS - Config" "Switching Config $desc." --hints=int:value:0 -t 0
+
+ declare -i i=0
+
+ sudo nixos-rebuild "$kind" --flake "$CONFIG_PATH" 2>&1 | while read line; do
+ case "$line" in
+ these*)n=$(echo "$line" | grep -Eo '[0-9]*');;
+ "building '"*)
+ i+=1
+ progress=$(($i * 100 / $n))
+ dunstify -r "$NID" " NixOS - Config" "Switching Config $desc." --hints=int:value:"$progress" -t 0
+ ;;
+ *error*)
+ dunstify -r "$NID" -u 2 " NixOS - Config" "Error Loading Config"
+ ;;
+ Done.)
+ dunstify -r "$NID" " NixOS - Config" "Switching Config $desc.\nDone."
+ ;;
+ esac
+ done
+ ;;
+esac
diff --git a/common/home/services/dunst/default.nix b/common/home/services/dunst/default.nix
index 28438e0..63ff585 100644
--- a/common/home/services/dunst/default.nix
+++ b/common/home/services/dunst/default.nix
@@ -7,10 +7,19 @@
height = 300;
offset = "30x30";
origin = "top-right";
- transparency = 0;
- frame_color = "#b16286";
+ transparency = 5;
+ frame_color = "#3c3836";
+ frame_width = 1;
corner_radius = 5;
font = "SauceCodePro NF 9";
+ follow = "mouse";
+
+ progress_bar_height = 5;
+ progress_bar_corner_radius = 4;
+ progress_bar_frame_width = 1;
+ progress_bar_frame_color = "#3c3836";
+
+ highlight = "#ebdbb2";
};
urgency_normal = {