https://github.com/gbaptista/magic-status
A KDE Plasma Widget to display custom status messages on Panels.
https://github.com/gbaptista/magic-status
kde kde-desktop kde-plasma kde-plasma-5 kde-plasma-desktop plasma-applet plasma-desktop plasma5
Last synced: 2 months ago
JSON representation
A KDE Plasma Widget to display custom status messages on Panels.
- Host: GitHub
- URL: https://github.com/gbaptista/magic-status
- Owner: gbaptista
- License: mit
- Created: 2022-04-24T13:31:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-24T22:13:41.000Z (about 3 years ago)
- Last Synced: 2025-02-14T13:50:30.725Z (4 months ago)
- Topics: kde, kde-desktop, kde-plasma, kde-plasma-5, kde-plasma-desktop, plasma-applet, plasma-desktop, plasma5
- Language: QML
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Magic Status
A [KDE Plasma](https://kde.org/plasma-desktop/) [Widget](https://store.kde.org/browse/) to display custom status messages on [Panels](https://userbase.kde.org/Plasma/Panels).
![]()
- [Installing](#installing)
- [Configuring](#configuring)
- [Customizing](#customizing)
- [Development](#development)## Installing
```bash
git clone https://github.com/gbaptista/magic-status.git \
/usr/share/plasma/plasmoids/com.github.gbaptista.magic-status
```Right-click on a panel, _"Add Widgets..."_ and search for _"Magic Status"_.
I don't remember, but you may need to restart _Plasma Shell_ by rebooting the computer, logoff/login, or the following command:
```bash
plasmashell --replace
```## Configuring
The core idea of _Magic Status_ is to be easily connectable to a data source. So, you just need to provide an endpoint that responds to a `GET` request rendering the following expected JSON:
```json
{
"messages": [
"11:40:20",
"11:40"
]
}
```In the above example, the widget will display the current time. We are providing two possible messages, and to switch between them, you can click on the currently displayed message.
You can configure it by right-clicking and _"Configure Magic Status..."_:
![]()
As you can display any message that you want, anything is possible. I have two endpoints on [my local API](https://github.com/gbaptista/magic-status-api), [http://localhost:5000/time](https://github.com/gbaptista/magic-status-api#time) and [http://localhost:5000/music](https://github.com/gbaptista/magic-status-api#music).
The `/music` displays the current song playing:
```json
{
"messages": [
"Rival Sons - Do Your Worst"
]
}
```
So, with two instances of the widget in my panel, I have the following result:
![]()
For a concrete example, check [my personal local API](https://github.com/gbaptista/magic-status-api). I chose [Ruby](https://www.ruby-lang.org/en/), but you can build your own API with any language you want.
### Customizing
You can customize your messages by providing more information. To change the text color and add a progress bar:
```json
{
"messages": [
{
"label": {
"text": "Carol Biazin - Inveja (Ao Vivo)",
"color": "#34d8eb"
},
"progress": {
"value": 0.63
}
}
]
}
```
![]()
## Development
```bash
git clone https://github.com/gbaptista/magic-status.git \
/usr/share/plasma/plasmoids/com.github.gbaptista.magic-statuscd /usr/share/plasma/plasmoids/com.github.gbaptista.magic-status
plasmoidviewer -a .
plasmashell --replace
```