summaryrefslogtreecommitdiff
path: root/home-manager/scripts
diff options
context:
space:
mode:
authoralex <[email protected]>2026-10-18 17:01:49 +0200
committeralex <[email protected]>2026-10-18 17:01:49 +0200
commit6a03737a82434686cde55e8650fb96df51a8fb23 (patch)
treeff47f1f3f031440777d663d65113d67be150a5b6 /home-manager/scripts
parent73a4ca1dbd42a92839ab03e832f48fe7bed96de7 (diff)
downloadnixos-6a03737a82434686cde55e8650fb96df51a8fb23.tar.xz
nixos-6a03737a82434686cde55e8650fb96df51a8fb23.zip
added foot, .bashrc and matugen to home manager
Diffstat (limited to 'home-manager/scripts')
-rwxr-xr-xhome-manager/scripts/matugen-sync.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/home-manager/scripts/matugen-sync.sh b/home-manager/scripts/matugen-sync.sh
new file mode 100755
index 0000000..5ae80e3
--- /dev/null
+++ b/home-manager/scripts/matugen-sync.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+# We watch the state file that contains the actual text path of the wallpaper
+STATE_DIR="$HOME/.cache/serpantinum/wallpaper/"
+STATE_FILE="current_DP-2"
+
+inotifywait -m -e close_write "$STATE_DIR" |
+while read -r directory events filename; do
+ if [ "$filename" = "$STATE_FILE" ]; then
+
+ # Give Serpantinum a split second to finish its operations
+ sleep 0.5
+
+ # Read the real path of the image from the text file
+ WP_PATH=$(cat "$STATE_DIR$STATE_FILE")
+
+ # 1. Run Matugen against the ORIGINAL valid image file
+ matugen image "$WP_PATH"
+
+ # 2. Reload Hyprland
+ hyprctl reload
+
+ # 3. Reload running Foot terminals
+ pkill -HUP foot
+
+ fi
+done