lemonbar
Version, currently master branch1 version
- master branchlatestNov 28, 2018
github.com/bew/lemonade
Lemonbar framework
Installation
# Add this to your shard.yml
dependencies:
lemonbar:
github: bew/lemonade
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.23.1- License
- MIT
- Author
- Benoit de Chezelles
- Target
lemonbarfrom src/lemonbar.cr
Dependencies
This version declares no dependencies.
README
Lemonade
Lemonbar configuration framework
Usage
See the samples, they're ordered as a tutorial (not commented yet).
If you have crystal installed in your environment, you can run each sample directly, e.g:
$ ./samples/01_hello_world.cr
This will first compile the sample program, then run it.
TODO next
Now:
- Specs
- containers
- caching
- rendering
- formatting
- ...
- Block hierarchy dump
- Make my totolist in GH issues?
After:
- clickable areas
- event-based update
Later (optimization):
- rendering trace
Simple samples:
- Make a counter, with buttons + & -, to increment/decrement the counter, and randomly change the BG color (visual feedback).
- Progressbar, with a near-progressbar rendering (using unicode blocks?), and wheel-up/down to change the value (and trigger event (every steps?))
Note: Lemonbar refresh rates:
Refreshs are instant with lemonbar :100: : 100_000 simple (like hello world) refreshs in 5.3 seconds (~19_000 Refresh per second (don't know about the actual FPS))
Ideas about the framework
A lemonade config can have 1 or more lemon (a lemonbar instance).
The lemonade binary
The lemonade binary is the lemonade compiler (uses crystal compiler under-the-hood), with helpers to create a config dir, compile a lemonade, and run it, e.g:
- Initialize a config directory in the CWD
$ mkdir ~/.lemonade && cd ~/.lemonade
$ lemonade init
- Build (every time) then run a specific lemonade
$ lemonade run <source.cr> [args...]
or without `run`:
$ lemonade <source.cr> [args...]
- Build a specific lemonade (group of bars)
$ lemonade build <source.cr> -o my_lemonade
- Run it as a binary?
$ ./my_lemonade [args...]
Notes about possibilities
(note: a lemon is a lemonbar instance, and a lemonade is a group of lemons :smiley:)
A lemonade config can dynamically create lemons, position them, and change them based on events coming from other lemons (in the same lemonade).
Example lemonade:
+-------------------------------------------------------+
| +----+ +--+ +------+ +----------+ |
| | L1 | |L2| | L3 | | L4 | |
| +----+ +--+ +------+ +----------+ |
| |
| |
| |
| |
| +----------------------+ |
| | L5 id:bottom | |
| +----------------------+ |
+-------------------------------------------------------+
L1-5 are lemons. Each lemon can be given a unique ID (e.g: L5 has ID bottom).
Events and actions can be configured accross multiple lemons of the same lemonade, e.g: A click on a specific block of L1 can trigger an event on a specific block of L5, and change what is displayed.
Contributing
- Fork it ( https://github.com/bew/lemonade/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- bew Benoit de Chezelles - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Nov 28, 2018
- Crystal
0.23.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/bew/lemonade
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 17, 2026
- Synced
- Aug 17, 2026
- Versions
- 1