Automatic Material You Colors Generator from your wallpaper for the Plasma Desktop
Project description
🎨 KDE Material You Colors
Automatically generate Light/Dark Color Themes for KDE (and pywal if installed) from your current wallpaper, using Python implementation of Google's Material Color Utilities
Features
Plasma specific
- Plasma Widget
- Support for all Wallpaper plugins (color, image, slideshows, animated, Plasma 5.26+ dark wallpaper variants)
- Update automatically on wallpaper change
- Change icon themes
- Start automatically on login
- Make titlebar darker to match specified applications like terminals, code editors and other programs themed by pywal
- Follow Plasma Material You Dark/Light change to work with theme schedulers like Koi
- Plasma addons
- Tint SierraBreeze window decoration buttons
- TitleBar opacity control for Klassy and SierraBreezeEnhanced window decorations
- ToolBar opacity control for Lightly Application style
- Tint Klassy window decoration outline
Themeable programs
- Konsole color scheme
- opacity control
- Pywal support to theme other programs using Material You Colors
- Basic KSyntaxHighlighting support (Kate, KWrite, KDevelop...)
Theming options
- Alternative Material You color selection if the wallpaper provides more than one
- Use your favorite color to generate Material You color schemes
- Custom colors list used for konsole/pywal
- Custom amount for background color tint
- Dark/light Color schemes (Plasma and pywal/konsole independently)
- Set a script that will be executed on start or wallpaper/dark/light/settings change
- Configuration file
Installing
1. Backend
Using pypi with pipx
(recommended) using this command,
pipx install kde-material-you-colors
# Optional
# pywal to theme other programs using Material You Colors
pipx inject kde-material-you-colors pywal
or pip
using this command
pip install kde-material-you-colors
# Optional
# pywal to theme other programs using Material You Colors
pip install pywal
[!IMPORTANT] You may need to install
gcc python-dbus-dev libglib2.0-dev
system packages or their equivalent for your distribution. Additionally, installing some libraries for Pillow may be necessary, see Pillow docs
2. Plasma widget and desktop screenshot helper (support for all wallpaper plugins)
Install extra-cmake-modules qt5-qttools-devel kf5-plasma-devel
system packages or their equivalent for your distribution.
User install
cmake -B build -S . -DCMAKE_INSTALL_PREFIX=~/.local -DINSTALL_PLASMOID=ON
cmake --build build
cmake --install build
System-wide install
cmake -B build -S . -DCMAKE_INSTALL_PREFIX=/usr -DINSTALL_PLASMOID=ON
cmake --build build
sudo cmake --install build
[!NOTE] You can also install the widget from the KDE Store and set
-DINSTALL_PLASMOID=OFF
in the command above
- Right click on panel > Add Widgets > Get New Widgets > Download New Plasma Widgets
- Search for "KDE Material You Colors"
Arch Linux
- AUR use your preferred AUR helper
Optional features
- Install the pywal python module to theme other programs using Material You Colors
- Check pywal Customization Wiki to theme supported programs
Running from terminal to debug your configuration
-
Run
kde-material-you-colors
-
Flags take precedence over configuration file, run
kde-material-you-colors -h
to see the list of available options
Starting/Stopping Desktop entries
[!NOTE] If not installed by your package manager, run
kde-material-you-colors -cl
to copy desktop entries to ~/.local/share/applications/
- To start the program launch KDE Material You Colors from your applications list
- To stop it launch Stop KDE Material You Colors from your applications list
Running on Startup
After finishing the setup, you can make it run automatically on boot
-
Copy the default configuration to ~/.config/kde-material-you-colors/config.conf:
kde-material-you-colors -c
-
Set the program to automatically start with Plasma:
kde-material-you-colors -a
-
Reboot or logout/login and test the changes
Removing from autostart
- Open
System Settings
>Startup and Shutdown
- Remove
kde-material-you-colors
by clicking on the-
button.
Configuration file
- Copy default configuration: run
kde-material-you-colors -c
- Edit ~/.config/kde-material-you-colors/config.conf
- Run
kde-material-you-colors
with no arguments from terminal to test it. - You can view the sample configuration file here
Notes
-
To update color with
plasma-apply-colorscheme
(utility provided by plasma developers), the file containing the new color scheme must have a different name than the current one, to workaround this the program creates two scheme files with different names, then applies one after the other. As a result you end up with duplicated color schemes and maybe some lag while updating schemes. -
The wallpaper is obtained in the following order:
-
First, uses the Plasma Desktop Scripting API to read Wallpaper plugin configuration.
-
If the previous fails, the screenshot helper (if installed) is used
The backend uses the KWin Scripting API and calls the screenshot helper to take a Screenshot of the Desktop view using the KWin's Screenshot plugin
-
Bug reporting / Feature requests / Contributing
Please read the Contributing guidelines in this repository
Credits
- Python Implementation of Material Color Utilities used by this project.
- Material Color Utilities
- Pywal used to apply material colors to pywal supported software
- MaterialColorUtilities (C#) (used until v0.8.0).
- xdg-desktop-portal-kde base for desktop screenshot helper.
- kdotool base for getting desktop window id.
- Google LLC. / Pictogrammers for the widget icon.
- This comment on Reddit and ksetwallpaper for the code to get the current Wallpaper that served me as inspiration.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for kde-material-you-colors-1.8.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 587efac33d13c3f0627e6a43e38dea60295f916c3398b840f54a1df9cb9d5c3d |
|
MD5 | 42b7dc1a6c18549fbf5d0d51e43d02f7 |
|
BLAKE2b-256 | ed056276c1251c3f8b3a0da03d8b553c70a294aec2528889ef93321cc9b625d2 |
Hashes for kde_material_you_colors-1.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbcbad072ea0a6c70aeb7d8370d42fd057a81992376fc5f919663767fdf69dbc |
|
MD5 | b1d3554c771fe51865d7dca94c3a741e |
|
BLAKE2b-256 | 49f8dd7be42286ca09eba82ec29db219503c1f2ebaf448d77afc9d16617169e2 |