From af00f6efe6a3bc0ab5bf71964471f2dab274f56a Mon Sep 17 00:00:00 2001 From: tigro Date: Thu, 3 Oct 2024 13:21:41 +0300 Subject: [PATCH] Added translations Added --force option --- gnome-flavour-selector.desktop | 6 ++++-- gnome-flavour-selector.sh | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/gnome-flavour-selector.desktop b/gnome-flavour-selector.desktop index 2c1d408..7099918 100644 --- a/gnome-flavour-selector.desktop +++ b/gnome-flavour-selector.desktop @@ -1,6 +1,8 @@ [Desktop Entry] -Name=Choose Desktop -GenericName=Choose Desktop Design +Name=Choose Desktop Design +Name[ru]=Выбор оформления рабочего стола +Comment=Choose Windows 10 or MacOS style +Comment[ru]=Выберите стиль Windows 10 или MacOS Exec=/usr/bin/gnome-flavour-selector Terminal=false Icon=org.gnome.tweaks.svg diff --git a/gnome-flavour-selector.sh b/gnome-flavour-selector.sh index fa3c3f5..29b4f64 100755 --- a/gnome-flavour-selector.sh +++ b/gnome-flavour-selector.sh @@ -1,5 +1,13 @@ #!/bin/sh +FORCE_KEY="$1" + +if [ "x$FORCE_KEY" != "x" -a "$FORCE_KEY" != "--force" ]; then + echo "Unknown key. Exit." + exit 1 +fi + + LOCK_FILE="$HOME/.config/gnome-flavour-selector/timestamp" EXTENSIONS_SWITCHER="/etc/gnome-flavour-selector/extensions.json" @@ -35,10 +43,14 @@ if [ -f "$LOCK_FILE" -a -f "$EXTENSIONS_SWITCHER" ]; then done fi -if [ -f "$LOCK_FILE" ]; then +if [ -f "$LOCK_FILE" -a "$FORCE_KEY" != "--force" ]; then exit 0 fi +if [ "$FORCE_KEY" != "--force" ]; then + date +%Y%m%d%H%M > $LOCK_FILE +fi + EXTENSIONS="arcmenu@arcmenu.com ding@rastersoft.com dash-to-panel@jderose9.github.com" for ext in $EXTENSIONS; do gnome-extensions disable $ext @@ -105,5 +117,3 @@ elif [ $MODE = "Shell" ]; then else echo "Unknown" fi - -date +%Y%m%d%H%M > $LOCK_FILE