11

I would like to switch between dark and light themes easily (Default Breeze and dark Breeze themes) without having to navigate to System Settings > Global themes > Click on theme > click Apply.

So I was wondering if there existed a way to quickly switch between already installed themes without using the mouse, maybe running a previously made Bash script?

If such a way were feasible then I would be able to fire those scripts with this On/Off plasmoid. So, is there a way to change Global Plasma Theme from the command line?

eridani
  • 1,624

3 Answers3

24

This can be done with lookandfeeltool that shall come preinstalled on any recent version of Plasma 5. To use it, type on a terminal window:

  1. lookandfeeltool --list to get a list of all available themes on your system.
  2. lookandfeeltool -a CopyPastaFromTheOutputAbove to change to your desired theme.

All credits go to user Skyite Ovexion on the KDE's Telegram group.

eridani
  • 1,624
  • 1
    This command changes the Global Theme. I wonder if there's a separate command for Plasma Theme/Style only, otherwise perhaps the only way could be a command like this: sed -i -e "s/name=breeze-dark/name=breeze/" "$HOME/.config/plasmarc" && plasmashell --replace – Sadi Nov 21 '22 at 11:57
  • Saved my life, I just scr*wd up with a borked plasma style. – runlevel0 Mar 20 '24 at 15:02
  • If you get the error Qt: Session management error: None of the authentication protocols specified are supported, you can do env -u SESSION_MANAGER lookandfeeltool -a org.manjaro.breath-dark.desktop – Owen Jun 23 '24 at 18:06
1

kwriteconfig6 seems to be an actual answer. However, there is no documentation on the Internet.

For example, to switch to the default Breeze theme, the command is:

kwriteconfig6 --file kdeglobals --group KDE --key widgetStyle Breeze
-2

Open System Settings as the superuser without the superuser's profile:

sudo -i systemsettings
alchemy
  • 850