mirror of
https://codeberg.org/knightsub9/lxcafe.git
synced 2026-07-19 19:30:16 +02:00
+49
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Cinnamon-specific script - called by main script
|
||||
# This file contains Cinnamon-specific configurations
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
CINNAMONDIR="$SCRIPT_DIR/cinnamon"
|
||||
|
||||
echo
|
||||
echo
|
||||
echo "### System Monitor Applet ###"
|
||||
if question_answered_with_yes " ### System Monitor Applet in der Taskleiste installieren? ###"; then
|
||||
echo "### System Monitor Applet wird installiert ###"
|
||||
sudo apt-get install gir1.2-gtop-2.0 -y
|
||||
wget -O /tmp/sysmonitor@orcus.zip "https://cinnamon-spices.linuxmint.com/files/applets/sysmonitor@orcus.zip"
|
||||
unzip -o /tmp/sysmonitor@orcus.zip -d ~/.local/share/cinnamon/applets/
|
||||
rm /tmp/sysmonitor@orcus.zip
|
||||
|
||||
CURRENT_APPLETS=$(gsettings get org.cinnamon enabled-applets)
|
||||
echo "DEBUG: current enabled-applets = $CURRENT_APPLETS"
|
||||
INSTANCE_ID=$(gsettings get org.cinnamon next-applet-id)
|
||||
echo "DEBUG: ID for the new applet = $INSTANCE_ID"
|
||||
|
||||
echo "DEBUG: Adding sysmonitor to applets list..."
|
||||
NEW_APPLET="panel1:right:13:sysmonitor@orcus:$INSTANCE_ID"
|
||||
NEW_APPLETS=$(echo "$CURRENT_APPLETS" | sed "s/\\]$/, '$NEW_APPLET']/")
|
||||
gsettings set org.cinnamon enabled-applets "$NEW_APPLETS"
|
||||
echo "DEBUG: Checking updated current enabled-applets = $(gsettings get org.cinnamon enabled-applets)"
|
||||
|
||||
NEXT_ID=$((INSTANCE_ID + 1))
|
||||
echo "DEBUG: Setting next-applet-id to $NEXT_ID..."
|
||||
gsettings set org.cinnamon next-applet-id "$NEXT_ID"
|
||||
echo "DEBUG: Checking updated next-applet-id = $(gsettings get org.cinnamon next-applet-id)"
|
||||
|
||||
echo "copy system monitor config file..."
|
||||
mkdir -p ~/.config/cinnamon/spices/sysmonitor@orcus/
|
||||
cp "$CINNAMONDIR/sysmonitor_settings.json" ~/.config/cinnamon/spices/sysmonitor@orcus/$INSTANCE_ID.json
|
||||
|
||||
if question_answered_with_yes " ### Falls System Monitor Applet in der Taskleiste nicht angezeigt wird: Cinnamon Desktop neu laden? ###"; then
|
||||
echo "Dialog 'Sie befinden sich im Rückfallmodus' mit JA beantworten um Desktop neuzustarten"
|
||||
pkill -HUP -f "cinnamon --replace"
|
||||
else
|
||||
echo "Falls die Taskleiste nicht aktualisiert wurde: Abmelden und wieder anmelden oder neu starten"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Fertig! System Monitor Applet wurde installiert."
|
||||
|
||||
fi
|
||||
Reference in New Issue
Block a user