Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
luisbocanegra committed Feb 19, 2024
0 parents commit d2b1524
Show file tree
Hide file tree
Showing 17 changed files with 1,717 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build/

# plasmoid
*.plasmoid

playground
31 changes: 31 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
cmake_minimum_required(VERSION 3.16)
project("plasmoid-panel-colorizer")
option(INSTALL_PLASMOID "Install plasmoid" ON)
option(PACKAGE_PLASMOID "Package plasmoid" OFF)
# Use Extra CMake Modules (ECM) for common functionality.
# See http://api.kde.org/ecm/manual/ecm.7.html
# and http://api.kde.org/ecm/manual/ecm-kde-modules.7.html
find_package(ECM REQUIRED NO_MODULE)
# Needed by find_package(KF5Plasma) below.
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_MODULE_PATH})

# Get id and version from metadata
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/package/metadata.json METADATA)
string(JSON PLUGIN_ID GET ${METADATA} KPlugin Id)
string(JSON CUR_VERSION GET ${METADATA} KPlugin Version)
message("Plugin Id: ${PLUGIN_ID}")
message("Version: ${CUR_VERSION}")

if(INSTALL_PLASMOID)
# Locate plasma_install_package macro.
find_package(Plasma REQUIRED)
plasma_install_package(package ${PLUGIN_ID})
endif()

# Genreate plasmoid file
set(PLASMOID_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}-v${CUR_VERSION}.plasmoid")
add_custom_target(plasmoid ALL
COMMAND rm -rf "${PLASMOID_FILE}"
COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_CURRENT_SOURCE_DIR}/package zip -r ${PLASMOID_FILE} ./
COMMENT "Generating ${PLASMOID_FILE}"
)
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Panel Colorizer plasmoid

Powerful fully-featured KDE Plasma panel colorizer for a WM status bar like appearance

This is a plasmoid whose sole purpose is to inject/manage the background of other widgets in the same panel, the goal was to replicate the famous WM status bar look without actually making other widgets or modifying the panel itself.

## Demo

https://github.com/luisbocanegra/plasma-panel-colorizer/assets/15076387/ec1148e2-f81e-472e-af58-b16f177d4983

<details>
<summary>Settings</summary>

![tooltip](screenshots/settings.png)

</details>

## Requirements

* Plasma 6

## Current & planned features

* [x] Opacity
* [x] Border radius
* [x] Color modes
* [x] Static
* [x] Animated
* [x] Interval
* [x] Fading
* [x] Colors
* [x] Single
* [x] Accent
* [x] Custom list
* [x] Random
* [x] Saturation
* [x] Lightness
* [x] Blacklist
* [x] Background padding rules
* [ ] Survive edit mode

## Installing

* Install from KDE Store or use `Get new widgets..`
* ~~Plasma 5 version~~ maybe?
* ~~[Plasma 6 version](#)~~ soon

### Manual install

1. Install these dependencies (please let me know if I missed or added something unnecessary)

```txt
cmake extra-cmake-modules libplasma
```

2. Run `./install.sh`

## Acknowledgement

* [Google LLC. / Pictogrammers](https://pictogrammers.com/library/mdi/) for the panel icons
16 changes: 16 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

# Remove the build directory if it exists
if [ -d "build" ]; then
rm -rf build
fi


# install plasmoid only
cmake -B build -S . -DBUILD_PLUGIN=OFF -DCMAKE_INSTALL_PREFIX=~/.local

# Build the project
cmake --build build

# Install the built project
cmake --install build
12 changes: 12 additions & 0 deletions package-plasmoid.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

# Remove the build directory if it exists
if [ -d "build" ]; then
rm -rf build
fi

# skip building/installing
cmake -B build -S . -DINSTALL_PLASMOID=OFF -DPACKAGE_PLASMOID=ON

# package plasmoid
cmake --build build
10 changes: 10 additions & 0 deletions package/contents/config/config.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import QtQuick 2.0
import org.kde.plasma.configuration 2.0

ConfigModel {
ConfigCategory {
name: i18n("General")
icon: "preferences-desktop"
source: "configGeneral.qml"
}
}
92 changes: 92 additions & 0 deletions package/contents/config/main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<kcfg
xmlns="http://www.kde.org/standards/kcfg/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/standards/kcfg/1.0/kcfg.xsd">
<kcfgfile name="" />

<group name="General">
<entry
name="enabled"
type="Bool">
<default>true</default>
</entry>

<!-- modes: static, animated-->
<entry
name="mode"
type="Int">
<default>0</default>
</entry>

<!-- color modes: single, accent, custom list, random -->
<entry
name="colorMode"
type="Int">
<default>3</default>
</entry>

<entry
name="singleColor"
type="String">
<default>#7182ff</default>
</entry>

<entry
name="customColors"
type="String">
<default>#ED8796 #A6DA95 #EED49F #8AADF4 #F5BDE6 #8BD5CA #f5a97f</default>
</entry>

<entry
name="opacity"
type="Double">
<default>0.2</default>
</entry>
<entry
name="radius"
type="Int">
<default>5</default>
</entry>
<entry
name="rainbowSaturation"
type="Double">
<default>1.0</default>
</entry>
<entry
name="rainbowLightness"
type="Double">
<default>0.65</default>
</entry>
<entry
name="rainbowInterval"
type="Int">
<default>3000</default>
</entry>
<entry
name="rainbowTransition"
type="Int">
<default>800</default>
</entry>

<entry
name="blacklist"
type="String">
<default>spacer
separator
org.kde.plasma.taskmanager
org.kde.plasma.icontasks
</default>
</entry>

<entry
name="paddingRules"
type="String">
<default>org.kde.plasma.appmenu -8 0</default>
</entry>




</group>
</kcfg>
73 changes: 73 additions & 0 deletions package/contents/icons/error.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions package/contents/icons/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d2b1524

Please sign in to comment.