🔧 chore(update): restart colorshell if there's an instance running after updating

This commit is contained in:
retrozinndev
2025-10-26 16:26:44 -03:00
parent 1bd457bd83
commit 23cacbbe89
3 changed files with 26 additions and 12 deletions
+8
View File
@@ -121,6 +121,14 @@ if [[ "$answer" == y ]] || [[ "$skip_prompts" ]]; then
mkdir -p $APPS_HOME
cp -f $repo_directory/build/release/colorshell.desktop $APPS_HOME
if Is_running; then
Send_log "colorshell is running, restarting shell..."
colorshell quit || killall gjs
# wait 2s, because the shell can take a little bit of time to close
# (the cli is closed before the action is completed)
sleep 2s && hyprctl dispatch exec "bash $XDG_CONFIG_HOME/hypr/scripts/exec.sh colorshell"
fi
if [[ -z "$skip_prompts" ]]; then
echo "Colorshell is updated! :D"