luisbocanegra / kde-material-you-colors

Automatic color scheme generator from your wallpaper for KDE Plasma powered by Material You
https://store.kde.org/p/2136963
GNU General Public License v3.0
348 stars 6 forks source link
colorscheme dynamic-color kde kde-plasma konsole konsole-color-schemes linux linux-desktop material-you plasma plasma-applet plasma-color-scheme plasma6 plasmoid python pywal theme
# 🎨 KDE Material You Colors Screenshot Automatically generate light/dark color themes for KDE (and pywal if installed) from your current wallpaper, using [@T-Dynamos Python implementation](https://github.com/T-Dynamos/materialyoucolor-python) of Google's [Material Color Utilities](https://github.com/material-foundation/material-color-utilities) [![AUR version](https://img.shields.io/aur/version/kde-material-you-colors?style=for-the-badge&logo=archlinux&labelColor=2d333b&color=1f425f)](https://aur.archlinux.org/packages/kde-material-you-colors) [![PyPI - Version](https://img.shields.io/pypi/v/kde-material-you-colors?style=for-the-badge&logo=python&labelColor=2d333b&color=1f425f)](https://pypi.org/project/kde-material-you-colors/) [![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fluisbocanegra%2Fkde-material-you-colors%2Fmain%2Fsrc%2Fplasmoid%2Fpackage%2Fmetadata.json&query=KPlugin.Version&style=for-the-badge&color=1f425f&labelColor=2d333b&logo=kde&label=Plasmoid)](https://store.kde.org/p/2136963) [![Liberapay](https://img.shields.io/liberapay/patrons/luisbocanegra?style=for-the-badge&logo=liberapay&logoColor=%23F6C814&labelColor=%232D333B&label=supporters)](https://liberapay.com/luisbocanegra/)

Screenshots

Features

Plasma specific

Themeable programs

Theming options

Installing

Manual install

  1. Install pipx system packages from your distribution packages.

  2. Install the backend

    For Plasma 5 this is the last version, development has switched to plasma 6

    pipx install kde-material-you-colors==1.7.1
    pipx inject kde-material-you-colors pywal

    For Plasma 6

    pipx install kde-material-you-colors
    pipx inject kde-material-you-colors pywal
    # to upgrade to newer version
    pipx upgrade kde-material-you-colors

    Note: 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

  3. Install the widget from the KDE Store Plasma 6 version | Plasma 5 version

    1. Right click on the Panel > Add Widgets > Get New Widgets > Download New Plasma Widgets
    2. Search for "KDE Material You Colors", install & add it to your Panel/Desktop.
  4. Install the screenshot helper. Optional but recommended if you use other than default Image wallpaper plugin

    Plasma 6

    Install git extra-cmake-modules system packages or their equivalent for your distribution.

    git clone https://github.com/luisbocanegra/kde-material-you-colors
    ./install-screenshot-helper.sh

    Plasma 5

    Install git extra-cmake-modules system packages or their equivalent for your distribution.

    git clone https://github.com/luisbocanegra/kde-material-you-colors -b plasma5
    ./install-screenshot-helper.sh

To upgrade to a new version repeat these steps.

Note: When you upgrade te widget to a newer version it will inform you if it requires a new version of the backend.

Running

You can Start and change the configuration from the widget.

From terminal

kde-material-you-colors

Run kde-material-you-colors -h to see the list of available options (Flags take precedence over configuration file)

Starting/Stopping Desktop entries

If not installed by your package manager, run kde-material-you-colors -cl

Running on Startup

kde-material-you-colors -a

Removing from autostart

  1. Open System Settings > Autostart
  2. Remove kde-material-you-colors by clicking on the Trash button.

Configuration file

The preferred way to change the configuration is from the widget. If the configuration doesn't exist, it will be automatically created by the widget.

Editing manually

The default configuration file can be created by running kde-material-you-colors -c the location is ~/.config/kde-material-you-colors/config.conf

Run kde-material-you-colors with no arguments from terminal to test your changes in real time.

Due to Qt limitations, comments are removed from the configuration file by the widget. You can view the sample configuration file with comments here.

FAQ

Q. How does this different from Plasma's "Accent Color From Wallpaper" and "Tint all colors with accent color"?

There are some key differences:

Q. Why there are duplicated color schemes in System Settings

To update color with plasma-apply-colorscheme (utility provided by KDE developers), the file containing the new color scheme must have a different name than the current one, to workaround that, this program creates two color 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.

Q. Can't get wallpaper colors of the default wallpaper

If you are using the default Image wallpaper plugin try changing the image to something else at least once first.

Q. Slideshow wallpaper (or any other Plugin) doesn't update colors correctly

Try enabling Only use screenshot method from the widget Advanced settings

Q. How does wallpaper detection work and why it fails sometimes?

The wallpaper is obtained in the following order:

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

Both methods are somewhat robust but there are edge cases when detection will fail, which are explained here

Bug reporting / Feature requests / Contributing

Please read the Contributing guidelines in this repository

Support the development

If you like the project you can:

"Buy Me A Coffee" Liberapay

Thank you ❤️

Acknowledgements