Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing themes in command lines #712

Open
GangsterGranule opened this issue Aug 10, 2021 · 3 comments
Open

Changing themes in command lines #712

GangsterGranule opened this issue Aug 10, 2021 · 3 comments

Comments

@GangsterGranule
Copy link

 * 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
Copy link
Contributor

fredcw commented Aug 10, 2021

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
Copy link
Author

@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"
  • The 4th command change the theme of a conky that I use (optional).
  • The 5th is a keyboard shortcut "cheat" included in Mint to refresh Cinnamon (don't know if it's present in other distros).
  • I never change cursor but I guess it will be gsettings set org.cinnamon.desktop.interface cursor-theme.
  • Neither the borders but this one I haven't found.

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
Copy link

tcreek commented Dec 18, 2023

How about that update?

What about changing the menu icon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants