luisbocanegra / plasma-panel-colorizer

Fully-featured widget to bring Latte-Dock and WM status bar customization features to the default KDE Plasma panel
https://store.kde.org/p/2130967
GNU General Public License v3.0
109 stars 0 forks source link
colors customization kde kde-plasma latte-dock linux-desktop panel plasma plasma-applet plasma6 plasmoid theme tray-icons widget
# Panel Colorizer [![AUR version](https://img.shields.io/aur/version/plasma6-applets-panel-colorizer?style=for-the-badge&logo=archlinux&labelColor=2d333b&color=1f425f)](https://aur.archlinux.org/packages/plasma6-applets-panel-colorizer) [![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fluisbocanegra%2Fplasma-panel-colorizer%2Fmain%2Fpackage%2Fmetadata.json&query=KPlugin.Version&style=for-the-badge&color=1f425f&labelColor=2d333b&logo=kde&label=Plasmoid)](https://store.kde.org/p/2130967) [![Liberapay](https://img.shields.io/liberapay/patrons/luisbocanegra?style=for-the-badge&logo=liberapay&logoColor=%23F6C814&labelColor=%232D333B&label=supporters)](https://liberapay.com/luisbocanegra/) Fully-featured widget to bring Latte-Dock and WM status bar customization features to the default Plasma panel. ![panel](screenshots/panel.png)

Inspired by the Latte Dock (now unmaintained) theming and boosted by the laziness to learn editing Plasma themes (which can only change background and other small things) created this project that helps you make the Plasma panels look almost however you want.

Demo

Demo

Settings ![tooltip](screenshots/settings.png)

Features

Presets

Widget Background

Icons and text

Panel background

Other

Installing

Install from KDE Store or use Get new widgets..

Manually

  1. Install these dependencies or their equivalents for your distribution

      cmake extra-cmake-modules libplasma plasma5support
  2. Run

      git clone https://github.com/luisbocanegra/plasma-panel-colorizer
      cd plasma-panel-colorizer
      ./install.sh

Arch Linux

aur/plasma6-applets-panel-colorizer use your preferred AUR helper e.g:

yay -S plasma6-applets-panel-colorizer

How to use

  1. Put the widget on any of your panels
  2. Go to the widget settings to change the current panel appearance (right click > Configure...)
  3. Widget can set to only show in panel Edit Mode (right click > Hide widget or from the widget settings)

Restore the original panel appearance

Changes to the panel are not permanent and can be removed by disabling them from Widget Settings > General tab > Enabled checkbox or removing it from the panel and restarting Plasma/logging out.

Fix Blacklist/Margin/Force recolor not working after updating to version 0.5.0

Since version 0.5.0 partial widget names e.g. weather are no longer allowed. This causes previous rules to stay even after removing the matched widgets.

A button to restore/clear the default rules has been added to the relevant sections. image

To fix all saved presets a script is provided:

git clone https://github.com/luisbocanegra/plasma-panel-colorizer
cd plasma-panel-colorizer
./fix-presets-widget-rules.sh

The same script can be used to maintain the same widget rules for all presets

How it works / hacking

This widget works by inject/managing the background and colors of other widgets and the panel where it is placed, the initial goal was to replicate the famous WM status bar look and some Latte Dock theming options without actually modifying the panel/widgets source code.

Technical

Background is drawn by creating rectangle areas bellow widgets/panel, text and icons repaint is done by editing some elements color property and overwriting Kirigami.Theme.<something>Color colors for others, while this works for most widgets, there are some that won't because they draw text and icons differently to what this project matches, if you find a widget that doesn't get colors let me know here and I will try supporting it.

Performance

Some widgets really like to create/destroy/recolor their own widget elements (e.g. Global Menu), to account for this, text and icons color are re-applied every 250ms. I tried to optimize it so CPU usage only increases around 1-2% on my computer, but usage could vary depending on your System or how many widgets are in your panels.

Support the development

If you like the project you can:

"Buy Me A Coffee" Liberapay

Thank you ❤️

Acknowledgements