From 0f47c96bbb838a2e2ca1dcb64585872b4eafea19 Mon Sep 17 00:00:00 2001 From: pvincent Date: Wed, 4 Aug 2021 16:04:02 +0400 Subject: [PATCH] gnome-shell force restart if needed --- src/main | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main b/src/main index 18cfef2..055c0bd 100755 --- a/src/main +++ b/src/main @@ -192,8 +192,8 @@ else echo "gnome-extensions-cli already installed!" fi -echo "## gnome extension system-monitor" -echo "=================================" +echo "## gnome-shell install several extensions" +echo "=========================================" EXTENSIONS=( "appindicatorsupport@rgcjonas.gmail.com" "system-monitor@paradoxxx.zero.gmail.com" @@ -201,8 +201,10 @@ EXTENSIONS=( "netspeed@hedayaty.gmail.com" ) +NEED_GNOME_SHELL_RESTART=false for extension in "${EXTENSIONS[@]}"; do if [[ ! -d $HOME/.local/share/gnome-shell/extensions/$extension ]];then + NEED_GNOME_SHELL_RESTART=true gnome-extensions-cli --backend file install $extension if [[ -d $HOME/.local/share/gnome-shell/extensions/$extension/schemas ]]; then sudo cp $HOME/.local/share/gnome-shell/extensions/$extension/schemas/*.gschema.xml /usr/share/glib-2.0/schemas/ @@ -213,6 +215,7 @@ for extension in "${EXTENSIONS[@]}"; do fi done + echo "# gnome extra settings" echo "======================" gsettings set org.gnome.shell.extensions.system-monitor show-tooltip true @@ -263,3 +266,7 @@ echo echo echo "# DEBIAN-GNOME successfully installed!" echo + +if [[ $NEED_GNOME_SHELL_RESTART == true ]]; then + killall -HUP gnome-shell +fi