initial commit

This commit is contained in:
Bernardo Magri
2026-04-01 17:06:01 +01:00
parent 12cdfaeeef
commit 33deeb494b
526 changed files with 12287 additions and 1 deletions

24
bin/nomarchy-update-restart Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
echo
if [[ ! -d /usr/lib/modules/$(uname -r) ]]; then
gum confirm "Linux kernel has been updated. Reboot?" && nomarchy-system-reboot
elif [[ -f $HOME/.local/state/nomarchy/reboot-required ]]; then
gum confirm "Updates require reboot. Ready?" && nomarchy-system-reboot
fi
running_hyprland=$(readlink /proc/$(pgrep -x Hyprland)/exe 2>/dev/null)
if [[ $running_hyprland == *"(deleted)"* ]]; then
gum confirm "Hyprland has been updated. Reboot?" && nomarchy-system-reboot
fi
for file in "$HOME"/.local/state/nomarchy/restart-*-required; do
if [[ -f $file ]]; then
filename=$(basename "$file")
service=$(echo "$filename" | sed 's/restart-\(.*\)-required/\1/')
echo "Restarting $service"
nomarchy-state clear "$filename"
nomarchy-restart-"$service"
fi
done