From 3c6c3415ed99768f8b3dc6a5f5816e4493243acb Mon Sep 17 00:00:00 2001 From: pvincent Date: Fri, 15 Sep 2023 09:36:51 +0400 Subject: [PATCH] goldendict autostart --- src/main | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main b/src/main index 7bc7806..50eef47 100755 --- a/src/main +++ b/src/main @@ -193,6 +193,13 @@ if [[ ! -f $HOME/.config/goldendict/config ]] || ! grep -q "path.*/usr/share/gol cp "$BASEDIR/lib/goldendict/config" "$HOME/.config/goldendict/" nohup goldendict & fi +if [[ ! -f $HOME/.config/autostart/org.goldendict.GoldenDict.desktop ]]; then + echo -n "autostart GoldenDict ..." + ln -sf /usr/share/applications/org.goldendict.GoldenDict.desktop $HOME/.config/autostart/ + echo OK +else + echo "autostart GoldenDict already installed!" +fi echo "## gnome-extensions-cli" echo "=======================" @@ -212,15 +219,20 @@ EXTENSIONS=( "network-stats@gnome.noroadsleft.xyz" ) +compile_schemas_needed=false for extension in "${EXTENSIONS[@]}"; do if [[ ! -d $HOME/.local/share/gnome-shell/extensions/$extension ]]; then "$HOME/.local/bin/gext" install "$extension" sudo cp "$HOME"/.local/share/gnome-shell/extensions/"$extension"/schemas/*.gschema.xml /usr/share/glib-2.0/schemas/ + compile_schemas_needed=true + else echo "extension <${extension}> already installed!" fi done -sudo glib-compile-schemas /usr/share/glib-2.0/schemas/ +if "$compile_schemas_needed"; then + sudo glib-compile-schemas /usr/share/glib-2.0/schemas/ +fi echo "# gnome extra settings" echo "======================"