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

(feat) Plasma Desktop Theme Switcher #63

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SadColourfulHues
Copy link
Contributor

Summary

This PR adds an option to change the plasma desktop theme alongside the colour scheme when using the 'Switch Appearance' toggle.

Purpose

Some theme makers often provide light and dark variations of their desktop themes.

Unfortunately, this introduces an issue when toggling between appearances as these packages may contain hardcoded colour overrides, rendering the light/dark switch effectively useless.

This option allows the user to specify which desktop theme to use when triggering the appearance toggle, giving them better control over their light/dark visual preferences.

Changes

Most of the changes introduced in this PR are localised to files related to the appearance switcher function.

It also adds two configuration keys '(light|dark)PlasmaTheme' to 'config/main.xml' to store the user's desktop theme preferences.

Major(ish) changes:

  • Refactored and moved the colour scheme combobox component into its own file (Components/ConfigAppearanceComboBox.qml)
  • Moved the scheme switcher data source into its own file (Components/ConfigAppearanceDataSource.qml)
  • Refactored the scheme switcher data source to make it easier to add more customisation options in the future.

Preview

(Note: Switching appearances is much faster than what is shown in this screencast. Having Spectacle record the screen, at the same time, seem to have slown it down by a fair bit.)

feat_plasma_theme_switcher.mp4

@slynobody
Copy link

highly seconding this for inclusion.

btw:
would be great to also have options for according dark-/light-
GTK-Theme: gsettings set org.gnome.desktop.interface gtk-theme 'XYZ'
Kvantum-theme: kvantummanager --set XYZ

and maybe also dark-/light-
Icons: plasma-changeicons XYZ
Widget-style: kwriteconfig5 --file kdeglobals --group KDE --key widgetStyle XYZ

(and dont forget this after changin all: dbus-send --session --type=signal /KGlobalSettings org.kde.KGlobalSettings.notifyChange int32:2 int32:0 (refresh screen))

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

Successfully merging this pull request may close these issues.

2 participants