2016-06-29 02:44:55 +00:00
# Lemonbuddy
2016-05-19 14:41:06 +00:00
2016-06-11 10:37:14 +00:00
[![Build Status ](https://travis-ci.org/jaagr/lemonbuddy.svg?branch=master )](https://travis-ci.org/jaagr/lemonbuddy)
2016-06-14 01:15:33 +00:00
[![MIT License ](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000?style=plastic )](https://github.com/jaagr/lemonbuddy/blob/master/LICENSE)
2016-06-11 10:37:14 +00:00
2016-10-12 03:35:33 +00:00
A fast and easy-to-use tool for creating status bars.
2016-05-19 14:41:06 +00:00
2016-05-20 09:20:58 +00:00
**Lemonbuddy** aims to help users build beautiful and highly customizable status bars
2016-06-29 02:44:55 +00:00
for their desktop environment, without the need of having a black belt in shell scripting.
Heres a few screenshots showing you what it can look like:
[![sample screenshot ](http://i.imgur.com/xvlw9iHt.png )](http://i.imgur.com/xvlw9iH.png)
[![sample screenshot ](http://i.imgur.com/cYQOuRrt.png )](http://i.imgur.com/cYQOuRr.png)
[![sample screenshot ](http://i.imgur.com/A6spiZZt.png )](http://i.imgur.com/A6spiZZ.png)
[![sample screenshot ](http://i.imgur.com/TY5a5r9t.png )](http://i.imgur.com/TY5a5r9.png)
Please note that the project still is in early development, so please report any
problems by [creating an issue ticket ](https://github.com/jaagr/lemonbuddy/issues/new ).
## Table of Contents
* [Introduction ](#introduction )
* [Getting started ](#getting-started )
* [Dependencies ](#dependencies )
* [Building from source ](#building-from-source )
* [Running ](#running )
* [Launching the bar in your wm's bootstrap routine ](#launching-the-bar-in-your-wms-bootstrap-routine )
* [Configuration ](#configuration )
* [Fonts ](#fonts )
* [Syntax and DSL ](#syntax-and-dsl )
* [Application settings ](#application-settings )
* [Bar settings ](#bar-settings )
* [Modules ](#modules )
* [internal/backlight ](#module-internalbacklight )
* [internal/battery ](#module-internalbattery )
* [internal/bspwm ](#module-internalbspwm )
* [internal/cpu ](#module-internalcpu )
* [internal/date ](#module-internaldate )
* [internal/i3 ](#module-internali3 )
* [internal/memory ](#module-internalmemory )
* [internal/mpd ](#module-internalmpd )
* [internal/network ](#module-internalnetwork )
* [internal/volume ](#module-internalvolume )
* [custom/menu ](#module-custommenu )
* [custom/script ](#module-customscript )
* [custom/text ](#module-customtext )
* [Example configurations ](#example-configurations )
* [License ](#license )
## Introduction
2016-10-12 03:35:33 +00:00
The main purpose of **Lemonbuddy** is to help users create awesome status bars.
2016-10-12 09:23:11 +00:00
It has built-in functionality to generate content for the most commonly used widgets, such as:
2016-06-29 02:44:55 +00:00
- Playback controls and status display for [MPD ](https://www.musicpd.org/ ) using [libmpdclient ](https://www.musicpd.org/libs/libmpdclient/ )
- [ALSA ](http://www.alsa-project.org/main/index.php/Main_Page ) volume controls
- Workspace and desktop panel for [bspwm ](https://github.com/baskerville/bspwm ) and [i3 ](https://github.com/i3/i3 )
- CPU and memory load indicator
- Battery display
- Network connection details
- Backlight level
- Date and time label
- Time-based shell script execution
- Command output tailing
- User-defined menu tree
- And more...
Each bar contains a set of modules, which in turn defines a set of formatting rules and options.
Read more about [how the configuration works ](#configuration ).
## Getting started
If you are using **Arch Linux** , you can install the AUR package [lemonbuddy-git ](https://aur.archlinux.org/packages/lemonbuddy-git/ ) to get the latest version, or
2016-05-31 02:52:08 +00:00
[lemonbuddy ](https://aur.archlinux.org/packages/lemonbuddy/ ) for the latest stable release.
2016-05-20 09:20:58 +00:00
2016-09-13 00:12:33 +00:00
For **Void Linux** users, the application can be installed using XBPS: `xbps-install -S lemonbuddy` .
2016-06-23 23:14:43 +00:00
2016-06-29 02:44:55 +00:00
If you create a package for any other distribution, please consider contributing the template so that we can make the application
available for more people.
2016-06-23 23:14:43 +00:00
2016-06-29 02:44:55 +00:00
### Dependencies
2016-05-19 21:46:50 +00:00
2016-06-15 03:32:35 +00:00
A compiler with c++14 support. For example [`clang` ](http://clang.llvm.org/get_started.html ).
2016-05-20 02:35:09 +00:00
2016-05-24 00:55:25 +00:00
- cmake
2016-05-23 18:27:10 +00:00
- boost
2016-10-12 05:42:22 +00:00
- xcb-util-wm
2016-10-12 08:50:14 +00:00
- libXft
2016-10-12 17:12:26 +00:00
- python2
2016-06-23 23:14:43 +00:00
2016-06-29 02:44:55 +00:00
Optional dependencies for module support:
2016-06-23 23:14:43 +00:00
2016-06-29 02:44:55 +00:00
- wireless_tools (required for `internal/network` support)
- alsa-lib (required for `internal/volume` support)
- libmpdclient (required for `internal/mpd` support)
2016-10-12 02:16:43 +00:00
- jsoncpp (required for `internal/i3` support)
2016-06-23 23:14:43 +00:00
2016-05-19 21:46:50 +00:00
~~~ sh
2016-10-12 17:12:26 +00:00
$ pacman -S cmake python2 boost xcb-util-wm libxft wireless_tools alsa-lib libmpdclient jsoncpp
2016-10-12 05:42:22 +00:00
$ xbps-install cmake boost-devel libxcb-util-dev alsa-lib-devel i3-devel libmpdclient-devel jsoncpp-devel wireless_tools-devel
2016-10-14 08:17:18 +00:00
$ apt-get install cmake cmake-data libboost-dev libfreetype6-dev libxcb1-dev libxcb-util0-dev libxcb-randr0-dev libxcb-ewmh-dev libxcb-icccm4-dev xcb-proto python-xcbgen i3-wm libiw-dev libasound2-dev libmpdclient-dev
2016-05-19 21:46:50 +00:00
~~~
2016-06-29 02:44:55 +00:00
### Building from source
2016-05-24 02:06:29 +00:00
2016-06-29 02:44:55 +00:00
Please [report any problems ](https://github.com/jaagr/lemonbuddy/issues/new ) you run into when building the project. It helps alot.
~~~ sh
2016-10-12 14:58:43 +00:00
$ git clone --branch 2.0.0-beta --recursive https://github.com/jaagr/lemonbuddy
2016-06-29 02:44:55 +00:00
$ mkdir lemonbuddy/build
$ cd lemonbuddy/build
2016-10-12 03:19:29 +00:00
$ cmake -DCMAKE_BUILD_TYPE=Release ..
2016-06-29 02:44:55 +00:00
$ sudo make install
~~~
2016-05-24 02:06:29 +00:00
2016-05-24 21:30:05 +00:00
## Running
2016-05-19 21:46:50 +00:00
2016-05-24 21:30:05 +00:00
Before customizing the bar, make sure everything works as expected by trying
out one of the example configurations installed with the application.
The following code will get you started:
2016-05-19 21:46:50 +00:00
2016-05-24 21:30:05 +00:00
~~~ sh
# Create the config root directory
$ mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/lemonbuddy
$ cd ${XDG_CONFIG_HOME:-$HOME/.config}/lemonbuddy
# Copy sample config for the running wm (uses a wm agnostic config as fallback)
2016-05-25 13:38:31 +00:00
$ __wm=$(pgrep -l -x "(bspwm|i3)"); __prefix=$(which lemonbuddy)
2016-05-24 21:52:36 +00:00
$ cp "${__prefix%%/bin*}/share/examples/lemonbuddy/config${__wm:+.${__wm##* }}" config
2016-05-24 21:30:05 +00:00
# Launch the bar
# (where "example" is the name of the bar as defined by [bar/NAME] in the config)
2016-10-12 03:19:29 +00:00
$ lemonbuddy example
2016-05-24 21:30:05 +00:00
~~~
2016-10-12 03:19:29 +00:00
> **NOTE:** In case the bar output looks odd, it's probably because you're
> missing he fonts defined in the config. Update the config or install the
> missing fonts.
2016-05-24 21:30:05 +00:00
## Launching the bar in your wm's bootstrap routine
2016-06-20 15:05:23 +00:00
Create an executable file containing the startup logic, for example `$HOME/.config/lemonbuddy/launch.sh` :
2016-05-24 21:30:05 +00:00
~~~ sh
2016-06-20 15:05:23 +00:00
#!/usr/bin/env sh
2016-05-24 21:30:05 +00:00
# Terminate already running bar instances
2016-10-12 03:19:29 +00:00
killall -q lemonbuddy
2016-05-24 21:30:05 +00:00
# Launch bar1 and bar2
2016-10-12 03:19:29 +00:00
lemonbuddy bar1 &
lemonbuddy bar2 &
2016-05-24 21:30:05 +00:00
echo "Bars launched..."
~~~
2016-06-29 02:44:55 +00:00
Make it executable:
~~~ sh
$ chmod +x $HOME/.config/lemonbuddy/launch.sh
~~~
2016-06-20 15:05:23 +00:00
2016-06-29 02:44:55 +00:00
If you are using **bspwm** , add the following line to `bspwmrc` :
2016-06-20 15:05:23 +00:00
~~~ sh
$HOME/.config/lemonbuddy/launch.sh
~~~
If you are using **i3** , add the following line to your configuration:
~~~ sh
2016-10-12 03:19:29 +00:00
exec_always --no-startup-id $HOME/.config/lemonbuddy/launch.sh
2016-06-20 15:05:23 +00:00
~~~
2016-05-24 21:30:05 +00:00
## Configuration
2016-06-29 02:44:55 +00:00
The configuration syntax is a work in progress. Please [create an issue ticket ](https://github.com/jaagr/lemonbuddy/issues/new )
and let me know how you think we can improve it.
The values used in the examples below are to be considered placeholder values, and
the resulting output might not be award-winning.
2016-05-24 21:30:05 +00:00
2016-06-29 02:44:55 +00:00
### Fonts
When working with unicode symbols, remember that fonts render the symbols differently. Changing font
2016-10-12 03:19:29 +00:00
can drastically improve the quality of your bar. [Unifont ](http://unifoundry.com/unifont.html ) has great unicode coverage, which makes
it really useful.
2016-05-24 21:30:05 +00:00
2016-10-12 03:19:29 +00:00
Also try different icon fonts, such as [Font Awesome ](http://fontawesome.io/icons ), [Material Icons ](https://design.google.com/icons ) and my personal favorite: [Siji ](https://github.com/stark/siji ).
2016-05-24 21:30:05 +00:00
2016-06-29 02:44:55 +00:00
*TODO: Describe usage in configuration...*
2016-05-24 21:30:05 +00:00
2016-05-26 00:14:56 +00:00
### Syntax and DSL
2016-06-29 02:44:55 +00:00
*TODO: Clarify...*
2016-05-26 00:14:56 +00:00
The configuration syntax is based on the `ini` file format.
~~~ ini
[section/name]
str = My string
; Hint: Quote the value to keep the spaces
str = " My string"
bool = true
bool = on
int = 10
float = 10.0
; Values for a defined bar can be referenced using:
key = ${bar/top.foreground}
; Values for the current bar can be referenced using:
key = ${BAR.foreground}
; Other values can be referenced using:
key = ${section.key}
2016-07-27 00:53:47 +00:00
; Environment variables can be referenced using:
key = ${env:VAR_NAME}
2016-06-29 02:44:55 +00:00
~~~
~~~ ini
[section/name]
; Most modules define a format-N field
; For example, the mpd module defines the following formats:
; format-online = ...
; format-offline = ...
2016-05-26 00:14:56 +00:00
;
2016-06-29 02:44:55 +00:00
; Each format exposes the following fields:
; format[-NAME]-padding = N (unit: whitespaces)
; format[-NAME]-margin = N (unit: whitespaces)
; (See "Bar settings" for more details on "spacing")
; format[-NAME]-spacing = N (unit: whitespaces)
; (This value will displace the format block horizontally by +/-N pixels)
; format[-NAME]-offset = N (unit: pixels)
; format[-NAME]-foreground = #aa [rrggbb]
; format[-NAME]-background = #aa [rrggbb]
; format[-NAME]-underline = #aa [rrggbb]
; ^
; | the underline and overline color is always the same
; v
; format[-NAME]-overline = #aa [rrggbb]
2016-05-26 00:14:56 +00:00
;
2016-06-29 02:44:55 +00:00
; The rest of the drawtypes follow the same pattern.
;
2016-08-31 15:39:51 +00:00
; label-NAME[-(foreground|background|(under|over)line|font|padding|maxlen|ellipsis)] = ?
2016-06-29 02:44:55 +00:00
; icon-NAME[-(foreground|background|(under|over)line|font|padding)] = ?
; ramp-NAME-[0-9]+[-(foreground|background|(under|over)line|font|padding)] = ?
; animation-NAME-[0-9]+[-(foreground|background|(under|over)line|font|padding)] = ?
;
; bar-NAME-width = N (unit: characters)
; bar-NAME-format = (tokens: %fill% %indicator% %empty%)
; bar-NAME-foreground-[0-9]+ = #aarrggbb
; bar-NAME-indicator[-(foreground|background|(under|over)line|font|padding)] =
; bar-NAME-fill[-(foreground|background|(under|over)line|font|padding)] =
; bar-NAME-empty[-(foreground|background|(under|over)line|font|padding)] =
;
; Example:
;
format-online = < icon-stop > < toggle > < icon-repeat > < icon-random > < bar-progress > < label-song >
2016-05-26 00:14:56 +00:00
2016-06-29 02:44:55 +00:00
format-offline = < label-offline >
format-offline-offset = -8
2016-08-31 15:39:51 +00:00
; Cap the song label without trailing ellipsis
label-song-maxlen = 30
label-song-ellipsis = false
2016-06-29 02:44:55 +00:00
; By only specifying alpha value, it will be applied to the bar's default foreground
label-time-foreground = #66
label-offline = mpd is off
label-offline-foreground = #66
icon-play =
icon-pause =
icon-stop =
bar-progress-width = 30
bar-progress-indicator = |
bar-progress-fill = █
bar-progress-empty = █
bar-progress-empty-foreground = #44
~~~
2016-05-24 21:30:05 +00:00
2016-05-31 23:07:23 +00:00
### Application settings
~~~ ini
[settings]
2016-10-12 03:19:29 +00:00
; Limit the amount of update events within a set timeframe:
2016-10-12 03:35:33 +00:00
; - "Allow < throttle-limit > updates within < throttle-ms > of time"
2016-05-31 23:07:23 +00:00
; Default values:
2016-10-12 03:35:33 +00:00
throttle-limit = 3
throttle-ms = 60
2016-05-31 23:07:23 +00:00
~~~
2016-06-09 12:22:21 +00:00
### Bar settings
~~~ ini
[bar/example]
; Use the following command to list available outputs:
2016-10-12 03:19:29 +00:00
; If unspecified, the application will pick the first one it finds.
2016-06-09 12:22:21 +00:00
; $ xrandr -q | grep " connected" | cut -d ' ' -f1
monitor = HDMI1
; Omit the % to specify the width in pixels
width = 100%
height = 30
2016-06-09 22:53:02 +00:00
; Offset value defined in pixels
2016-10-12 03:19:29 +00:00
offset-x = 0
offset-y = 0
2016-06-09 22:53:02 +00:00
2016-06-09 12:22:21 +00:00
; Put the bar at the bottom of the screen
bottom = true
; Weather to force docking mode or not
2016-10-12 03:19:29 +00:00
; If you are using i3wm it's recommended to use the default value
; Default: false
dock = true
2016-06-09 12:22:21 +00:00
; This value is used as a multiplier when adding spaces between elements
spacing = 3
; Height of under-/overline
lineheight = 14
; Colors
2016-10-12 03:19:29 +00:00
background = #ee222222
2016-06-09 12:22:21 +00:00
foreground = #eefafafa
linecolor = ${bar/example.background}
2016-06-15 03:32:35 +00:00
; Borders
; Size to be used for all borders
border-size = 2
; Color to be used for all borders
border-color = #ff9900
; Per-border values
;border-top = 1
;border-top-color = #ff9900
;border-bottom = 2
;border-bottom-color = #5d00ff
;border-left = 3
;border-right-color = #ff0059
2016-10-12 03:19:29 +00:00
; Number of spaces to add at the beginning/end of the bar
padding-left = 5
padding-right = 2
2016-06-09 12:22:21 +00:00
; Amount of spaces to add before/after each module
2016-10-12 03:19:29 +00:00
module-margin-left = 3
module-margin-right = 3
2016-06-09 12:22:21 +00:00
; Fonts are defined using: < FontName > ;< Offset >
2016-05-26 00:14:56 +00:00
font-0 = NotoSans-Regular:size=8;0
font-1 = MaterialIcons:size=10;0
font-2 = Termsynu:size=8;-1
font-3 = FontAwesome:size=10;0
2016-06-09 12:22:21 +00:00
; The separator will be inserted between the output of each module
2016-06-29 02:44:55 +00:00
separator = |
2016-06-09 12:22:21 +00:00
; Value to be used to set the WM_NAME atom
2016-05-26 00:14:56 +00:00
; This defaults to "lemonbuddy-[BAR]_[MONITOR]"
2016-10-12 03:19:29 +00:00
wm-name = mybar
2016-06-09 12:22:21 +00:00
; Locale used to localize module output (for example date)
;locale = sv_SE.UTF-8
; Define what modules to output
2016-05-26 00:14:56 +00:00
modules-left = cpu ram
modules-center = label
modules-right = clock
2016-06-15 03:32:35 +00:00
; Position of the tray container
; If undefined, tray support will be disabled
;
; Available positions:
; left
; right
tray-position = right
2016-10-11 16:53:51 +00:00
; Restack the bar window and put it above the
; selected window manager's root
;
; Fixes the issue where the bar is being drawn
; on top of fullscreen window's
;
; Currently supported WM's:
; bspwm
2016-10-11 21:36:11 +00:00
; i3
2016-10-11 16:53:51 +00:00
; Default: none
wm-restack = bspwm
2016-06-09 12:22:21 +00:00
~~~
2016-06-29 02:44:55 +00:00
### Modules
2016-06-09 12:22:21 +00:00
2016-06-29 02:44:55 +00:00
#### Module `internal/backlight`
2016-05-24 21:30:05 +00:00
~~~ ini
[module/backlight]
type = internal/backlight
; Use the following command to list available cards:
; $ ls -1 /sys/class/backlight/
card = intel_backlight
~~~
##### Extra formatting (example)
~~~ ini
; Available tags:
; < label > (default)
; < ramp >
; < bar >
format = < ramp > < bar >
; Available tokens:
; %percentage% (default)
label = %percentage%
2016-05-26 00:14:56 +00:00
ramp-0 = 🌕
ramp-1 = 🌔
ramp-2 = 🌓
ramp-3 = 🌒
ramp-4 = 🌑
2016-05-24 21:30:05 +00:00
2016-05-26 00:14:56 +00:00
bar-width = 10
bar-indicator = |
bar-fill = ─
bar-empty = ─
2016-05-24 21:30:05 +00:00
~~~
2016-06-29 02:44:55 +00:00
#### Module `internal/battery`
2016-05-24 21:30:05 +00:00
~~~ ini
[module/battery]
type = internal/battery
; This is useful in case the battery never reports 100% charge
2016-10-12 03:19:29 +00:00
full-at = 99
2016-05-24 21:30:05 +00:00
; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
2016-06-29 02:44:55 +00:00
battery = BAT0
adapter = ADP1
2016-05-31 00:52:18 +00:00
2016-05-31 01:02:08 +00:00
; Seconds between reading battery capacity.
; If set to 0, polling will be disabled.
2016-10-12 03:19:29 +00:00
;poll-interval = 3
2016-05-24 21:30:05 +00:00
~~~
##### Extra formatting (example)
~~~ ini
; Available tags:
2016-05-26 00:14:56 +00:00
; < label-charging > (default)
; < bar-capaity >
; < ramp-capacity >
; < animation-charging >
format-charging = < animation-charging > < label-charging >
2016-05-24 21:30:05 +00:00
; Available tags:
2016-05-26 00:14:56 +00:00
; < label-discharging > (default)
; < bar-capaity >
; < ramp-capacity >
format-discharging = < ramp-capacity > < label-discharging >
2016-05-24 21:30:05 +00:00
; Available tags:
2016-05-26 00:14:56 +00:00
; < label-full > (default)
; < bar-capaity >
; < ramp-capacity >
;format-full = < ramp-capacity > < label-full >
2016-05-24 21:30:05 +00:00
; Available tokens:
; %percentage% (default)
2016-05-26 00:14:56 +00:00
label-charging = Charging %percentage%
2016-05-24 21:30:05 +00:00
; Available tokens:
; %percentage% (default)
2016-05-26 00:14:56 +00:00
label-discharging = Discharging %percentage%
2016-05-24 21:30:05 +00:00
; Available tokens:
; %percentage% (default)
2016-05-26 00:14:56 +00:00
label-full = Fully charged
2016-05-24 21:30:05 +00:00
2016-05-26 00:14:56 +00:00
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-3 =
ramp-capacity-4 =
2016-05-24 21:30:05 +00:00
2016-05-26 00:14:56 +00:00
bar-capacity-width = 10
2016-05-24 21:30:05 +00:00
2016-05-26 00:14:56 +00:00
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-3 =
animation-charging-4 =
2016-10-12 03:19:29 +00:00
; Framerate in milliseconds
animation-charging-framerate = 750
2016-05-24 21:30:05 +00:00
~~~
2016-06-29 02:44:55 +00:00
#### Module `internal/bspwm`
2016-06-30 14:11:54 +00:00
To specify a custom path to the bspwm socket, you can set the environment variable `$BSPWM_SOCKET` .
2016-05-24 21:30:05 +00:00
~~~ ini
[module/bspwm]
type = internal/bspwm
~~~
##### Extra formatting (example)
~~~ ini
2016-10-12 03:19:29 +00:00
; ws-icon-[0-9]+ = label;icon
ws-icon-0 = code;♚
ws-icon-1 = office;♛
ws-icon-2 = graphics;♜
ws-icon-3 = mail;♝
ws-icon-4 = web;♞
ws-icon-default = ♟
2016-05-24 21:30:05 +00:00
; Available tags:
2016-05-26 00:14:56 +00:00
; < label-state > (default) - gets replaced with < label- ( active | urgent | occupied | empty ) >
; < label-mode > - gets replaced with < label- ( monocle | tiled | fullscreen | floating | locked | sticky | private ) >
format = < label-state > < label-mode >
2016-05-24 21:30:05 +00:00
2016-05-26 00:14:56 +00:00
; If any values for label-dimmed-N area defined, the workspace/mode colors will get overridden
2016-05-24 21:30:05 +00:00
; with those values if the monitor is out of focus
2016-05-26 00:14:56 +00:00
label-dimmed-foreground = #555
label-dimmed-underline = ${BAR.background}
2016-05-24 21:30:05 +00:00
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
2016-05-26 00:14:56 +00:00
label-active = %icon%
label-active-foreground = #ffffff
label-active-background = #3f3f3f
label-active-underline = #fba922
2016-05-24 21:30:05 +00:00
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
2016-05-26 00:14:56 +00:00
label-occupied = %icon%
label-occupied-underline = #555555
2016-05-24 21:30:05 +00:00
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
2016-05-26 00:14:56 +00:00
label-urgent = %icon%
label-urgent-foreground = #000000
label-urgent-background = #bd2c40
label-urgent-underline = #9b0a20
2016-05-24 21:30:05 +00:00
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
2016-05-26 00:14:56 +00:00
label-empty = %icon%
label-empty-foreground = #55ffffff
2016-05-24 21:30:05 +00:00
; Available tokens:
; None
2016-05-26 00:14:56 +00:00
label-monocle =
;label-tiled =
2016-06-29 02:44:55 +00:00
label-fullscreen =
label-floating =
2016-05-26 00:14:56 +00:00
label-locked =
label-locked-foreground = #bd2c40
label-sticky =
label-sticky-foreground = #fba922
label-private =
label-private-foreground = #bd2c40
2016-05-24 21:30:05 +00:00
~~~
2016-06-29 02:44:55 +00:00
#### Module `internal/cpu`
2016-05-24 21:30:05 +00:00
~~~ ini
[module/cpu]
type = internal/cpu
; Seconds to sleep between updates
;interval = 0.5
~~~
##### Extra formatting (example)
~~~ ini
; Available tags:
; < label > (default)
2016-05-26 00:14:56 +00:00
; < bar-load >
; < ramp-load >
2016-10-12 03:19:29 +00:00
; < ramp-coreload >
format = < label > < ramp-coreload >
2016-05-24 21:30:05 +00:00
; Available tokens:
; %percentage% (default) - total cpu load
label = CPU %percentage%
2016-10-12 03:19:29 +00:00
ramp-coreload-0 = ▁
ramp-coreload-1 = ▂
ramp-coreload-2 = ▃
ramp-coreload-3 = ▄
ramp-coreload-4 = ▅
ramp-coreload-5 = ▆
ramp-coreload-6 = ▇
ramp-coreload-7 = █
2016-05-24 21:30:05 +00:00
~~~
2016-06-29 02:44:55 +00:00
#### Module `internal/date`
2016-05-24 21:30:05 +00:00
~~~ ini
[module/date]
type = internal/date
; Seconds to sleep between updates
;interval = 1.0
; see "man date" for details on how to format the date string
2016-10-12 03:35:33 +00:00
; NOTE: if you want to use syntax tags here you need to use %%{...}
2016-05-24 21:30:05 +00:00
date = %Y-%m-%d% %H:%M
2016-10-12 03:19:29 +00:00
; if `date-alt` is defined, clicking the area will toggle between formats
date-alt = %%{F#888}%A, %d %B %Y %%{F#fff}%H:%M%%{F#666}:%%{F#fba922}%S%%{F-}
2016-05-24 21:30:05 +00:00
~~~
##### Extra formatting (example)
~~~ ini
; Available tags:
; < date > (default)
format = 🕓 < date >
2016-05-26 00:14:56 +00:00
format-background = #55ff3399
format-foreground = #fff
2016-05-24 21:30:05 +00:00
~~~
2016-06-29 02:44:55 +00:00
#### Module `internal/i3`
2016-05-24 21:30:05 +00:00
Requires the project to be built with support for i3. For more information,
2016-06-29 02:44:55 +00:00
see [the dependency section ](#dependencies ).
2016-05-24 21:30:05 +00:00
The module is still marked as WIP since it needs more testing. If you notice any
2016-06-29 02:44:55 +00:00
anomalies, please [create an issue ](https://github.com/jaagr/lemonbuddy/issues/new ).
2016-05-24 21:30:05 +00:00
2016-06-29 02:44:55 +00:00
See [the bspwm module ](#module-internalbspwm ) for details on `label-dimmed` .
2016-05-24 21:30:05 +00:00
~~~ ini
[module/i3]
type = internal/i3
2016-10-12 01:57:22 +00:00
; Only show workspaces defined on the same output as the bar
;
; Useful if you want to show monitor specific workspaces
; in different bars
;
; Default: false
pin-workspaces = true
; Limit the amount of chars to output for each workspace name
; Default: 0
wsname-maxlen = 2
2016-10-12 02:14:06 +00:00
; Sort the workspaces by index instead of the default
; sorting that groups the workspaces by output
; Default: false
index-sort = true
2016-05-24 21:30:05 +00:00
~~~
##### Extra formatting (example)
~~~ ini
2016-10-12 03:35:33 +00:00
; ws-icon-[0-9]+ = label;icon
2016-10-12 03:19:29 +00:00
ws-icon-0 = 1;♚
ws-icon-1 = 2;♛
ws-icon-2 = 3;♜
ws-icon-3 = 4;♝
ws-icon-4 = 5;♞
ws-icon-default = ♟
2016-05-24 21:30:05 +00:00
; Available tags:
2016-05-26 00:14:56 +00:00
; < label-state > (default) - gets replaced with < label- ( focused | unfocused | visible | urgent ) >
;format = < label-state >
2016-05-24 21:30:05 +00:00
; Available tokens:
; %name%
; %icon%
; %index%
2016-10-12 01:57:22 +00:00
; %output%
2016-05-24 21:30:05 +00:00
; Default: %icon% %name%
2016-05-26 00:14:56 +00:00
label-focused = %icon%
label-focused-foreground = #ffffff
label-focused-background = #3f3f3f
label-focused-underline = #fba922
label-focused-padding = 4
2016-05-24 21:30:05 +00:00
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
2016-05-26 00:14:56 +00:00
label-unfocused = %icon%
label-unfocused-padding = 4
2016-05-24 21:30:05 +00:00
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
2016-05-26 00:14:56 +00:00
label-visible = %icon%
label-visible-underline = #555555
label-visible-padding = 4
2016-05-24 21:30:05 +00:00
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
2016-05-26 00:14:56 +00:00
label-urgent = %icon%
label-urgent-foreground = #000000
label-urgent-background = #bd2c40
label-urgent-padding = 4
2016-05-24 21:30:05 +00:00
~~~
2016-06-29 02:44:55 +00:00
#### Module `internal/memory`
2016-05-24 21:30:05 +00:00
~~~ ini
[module/memory]
type = internal/memory
; Seconds to sleep between updates
;interval = 1.0
~~~
##### Extra formatting (example)
~~~ ini
; Available tags:
; < label > (default)
2016-05-26 00:14:56 +00:00
; < bar-used >
; < bar-free >
format = < label > < bar-used >
2016-05-24 21:30:05 +00:00
; Available tokens:
; %percentage_used% (default)
; %percentage_free%
; %gb_used%
; %gb_free%
; %gb_total%
; %mb_used%
; %mb_free%
; %mb_total%
label = RAM %percentage_used%
2016-05-26 00:14:56 +00:00
bar-used-width = 50
bar-used-foreground-0 = #55aa55
bar-used-foreground-1 = #557755
bar-used-foreground-2 = #f5a70a
bar-used-foreground-3 = #ff5555
bar-used-fill = ▐
bar-used-empty = ▐
bar-used-empty-foreground = #444444
2016-05-24 21:30:05 +00:00
~~~
2016-06-29 02:44:55 +00:00
#### Module `internal/mpd`
2016-05-24 21:30:05 +00:00
~~~ ini
[module/mpd]
type = internal/mpd
2016-06-29 02:44:55 +00:00
host = 127.0.0.1
port = 6600
password = secretpassword1
2016-06-09 11:42:03 +00:00
2016-05-24 21:30:05 +00:00
; Seconds to sleep between progressbar/song timer sync
;interval = 0.5
~~~
##### Extra formatting (example)
~~~ ini
; Available tags:
2016-05-26 00:14:56 +00:00
; < label-song > (default)
; < label-time >
; < bar-progress >
; < toggle > - gets replaced with < icon- ( pause | play ) >
; < icon-random >
; < icon-repeat >
; < icon-repeatone >
; < icon-prev >
; < icon-stop >
; < icon-play >
; < icon-pause >
; < icon-next >
2016-06-21 03:10:18 +00:00
; < icon-seekb >
; < icon-seekf >
format-online = < icon-prev > < icon-seekb > < icon-stop > < toggle > < icon-seekf > < icon-next > < icon-repeat > < icon-random > < bar-progress > < label-time > < label-song >
2016-05-24 21:30:05 +00:00
; Available tags:
2016-05-26 00:14:56 +00:00
; < label-offline >
;format-offline = < label-offline >
2016-05-24 21:30:05 +00:00
; Available tokens:
; %artist%
; %album%
; %title%
; Default: %artist% - %title%
2016-05-26 00:14:56 +00:00
;label-song = 𝄞 %artist% - %title%
2016-05-24 21:30:05 +00:00
; Available tokens:
; %elapsed%
; %total%
; Default: %elapsed% / %total%
2016-05-26 00:14:56 +00:00
;label-time = %elapsed% / %total%
2016-05-24 21:30:05 +00:00
; Available tokens:
; None
2016-05-26 00:14:56 +00:00
label-offline = 🎜 mpd is offline
2016-05-24 21:30:05 +00:00
2016-05-26 00:14:56 +00:00
icon-play = ⏵
icon-pause = ⏸
icon-stop = ⏹
icon-prev = ⏮
icon-next = ⏭
2016-06-21 03:10:18 +00:00
icon-seekb = ⏪
icon-seekf = ⏩
2016-05-26 00:14:56 +00:00
icon-random = 🔀
icon-repeat = 🔁
;icon-repeatone = 🔂
2016-05-24 21:30:05 +00:00
; Used to display the state of random/repeat/repeatone
2016-10-12 03:19:29 +00:00
toggle-on-foreground = #ff
toggle-off-foreground = #55
2016-05-24 21:30:05 +00:00
2016-05-26 00:14:56 +00:00
bar-progress-width = 45
bar-progress-indicator = |
bar-progress-fill = ─
bar-progress-empty = ─
2016-05-24 21:30:05 +00:00
~~~
2016-06-29 02:44:55 +00:00
#### Module `internal/network`
2016-05-24 21:30:05 +00:00
**NOTE:** If you use both a wired and a wireless network, just add 2 module definitions.
For example:
> ~~~ ini
> [module/wired-network]
> type = internal/network
> interface = eth1
2016-05-19 21:46:50 +00:00
>
2016-05-24 21:30:05 +00:00
> [module/wireless-network]
> type = internal/network
> interface = wlan1
> ~~~
~~~ ini
[module/network]
type = internal/network
interface = wlan1
; Seconds to sleep between updates
2016-05-31 09:49:33 +00:00
interval = 3.0
2016-05-24 21:30:05 +00:00
2016-05-31 09:49:33 +00:00
; Test connectivity every Nth update
; A value of 0 disables the feature
; Recommended minimum value: round(10 / interval)
; - which would test the connection approx. every 10th sec.
2016-05-24 21:30:05 +00:00
; Default: 0
2016-10-12 03:19:29 +00:00
;ping-interval = 3
2016-10-11 12:07:59 +00:00
; Minimum output width of upload/download rate
; Default: 3
2016-10-12 03:19:29 +00:00
;udspeed-minwidth = 0
2016-05-24 21:30:05 +00:00
~~~
##### Extra formatting (example)
~~~ ini
; Available tags:
2016-05-26 00:14:56 +00:00
; < label-connected > (default)
; < ramp-signal >
format-connected = < ramp-signal > < label-connected >
2016-05-24 21:30:05 +00:00
; Available tags:
2016-05-26 00:14:56 +00:00
; < label-disconnected > (default)
2016-06-29 02:44:55 +00:00
format-disconnected = < label-disconnected >
2016-05-24 21:30:05 +00:00
2016-05-31 09:49:33 +00:00
; Available tags:
2016-05-26 00:14:56 +00:00
; < label-connected > (default)
; < label-packetloss >
; < animation-packetloss >
format-packetloss = < animation-packetloss > < label-connected >
2016-05-31 09:49:33 +00:00
2016-05-24 21:30:05 +00:00
; Available tokens:
; %ifname% [wireless+wired]
; %local_ip% [wireless+wired]
; %essid% [wireless]
; %signal% [wireless]
2016-10-11 12:07:59 +00:00
; %upspeed% [wireless+wired]
; %downspeed% [wireless+wired]
2016-05-24 21:30:05 +00:00
; %linkspeed% [wired]
; Default: %ifname% %local_ip%
2016-10-11 12:07:59 +00:00
label-connected = %essid% %downspeed%
2016-05-26 00:14:56 +00:00
label-connected-foreground = #eefafafa
2016-05-24 21:30:05 +00:00
; Available tokens:
; %ifname% [wireless+wired]
; Default: (none)
2016-06-29 02:44:55 +00:00
label-disconnected = not connected
label-disconnected-foreground = #66ffffff
2016-05-24 21:30:05 +00:00
2016-05-31 09:49:33 +00:00
; Available tokens:
; %ifname% [wireless+wired]
; %local_ip% [wireless+wired]
; %essid% [wireless]
; %signal% [wireless]
; %linkspeed% [wired]
; Default: (none)
2016-05-26 00:14:56 +00:00
;label-packetloss = %essid%
;label-packetloss-foreground = #eefafafa
2016-05-31 09:49:33 +00:00
2016-05-26 00:14:56 +00:00
ramp-signal-0 = 😱
ramp-signal-1 = 😠
ramp-signal-2 = 😒
ramp-signal-3 = 😊
ramp-signal-4 = 😃
ramp-signal-5 = 😈
2016-05-31 09:49:33 +00:00
2016-05-26 00:14:56 +00:00
animation-packetloss-0 = ⚠
animation-packetloss-0-foreground = #ffa64c
animation-packetloss-1 = 📶
animation-packetloss-1-foreground = #000000
2016-10-12 03:19:29 +00:00
; Framerate in milliseconds
animation-packetloss-framerate = 500
2016-05-24 21:30:05 +00:00
~~~
2016-06-29 02:44:55 +00:00
#### Module `internal/volume`
2016-05-24 21:30:05 +00:00
2016-06-29 02:44:55 +00:00
*TODO: Add custom format for when the headphones are plugged in.*
2016-05-24 21:30:05 +00:00
~~~ ini
[module/volume]
2016-06-02 16:31:02 +00:00
type = internal/volume
2016-10-12 03:19:29 +00:00
;master-mixer = Master
2016-05-24 21:30:05 +00:00
; Use the following command to list available mixer controls:
; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p"
2016-10-12 03:19:29 +00:00
speaker-mixer = Speaker
headphone-mixer = Headphone
2016-05-24 21:30:05 +00:00
2016-06-09 23:09:54 +00:00
; NOTE: This is required if headphone_mixer is defined
2016-05-24 21:30:05 +00:00
; Use the following command to list available device controls
; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort
2016-10-12 03:19:29 +00:00
headphone-id = 9
2016-05-24 21:30:05 +00:00
~~~
##### Extra formatting (example)
~~~ ini
; Available tags:
2016-05-26 00:14:56 +00:00
; < label-volume > (default)
; < ramp-volume >
; < bar-volume >
format-volume = < ramp-volume > < label-volume >
2016-05-24 21:30:05 +00:00
; Available tags:
2016-05-26 00:14:56 +00:00
; < label-muted > (default)
; < ramp-volume >
; < bar-volume >
;format-muted = < label-muted >
2016-05-24 21:30:05 +00:00
; Available tokens:
; %percentage% (default)
2016-05-26 00:14:56 +00:00
;label-volume = %percentage%
2016-05-24 21:30:05 +00:00
; Available tokens:
; %percentage% (default)
2016-05-26 00:14:56 +00:00
label-muted = 🔇 muted
label-muted-foreground = #66
2016-05-24 21:30:05 +00:00
2016-05-26 00:14:56 +00:00
ramp-volume-0 = 🔈
ramp-volume-1 = 🔉
ramp-volume-2 = 🔊
2016-06-15 03:32:35 +00:00
; If defined, it will replace < ramp-volume > when
; headphones are plugged in to `headphone_control_numid`
; If undefined, < ramp-volume > will be used for both
ramp-headphones-0 =
ramp-headphones-1 =
2016-05-24 21:30:05 +00:00
~~~
2016-06-29 02:44:55 +00:00
#### Module `custom/menu`
2016-05-24 21:30:05 +00:00
~~~ ini
[module/menu-apps]
type = custom/menu
2016-05-26 00:14:56 +00:00
; "menu-LEVEL-N" has the same properties as "label-NAME" with
2016-05-24 21:30:05 +00:00
; the additional "exec" property
;
; Available exec commands:
2016-10-12 03:19:29 +00:00
; menu-open-LEVEL
; menu-close
2016-05-24 21:30:05 +00:00
; Other commands will be executed using "/usr/bin/env sh -c $COMMAND"
2016-05-26 00:14:56 +00:00
menu-0-0 = Browsers
2016-10-12 03:19:29 +00:00
menu-0-0-exec = menu-open-1
2016-05-26 00:14:56 +00:00
menu-0-0-foreground = #fba922
menu-0-2 = Multimedia
2016-10-12 03:19:29 +00:00
menu-0-2-exec = menu-open-3
2016-05-26 00:14:56 +00:00
menu-0-2-foreground = #fba922
2016-05-24 21:30:05 +00:00
2016-05-26 00:14:56 +00:00
menu-1-0 = Firefox
menu-1-0-exec = firefox &
menu-1-0-foreground = #fba922
menu-1-1 = Chromium
menu-1-1-exec = chromium &
menu-1-1-foreground = #fba922
2016-05-24 21:30:05 +00:00
2016-05-26 00:14:56 +00:00
menu-2-0 = Gimp
menu-2-0-foreground = #fba922
menu-2-0-exec = gimp &
menu-2-1 = Scrot
menu-2-1-exec = scrot &
menu-2-1-foreground = #fba922
2016-05-24 21:30:05 +00:00
~~~
##### Extra formatting (example)
~~~ ini
; Available tags:
2016-05-26 00:14:56 +00:00
; < label-toggle > (default) - gets replaced with < label- ( open | close ) >
2016-05-24 21:30:05 +00:00
; < menu > (default)
2016-10-11 13:28:14 +00:00
;format = < label-toggle > < menu >
2016-05-24 21:30:05 +00:00
2016-05-26 00:14:56 +00:00
label-open = Apps
label-close = x
2016-10-11 13:28:14 +00:00
; Optional item separator
; Default: none
label-separator = |
2016-05-24 21:30:05 +00:00
~~~
2016-06-29 02:44:55 +00:00
#### Module `custom/script`
2016-05-24 21:30:05 +00:00
~~~ ini
[module/pkgupdates-available]
type = custom/script
; Available tokens:
; %counter%
; The "exec" command will be executed using "/usr/bin/env sh -c [command]"
exec = count=$(sudo pacman -Syup --noprogressbar 2>/dev/null | sed '/Starting full/,~1!d;/Starting full/d' | wc -l); [ $count -gt 0 ] & & echo "Updates available: $count"
;exec = count=$(echo n | sudo xbps-install -Su >/dev/null 2>&1; sudo xbps-install -Sun | wc -l); [ $count -gt 0 ] & & echo "Updates available: $count"
2016-06-13 21:41:59 +00:00
; Should we keep listening for output from the command?
;tail = false
2016-05-24 21:30:05 +00:00
; Seconds to sleep between updates
2016-06-13 21:41:59 +00:00
; Will be ignored if `tail = true`
; Default: 1
2016-05-24 21:30:05 +00:00
interval = 90
2016-06-15 03:32:35 +00:00
; Limit the length of the output string
; Default: 0
maxlen = 20
; Add trailing ellipsis when truncating the string
; Default: true
ellipsis = true
2016-05-24 21:30:05 +00:00
~~~
##### Extra formatting (example)
~~~ ini
; Available tags:
; < output > (default)
;format = < output >
2016-05-26 00:14:56 +00:00
format-background = #999
format-foreground = #000
format-padding = 4
2016-05-24 21:30:05 +00:00
; Available tokens:
; %counter%
;
2016-05-26 00:14:56 +00:00
; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c [command]"
click-left = echo left %counter%
click-middle = echo middle %counter%
click-right = echo right %counter%
2016-05-24 21:30:05 +00:00
; Available tokens:
; %counter%
;
2016-05-26 00:14:56 +00:00
; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c [command]"
scroll-up = echo scroll up %counter%
scroll-down = echo scroll down %counter%
2016-05-24 21:30:05 +00:00
~~~
2016-06-01 13:12:27 +00:00
##### Useful example
Show title of the currently focused window.
~~~ ini
[module/xtitle]
type = custom/script
2016-06-13 21:41:59 +00:00
exec = xtitle -s
tail = true
2016-06-15 03:32:35 +00:00
maxlen = 25
2016-06-01 13:12:27 +00:00
~~~
2016-05-24 21:30:05 +00:00
2016-06-29 02:44:55 +00:00
#### Module `custom/text`
2016-05-24 21:30:05 +00:00
~~~ ini
[module/my-text-label]
type = custom/text
content = Some random label
~~~
##### Extra formatting (example)
~~~ ini
2016-05-26 00:14:56 +00:00
; "content" has the same properties as "format-NAME"
content-background = #000
content-foreground = #fff
content-padding = 4
; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c $COMMAND"
click-left = echo left
click-middle = echo middle
click-right = echo right
; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c $COMMAND"
scroll-up = echo scroll up
scroll-down = echo scroll down
2016-05-24 21:30:05 +00:00
~~~
2016-06-29 02:44:55 +00:00
## Example configurations
*...coming soon...*
Do you have a nice config that you would like to contribute?
Send me a message and we'll get it up here.
2016-05-24 21:30:05 +00:00
## License
Lemonbuddy is licensed under the MIT license. [See LICENSE for more information ](https://github.com/jaagr/lemonbuddy/blob/master/LICENSE ).