Need a simple cinnamon applet

Sure. I looked at that script, and I see, the work is done on these lines:

gsettings set org.cinnamon.desktop.interface gtk-theme "$THEME_CHOICE"
gsettings set org.cinnamon.desktop.interface icon-theme "$THEME_CHOICE"
gsettings set org.cinnamon.theme name "$THEME_CHOICE"

I assume, you still want a toggle effect between 2 set of theme options?
So I provide you 3 scripts, themesaveA, themesaveB, and toggletheme.
Place these scripts into your home folder (but you can place them anywhere you like).
Set up your desktop theme as you like, then launch themesaveA. It will theoretically create a file for you in ~/.config, and store there the theme options it can read.
Then after that change your desktop theme to the other settings you would like, and launch themesaveB. If I did not mess up things, it will create another file for the alternative settings.
Then launch toggletheme script couple times, and watch, how it behaves, what it does.
If that is what you want to achieve, assign a keyboard shortcut to the toggletheme script.
Here’s an article about Cinnamons keyboard shortcuts, and how to add your own custom…

And now the scripts, first the themesaveA:

#! /bin/bash
gtk=$(gsettings get org.cinnamon.desktop.interface gtk-theme)
icon=$(gsettings get org.cinnamon.desktop.interface icon-theme)
theme=$(gsettings get org.cinnamon.theme name)
echo "gtk=\"$gtk\"" >~/.config/themea
echo "icon=\"$icon\"" >>~/.config/themea
echo "theme=\"$theme\"" >>~/.config/themea

The script themesaveB is the same, just output to a different file:

#! /bin/bash
gtk=$(gsettings get org.cinnamon.desktop.interface gtk-theme)
icon=$(gsettings get org.cinnamon.desktop.interface icon-theme)
theme=$(gsettings get org.cinnamon.theme name)
echo "gtk=\"$gtk\"" >~/.config/themeb
echo "icon=\"$icon\"" >>~/.config/themeb
echo "theme=\"$theme\"" >>~/.config/themeb

Now the toggle script:

#! /bin/bash
flag="$HOME/.config/themeflag"
if [ -f "$flag" ]; then
    rm $flag
    conf=~/.config/themea
else
    touch $flag
    conf=~/.config/themeb
fi
source $conf
gsettings set org.cinnamon.desktop.interface gtk-theme $gtk
gsettings set org.cinnamon.desktop.interface icon-theme $icon
gsettings set org.cinnamon.theme name $theme

I don’t have a Cinnamon, and I would not like to install it at the moment.
So, please, try these scripts. Copy/paste them into your favorite text editor, and save them accordingly. Don’t forget to chmod +x them!
If it works, as you whish it to work, then huuraay!!! :smiley:
If it doesn’t, let me know about the problem.
Also, attach any error message, as well as the ~/.config/themea and ~/.config/themeb file.
Good luck!
:wink:
Update… I did fthis or my MATE, it looks almost identical, except it uses dconf read and dconf write commands. Based on the bugs I found in my previous implementation, updated the above scripts.
I hope, it will work for you… :wink:

1 Like