From 4856f0a9ac648820c278fa12b42d430573f7b42d Mon Sep 17 00:00:00 2001 From: Ward Nakchbandi Date: Sat, 24 Sep 2022 13:22:00 +0300 Subject: [PATCH] commit --- .../nobara-layouts/settings-scripts/kde.sh | 27 +++++++++++++++++++ .../settings-scripts/weather.sh | 27 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100755 src/etc/nobara/scripts/nobara-layouts/settings-scripts/kde.sh create mode 100755 src/etc/nobara/scripts/nobara-layouts/settings-scripts/weather.sh diff --git a/src/etc/nobara/scripts/nobara-layouts/settings-scripts/kde.sh b/src/etc/nobara/scripts/nobara-layouts/settings-scripts/kde.sh new file mode 100755 index 0000000..503cff4 --- /dev/null +++ b/src/etc/nobara/scripts/nobara-layouts/settings-scripts/kde.sh @@ -0,0 +1,27 @@ +#! /bin/bash + +# Get needed extensions into userland + +if [[ $1 == enable ]]; then + if [ -d "$HOME/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io" ]; then + echo "gsconnect already in userland no need to download anything" + echo "Enabling Now" + gnome-extensions enable gsconnect@andyholmes.github.io + else + mkdir -p "$HOME/.cache/nobara-layouts/extensions/" + cd "$HOME/.cache/nobara-layouts/extensions/" + ls gsconnectandyholmes.github.io.v50.shell-extension.zip || wget https://extensions.gnome.org/extension-data/gsconnectandyholmes.github.io.v50.shell-extension.zip + gnome-extensions install "$HOME/.cache/nobara-layouts/extensions/gsconnectandyholmes.github.io.v50.shell-extension.zip" + export RELOG_NEEDED=1 + fi + + if [[ "$RELOG_NEEDED" == 1 ]]; then + if zenity --question --text="New extensions have been installed!, reload required!" + then + gnome-session-quit --force --no-prompt + fi + fi +else +echo "Disabling Now" +gnome-extensions disable gsconnect@andyholmes.github.io +fi diff --git a/src/etc/nobara/scripts/nobara-layouts/settings-scripts/weather.sh b/src/etc/nobara/scripts/nobara-layouts/settings-scripts/weather.sh new file mode 100755 index 0000000..336f846 --- /dev/null +++ b/src/etc/nobara/scripts/nobara-layouts/settings-scripts/weather.sh @@ -0,0 +1,27 @@ +#! /bin/bash + +# Get needed extensions into userland + +if [[ $1 == enable ]]; then + if [ -d "$HOME/.local/share/gnome-shell/extensions/openweather-extension@jenslody.de" ]; then + echo "weather already in userland no need to download anything" + echo "Enabling Now" + gnome-extensions enable openweather-extension@jenslody.de + else + mkdir -p "$HOME/.cache/nobara-layouts/extensions/" + cd "$HOME/.cache/nobara-layouts/extensions/" + ls openweather-extensionjenslody.de.v119.shell-extension.zip || wget https://extensions.gnome.org/extension-data/openweather-extensionjenslody.de.v119.shell-extension.zip + gnome-extensions install "$HOME/.cache/nobara-layouts/extensions/openweather-extensionjenslody.de.v119.shell-extension.zip" + export RELOG_NEEDED=1 + fi + + if [[ "$RELOG_NEEDED" == 1 ]]; then + if zenity --question --text="New extensions have been installed!, reload required!" + then + gnome-session-quit --force --no-prompt + fi + fi +else +echo "Disabling Now" +gnome-extensions disable openweather-extension@jenslody.de +fi