Feed your Lemonbar with succade! It repeatedly runs blocks, piping their output to Lemonbar. Every block is a script or program that provides text to be displayed on your bar. Configuration is done with a simple ini file.
The config needs to have one section for lemonbar (
bar) and one per block, plus an optional section for common styles (
default) that will apply to all blocks. The bar's section lists the blocks that should be displayed on the bar (and where), and can set some lemonbar properties like its size and position. Block sections define the styling of individual blocks, as well as how often the blocks should be reloaded. Alternatively, trigger commands can be defined. Once a trigger produces output, the associated block will be run (optionally with the trigger's output as command line argument).
35 %and define the label
Vol.in the config.
libinih-devin Debian, but also included in this repo, see below)
succade uses libkita to manage child processes. libkita uses
epoll, which is Linux only. I've attempted to port libkita to BSD using
kqueue, but couldn't get it to work reliably (yet).
Make sure you have
gcc (for compiling the source code) and all dependencies, as listed above, installed. If
inih is not available in your distribution, just replace
./build-inih below and you should be good to go.
git clone https://github.com/domsson/succade.git
chmod +x ./build
.configas your config dir):
cp ./cfg/example1.ini ~/.config/succade/succaderc
succadeexecutable and put it somewhere that's included in your path:
chmod +x ./bin/succade
cp ./bin/succade ~/.local/bin/
Take a look at the example configurations in this repository and refer to the following documentation.
Possible property values, based on their types as listed in the tables below, are:
string: Text within quotes, for example
number: A number, for example
color: RGB hex string, for example
The config options
scroll-down expect a script or binary to execute. For performance reasons, succade does not invoke a shell to run the commands. This means that shell built-in functionality, like
echo, pipes or redirection, will not work (as expected). If you want to use those, wrap those commands in a simple shell script and give succade the path to that script in these config options. You also don't need (and should not) background commands via
&, succade will take care of that for you already.
You can, however, use variable substituion,
~, as succade internally uses wordexp. Also see the following paragraph from the wordexp man page:
The expansion done consists of the following stages: tilde expansion (replacing ~user by user's home directory), variable substitution (replacing $FOO by the value of the environment variable FOO), command substitution (replacing $(command) or
commandby the output of command), arithmetic expansion, field splitting, wildcard expansion, quote removal.
The special section
bar configures Lemonbar itself and can define common formatting for all blocks. It is required for succade to run, but the only mandatory property is
||string||The command to start the bar; defaults to
||string||Specifies the blocks to display on the bar. Example:
||number||Width of the bar in pixel - omit this value for a full-width bar.|
||number||Height of the bar in pixel - omit to get the minimum required height.|
||number||x-position of the bar - omit to have it sit at the edge of your screen.|
||number||y-position of the bar - omit to have it sit at the edge of your screen.|
||boolean||Dock the bar at the bottom instead of the top of the screen.|
||color||Default foreground (font) color for all blocks.|
||color||Default background color for the entire bar.|
||string||Font to use for all blocks.|
||string||Font to use for all block's labels, if any.|
||string||Font to use for all block's prefixes / suffixes, if any.|
||color||Color for all underlines / overlines, if any.|
||number||Thickness of all underlines / overlines, if any, in pixels.|
||string||String to place in between any two blocks of the same alignment.|
Every block that has been named in
blocks needs its own config section. Most of these values can also be specified in the special
default section, which will apply to all blocks.
||string||The command to run the block; defaults to the section name.|
||number||Run the block every
||string||Run the block whenever the command given here prints something to
||boolean||Use the trigger's output as command line argument when running the block.|
||boolean||The block is supposed to keep running; succade will monitor it for new output on
||string||Shown before the block's main text and label.|
||string||Shown after the block's main text and unit, if any.|
||string||Shown before the block's main text; useful to display icons when using fonts like Siji.|
||number||Minimum width of the block's main text, which will be left-padded with spaces if neccessary.|
||color||Font color for the whole block (including label and affixes).|
||color||Background color for the whole block (including label and affixes).|
||color||Font color for the block's label, if any.|
||color||Background color for the block's label, if any.|
||color||Font color for the block's prefix and suffix, if any.|
||color||Background color for the block's prefix and suffix, if any.|
||color||Overline / underline color for the block.|
||boolean||Whether or not to draw an overline for the block.|
||boolean||Whether or not to draw an underline for the block.|
||number||Distance to the next block (or edge of bar) on the left and right, in pixels.|
||number||Distance to the next block (or edge of bar) on the left, in pixels.|
||number||Distance to the next block (or edge of bar) on the right, in pixels.|
||number||Number of spaces that will be added around a block's output on the left and right.|
||number||Number of spaces that will be added on the left side of a block's output.|
||number||Number of spaces that will be added on the right side of a block's output.|
||string||Command to run when you left-click the block.|
||string||Command to run when you middle-click the block.|
||string||Command to run when you right-click the block.|
||string||Command to run when you scroll your mouse wheel up while hovering over the block.|
||string||Command to run when you scroll your mouse whell down while hovering over the block.|
c CONFIG: config file to use
e: run bar even if it is empty (no blocks defined or loaded)
h: print help text and exit
s SECTION: config section name for the bar (default is "bar")
V: print version information and exit
Looking for scripts, programs or code that can fetch information to display on your bar? Check out fetch-all-the-things.
succade is public domain software, do with it whatever you want. However, succade uses
inih, which is under the New BSD license.
With projects like polybar, the question for the relevance of succade is justified. Personally, I prefer succade - and similar solutions, like Captain - because they enforce the separation of concerns as described by the UNIX philosophy.
For example, imagine someone created a fork of Lemonbar that works with Wayland. As long as they would keep the same interface (same format specifiers supported as with Lemonbar), you can immediately switch to that new bar, without changing anything else. You can still use the same blocks, because they are not tied to the bar or succade.
Additionally, I like minimalistic setups. I don't want most of the additional features of other bars, like true type fonts or rounded borders. Hence, I might as well save a bit of RAM by going with more minimalistic solutions.
Fun fact: polybar started out as a lemonbar wrapper just like succade, but eventually the project maintainers decided to include lemonbar's functionality right into the project. Therefore, in a way, succade is what polybar used to be.