linuxmint / cinnamon-spices-themes

Themes for the Cinnamon desktop
http://cinnamon-spices.linuxmint.com
152 stars 129 forks source link

Changing themes in command lines #712

Open GangsterGranule opened 3 years ago

GangsterGranule commented 3 years ago
 * Cinnamon version 5.0.5
 * Distribution - Mint 20.2

Issue

Hi, I'd like to automatise switching from one theme to another but I can't seem to find any command line to do so.

Expected behaviour

I was thinking of two solutions :

  1. A couple of Cinnamon commands that has the exact same effect that the themes settings GUI (if it exist).
  2. A couple of commands to move some config files around and then refresh Cinnamon.

But I can't think of any way to do either 1 or 2. I'm open to any idea from you kind folks.

Thanks in advance.

fredcw commented 3 years ago

For 1. A command to change the theme would be gsettings set org.cinnamon.theme name "Linux Mint" You can see what other settings can be changed in this way by using dconf program

GangsterGranule commented 3 years ago

@fredcw Thank you very much !

It's exactly what I needed. For information, here is what I used to change the current theme to Mint-Y-Dark :

gsettings set org.cinnamon.desktop.interface icon-theme "Mint-Y-Dark"
gsettings set org.cinnamon.desktop.interface gtk-theme "Mint-Y-Dark"
gsettings set org.cinnamon.theme name "Mint-Y-Dark"
~/.conky/conky-grapes/create_config.py -ri lightgreen -ti green -te lightgrey
xdotool key ctrl+alt+"Escape"

Currently I use a script containing these 4 lines with cron to switch between different themes at different hours of the day. The next step will be for me to make a script that get the time and select the desired theme relatively to a time range.

If some are interrested I'll post the final result here when I'll be done.

tcreek commented 9 months ago

How about that update?

What about changing the menu icon?