diff --git a/bin/omarchy-refresh-walker b/bin/omarchy-refresh-walker index a08a29cc..dd6900e1 100755 --- a/bin/omarchy-refresh-walker +++ b/bin/omarchy-refresh-walker @@ -5,9 +5,17 @@ # Ensure walker is set to autostart mkdir -p ~/.config/autostart/ cp $OMARCHY_PATH/default/walker/walker.desktop ~/.config/autostart/ + +# And restarts if it crashes or is killed +mkdir -p ~/.config/systemd/user/app-walker@autostart.service.d/ +cp $OMARCHY_PATH/default/walker/restart.conf ~/.config/systemd/user/app-walker@autostart.service.d/restart.conf + systemctl --user daemon-reload +# Refresh configs omarchy-refresh-config walker/config.toml omarchy-refresh-config elephant/calc.toml omarchy-refresh-config elephant/desktopapplications.toml + +# Restart service omarchy-restart-walker diff --git a/default/walker/restart.conf b/default/walker/restart.conf new file mode 100644 index 00000000..57940311 --- /dev/null +++ b/default/walker/restart.conf @@ -0,0 +1,3 @@ +[Service] +Restart=always +RestartSec=2 diff --git a/install/config/walker-elephant.sh b/install/config/walker-elephant.sh index b38e022c..de924d4c 100644 --- a/install/config/walker-elephant.sh +++ b/install/config/walker-elephant.sh @@ -4,6 +4,10 @@ mkdir -p ~/.config/autostart/ cp $OMARCHY_PATH/default/walker/walker.desktop ~/.config/autostart/ +# And is restarted if it crashes or is killed +mkdir -p ~/.config/systemd/user/app-walker@autostart.service.d/ +cp $OMARCHY_PATH/default/walker/restart.conf ~/.config/systemd/user/app-walker@autostart.service.d/restart.conf + # Create pacman hook to restart walker after updates sudo mkdir -p /etc/pacman.d/hooks sudo tee /etc/pacman.d/hooks/walker-restart.hook > /dev/null << EOF diff --git a/migrations/1770375817.sh b/migrations/1770375817.sh new file mode 100644 index 00000000..28e03f8a --- /dev/null +++ b/migrations/1770375817.sh @@ -0,0 +1,6 @@ +echo "Ensure walker service is restarted if it's killed or crashes" + +mkdir -p ~/.config/systemd/user/app-walker@autostart.service.d/ +cp $OMARCHY_PATH/default/walker/restart.conf ~/.config/systemd/user/app-walker@autostart.service.d/restart.conf +systemctl --user daemon-reload +