From 2af0d0845d16517f005142070ec7ba91d10773f7 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Wed, 12 Oct 2016 05:19:29 +0200 Subject: [PATCH] fix(docs): Updated README and configs Use dash instead of underscore as parameter name separator Will break alot of configs but people like to work! --- README.md | 152 ++++++------ config | 98 ++++---- examples/config | 295 +++++++++++++++++++++- examples/config.bspwm | 381 +++++++++++++++++++++++++---- examples/config.i3 | 393 ++++++++++++++++++++++++++---- include/components/bar.hpp | 14 +- include/components/controller.hpp | 4 +- include/components/types.hpp | 2 +- include/drawtypes/animation.hpp | 2 +- include/modules/battery.hpp | 4 +- include/modules/bspwm.hpp | 7 +- include/modules/cpu.hpp | 2 +- include/modules/date.hpp | 12 +- include/modules/i3.hpp | 4 +- include/modules/menu.hpp | 4 +- include/modules/mpd.hpp | 4 +- include/modules/network.hpp | 4 +- include/modules/volume.hpp | 16 +- 18 files changed, 1138 insertions(+), 260 deletions(-) diff --git a/README.md b/README.md index 3df1e65c..f7ddc159 100644 --- a/README.md +++ b/README.md @@ -127,10 +127,10 @@ $ apt-get install cmake libxcb1-dev xcb-proto python-xcbgen libboost-dev libiw-d Please [report any problems](https://github.com/jaagr/lemonbuddy/issues/new) you run into when building the project. It helps alot. ~~~ sh - $ git clone --branch 1.4.6 --recursive https://github.com/jaagr/lemonbuddy + $ git clone --branch 2.0.0 --recursive https://github.com/jaagr/lemonbuddy $ mkdir lemonbuddy/build $ cd lemonbuddy/build - $ cmake .. + $ cmake -DCMAKE_BUILD_TYPE=Release .. $ sudo make install ~~~ @@ -152,43 +152,26 @@ The following code will get you started: # Launch the bar # (where "example" is the name of the bar as defined by [bar/NAME] in the config) - $ lemonbuddy_wrapper example + $ lemonbuddy example ~~~ -> **NOTE:** If you are running i3 or bspwm and you don't see the workspace icons -> it probably depends on the font. Install `font-awesome` and relaunch the bar. -> ...or replace the icons in the config. - -**It is recommended** to always use `lemonbuddy_wrapper` when launching the bars. - -`lemonbuddy_wrapper` is just a simple shell script that takes care -of redirecting the in-/output streams between `lemonbuddy` and `lemonbar`. - -If you handle the in-/output stream redirection's manually, the internal command -handlers (e.g. mpd or volume controls) might stop working. It won't change the -output of the bar but you will miss out on the internal API calls, which is one -of the main advantages of using the application. - -The `lemonbuddy_wrapper` will be deprecated once `lemonbar` is integrated -into the project. +> **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. ## Launching the bar in your wm's bootstrap routine -When using the wrapper to start the bar in in your wm's autostart routine, make sure to include -a kill directive before launching the bar. This is done to make sure that any previously spawned -processes gets terminated before before we launch the new ones. - Create an executable file containing the startup logic, for example `$HOME/.config/lemonbuddy/launch.sh`: ~~~ sh #!/usr/bin/env sh # Terminate already running bar instances - lemonbuddy_terminate noconfirm + killall -q lemonbuddy # Launch bar1 and bar2 - lemonbuddy_wrapper bar1 & - lemonbuddy_wrapper bar2 & + lemonbuddy bar1 & + lemonbuddy bar2 & echo "Bars launched..." ~~~ @@ -205,7 +188,7 @@ If you are using **bspwm**, add the following line to `bspwmrc`: If you are using **i3**, add the following line to your configuration: ~~~ sh - exec_always $HOME/.config/lemonbuddy/launch.sh + exec_always --no-startup-id $HOME/.config/lemonbuddy/launch.sh ~~~ @@ -221,10 +204,10 @@ the resulting output might not be award-winning. ### Fonts When working with unicode symbols, remember that fonts render the symbols differently. Changing font -can drastically improve the quality of your bar. One must-have font -is [Unifont](http://unifoundry.com/unifont.html), which has great unicode coverage. +can drastically improve the quality of your bar. [Unifont](http://unifoundry.com/unifont.html) has great unicode coverage, which makes +it really useful. -Also try different icon fonts, such as [Font Awesome](http://fontawesome.io/icons/) and [Material Icons](https://design.google.com/icons/). +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). *TODO: Describe usage in configuration...* @@ -325,7 +308,7 @@ The configuration syntax is based on the `ini` file format. ### Application settings ~~~ ini [settings] - ; Limit the amount of events sent to lemonbar within a set timeframe: + ; Limit the amount of update events within a set timeframe: ; - "Allow updates within of time" ; Default values: throttle_limit = 3 @@ -337,6 +320,7 @@ The configuration syntax is based on the `ini` file format. ~~~ ini [bar/example] ; Use the following command to list available outputs: + ; If unspecified, the application will pick the first one it finds. ; $ xrandr -q | grep " connected" | cut -d ' ' -f1 monitor = HDMI1 @@ -345,14 +329,16 @@ The configuration syntax is based on the `ini` file format. height = 30 ; Offset value defined in pixels - offset_x = 0 - offset_y = 0 + offset-x = 0 + offset-y = 0 ; Put the bar at the bottom of the screen bottom = true ; Weather to force docking mode or not - dock = false + ; If you are using i3wm it's recommended to use the default value + ; Default: false + dock = true ; This value is used as a multiplier when adding spaces between elements spacing = 3 @@ -361,7 +347,7 @@ The configuration syntax is based on the `ini` file format. lineheight = 14 ; Colors - background = #222222 + background = #ee222222 foreground = #eefafafa linecolor = ${bar/example.background} @@ -378,13 +364,13 @@ The configuration syntax is based on the `ini` file format. ;border-left = 3 ;border-right-color = #ff0059 - ; Amount of spaces to add at the start/end of the whole bar - padding_left = 5 - padding_right = 2 + ; Number of spaces to add at the beginning/end of the bar + padding-left = 5 + padding-right = 2 ; Amount of spaces to add before/after each module - module_margin_left = 3 - module_margin_right = 3 + module-margin-left = 3 + module-margin-right = 3 ; Fonts are defined using: ; font-0 = NotoSans-Regular:size=8;0 @@ -397,7 +383,7 @@ The configuration syntax is based on the `ini` file format. ; Value to be used to set the WM_NAME atom ; This defaults to "lemonbuddy-[BAR]_[MONITOR]" - wm_name = mybar + wm-name = mybar ; Locale used to localize module output (for example date) ;locale = sv_SE.UTF-8 @@ -472,7 +458,7 @@ The configuration syntax is based on the `ini` file format. type = internal/battery ; This is useful in case the battery never reports 100% charge - full_at = 99 + full-at = 99 ; Use the following command to list batteries and adapters: ; $ ls -1 /sys/class/power_supply/ @@ -481,7 +467,7 @@ The configuration syntax is based on the `ini` file format. ; Seconds between reading battery capacity. ; If set to 0, polling will be disabled. - ;poll_interval = 3 + ;poll-interval = 3 ~~~ ##### Extra formatting (example) @@ -530,7 +516,8 @@ The configuration syntax is based on the `ini` file format. animation-charging-2 =  animation-charging-3 =  animation-charging-4 =  - animation-charging-framerate_ms = 750 + ; Framerate in milliseconds + animation-charging-framerate = 750 ~~~ @@ -545,13 +532,13 @@ To specify a custom path to the bspwm socket, you can set the environment variab ##### Extra formatting (example) ~~~ ini - ; workspace_icon-[0-9]+ = label;icon - workspace_icon-0 = code;♚ - workspace_icon-1 = office;♛ - workspace_icon-2 = graphics;♜ - workspace_icon-3 = mail;♝ - workspace_icon-4 = web;♞ - workspace_icon-default = ♟ + ; 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 = ♟ ; Available tags: ; (default) - gets replaced with @@ -629,21 +616,21 @@ To specify a custom path to the bspwm socket, you can set the environment variab ;