mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-02 04:37:49 +02:00
25 lines
790 B
Bash
Executable File
25 lines
790 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo
|
|
|
|
if [[ ! -d /usr/lib/modules/$(uname -r) ]]; then
|
|
gum confirm "Linux kernel has been updated. Reboot?" && omarchy-system-reboot
|
|
elif [[ -f $HOME/.local/state/omarchy/reboot-required ]]; then
|
|
gum confirm "Updates require reboot. Ready?" && omarchy-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?" && omarchy-system-reboot
|
|
fi
|
|
|
|
for file in "$HOME"/.local/state/omarchy/restart-*-required; do
|
|
if [[ -f $file ]]; then
|
|
filename=$(basename "$file")
|
|
service=$(echo "$filename" | sed 's/restart-\(.*\)-required/\1/')
|
|
echo "Restarting $service"
|
|
omarchy-state clear "$filename"
|
|
omarchy-restart-"$service"
|
|
fi
|
|
done
|