Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svenwltr/i3blocks-mqtt
Tools for adding MQTT support to i3blocks
https://github.com/svenwltr/i3blocks-mqtt
i3 i3bar i3wm mqtt sway swaybar swaywm
Last synced: 25 days ago
JSON representation
Tools for adding MQTT support to i3blocks
- Host: GitHub
- URL: https://github.com/svenwltr/i3blocks-mqtt
- Owner: svenwltr
- License: mit
- Created: 2023-08-25T12:18:28.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-12T08:37:33.000Z (about 1 year ago)
- Last Synced: 2023-09-12T16:36:37.285Z (about 1 year ago)
- Topics: i3, i3bar, i3wm, mqtt, sway, swaybar, swaywm
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# i3blocks-mqtt
Command for templating message for MQTT to use in [i3blocks](https://github.com/vivien/i3blocks).
> **Development Status:** Currently, I am only using this myself.
> This project is open source, but not open for contribution, since helping contributors to ship a PR usually takes more time than doing it myself. Please drop an issue, if you want something changed. Also of course it is possible to fork the whole project.
## Example
```
[temperature-inside]
label=In:
interval=persist
format=json
command=i3block-mqtt subscribe
BLOCKS_BROKER=mqtt://localhost:1883
BLOCKS_TOPIC=wadra/dashboard/temperature/wohnzimmer
BLOCKS_JSON=true
BLOCKS_TEMPLATE_FULL={{. | printf "%.1f"}}°C
BLOCKS_TEMPLATE_COLOR={{if gt . 24.}}#cc0000{{end}}{{if lt . .20}}#73d216{{end}}
```Prints lines like this to stdout:
```
{"full_text":"27.6°C","color":"#cc0000"}
```Which show `In:27.6°C` in a red color in the i3 bar.