Lemonade
A status line helper for lemonbar.
Usage
- Create the lemonade config file
$HOME/.config/lemonade/config.yml
. See config.example.yml
to get you started.
- Launch lemonade and pipe its output to lemonbar
lemonade | lemonbar
Config file
Example
---
output: "@bspwm_monitor0%{S1}@bspwm_monitor1%{r}@clock"
lemons:
bspwm_monitor0:
timeout: 0
signal: 1
cmd: "lemon-scripts/bspwm.sh HDMI-0"
on_start:
- "lemon-scripts/bspwm-helper.sh"
bspwm_monitor1:
timeout: 0
signal: 1
cmd: "lemon-scripts/bspwm.sh DP-2"
clock:
timeout: 3s
cmd: "date \"+%H:%M\""
output
The output
entry defines the print format lemonade will use to print to stdout.
Lemons can be referenced by using their name prefixed with an @
e.g. @clock
will be replaced with the output of the clock
lemon.
Since lemonbar already provides formatting, colours, ... lemonade does not provide any special formatting rules other than substituting lemon outputs.
lemons
Each lemon defines a single output that can be used in the output format string. They come with the following properties:
timeout
The frequency/timeout duration with which the lemon's output will be updated. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as 300ms
, -1.5h
or 2h45m
. Valid time units are
ns
, us
(or µs
), ms
, s
, m
, h
.
If you need a lemon that's not constantly updated e.g. static output, volume display, ... set its timeout to 0
. Signals can still be used to trigger an update for these lemons.
cmd
The command that is run to get the lemon output. Whatever the command prints to stdout will be used as lemon output.
on_start
A list of extra helper commands that will be run when lemonade starts
on_stop
A list of extra helper commands that will be run just before lemonade stops. Any command that takes longer than 1 second will be killed.
signal
Each lemon can define a signal which it willl "trap". Whenever lemonade receives an RTMIN+<signal>
it will update all lemons that have this signal
set in the config file. Note that signal 0
(RTMIN
itself ) is ignored.