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!
This commit is contained in:
parent
a891f3e53b
commit
2af0d0845d
152
README.md
152
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 <throttle_limit> updates within <throttle_ms> 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: <FontName>;<Offset>
|
||||
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:
|
||||
; <label-state> (default) - gets replaced with <label-(active|urgent|occupied|empty)>
|
||||
@ -629,21 +616,21 @@ To specify a custom path to the bspwm socket, you can set the environment variab
|
||||
; <label> (default)
|
||||
; <bar-load>
|
||||
; <ramp-load>
|
||||
; <ramp-load_per_core>
|
||||
format = <label> <ramp-load_per_core>
|
||||
; <ramp-coreload>
|
||||
format = <label> <ramp-coreload>
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default) - total cpu load
|
||||
label = CPU %percentage%
|
||||
|
||||
ramp-load_per_core-0 = ▁
|
||||
ramp-load_per_core-1 = ▂
|
||||
ramp-load_per_core-2 = ▃
|
||||
ramp-load_per_core-3 = ▄
|
||||
ramp-load_per_core-4 = ▅
|
||||
ramp-load_per_core-5 = ▆
|
||||
ramp-load_per_core-6 = ▇
|
||||
ramp-load_per_core-7 = █
|
||||
ramp-coreload-0 = ▁
|
||||
ramp-coreload-1 = ▂
|
||||
ramp-coreload-2 = ▃
|
||||
ramp-coreload-3 = ▄
|
||||
ramp-coreload-4 = ▅
|
||||
ramp-coreload-5 = ▆
|
||||
ramp-coreload-6 = ▇
|
||||
ramp-coreload-7 = █
|
||||
~~~
|
||||
|
||||
|
||||
@ -659,8 +646,8 @@ To specify a custom path to the bspwm socket, you can set the environment variab
|
||||
; NOTE: if you want to use lemonbar tags here you need to use %%{...}
|
||||
date = %Y-%m-%d% %H:%M
|
||||
|
||||
; if date_detailed is defined, clicking the area will toggle between formats
|
||||
date_detailed = %%{F#888}%A, %d %B %Y %%{F#fff}%H:%M%%{F#666}:%%{F#fba922}%S%%{F-}
|
||||
; 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-}
|
||||
~~~
|
||||
|
||||
##### Extra formatting (example)
|
||||
@ -708,12 +695,12 @@ See [the bspwm module](#module-internalbspwm) for details on `label-dimmed`.
|
||||
##### Extra formatting (example)
|
||||
~~~ ini
|
||||
; workspace_icon-[0-9]+ = label;icon
|
||||
workspace_icon-0 = 1;♚
|
||||
workspace_icon-1 = 2;♛
|
||||
workspace_icon-2 = 3;♜
|
||||
workspace_icon-3 = 4;♝
|
||||
workspace_icon-4 = 5;♞
|
||||
workspace_icon-default = ♟
|
||||
ws-icon-0 = 1;♚
|
||||
ws-icon-1 = 2;♛
|
||||
ws-icon-2 = 3;♜
|
||||
ws-icon-3 = 4;♝
|
||||
ws-icon-4 = 5;♞
|
||||
ws-icon-default = ♟
|
||||
|
||||
; Available tags:
|
||||
; <label-state> (default) - gets replaced with <label-(focused|unfocused|visible|urgent)>
|
||||
@ -864,8 +851,8 @@ See [the bspwm module](#module-internalbspwm) for details on `label-dimmed`.
|
||||
;icon-repeatone = 🔂
|
||||
|
||||
; Used to display the state of random/repeat/repeatone
|
||||
toggle_on-foreground = #ff
|
||||
toggle_off-foreground = #55
|
||||
toggle-on-foreground = #ff
|
||||
toggle-off-foreground = #55
|
||||
|
||||
bar-progress-width = 45
|
||||
bar-progress-indicator = |
|
||||
@ -902,11 +889,11 @@ See [the bspwm module](#module-internalbspwm) for details on `label-dimmed`.
|
||||
; Recommended minimum value: round(10 / interval)
|
||||
; - which would test the connection approx. every 10th sec.
|
||||
; Default: 0
|
||||
;ping_interval = 3
|
||||
;ping-interval = 3
|
||||
|
||||
; Minimum output width of upload/download rate
|
||||
; Default: 3
|
||||
;udspeed_minwidth = 0
|
||||
;udspeed-minwidth = 0
|
||||
~~~
|
||||
|
||||
##### Extra formatting (example)
|
||||
@ -965,7 +952,8 @@ See [the bspwm module](#module-internalbspwm) for details on `label-dimmed`.
|
||||
animation-packetloss-0-foreground = #ffa64c
|
||||
animation-packetloss-1 = 📶
|
||||
animation-packetloss-1-foreground = #000000
|
||||
animation-packetloss-framerate_ms = 500
|
||||
; Framerate in milliseconds
|
||||
animation-packetloss-framerate = 500
|
||||
~~~
|
||||
|
||||
|
||||
@ -976,17 +964,17 @@ See [the bspwm module](#module-internalbspwm) for details on `label-dimmed`.
|
||||
~~~ ini
|
||||
[module/volume]
|
||||
type = internal/volume
|
||||
;master_mixer = Master
|
||||
;master-mixer = Master
|
||||
|
||||
; Use the following command to list available mixer controls:
|
||||
; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p"
|
||||
speaker_mixer = Speaker
|
||||
headphone_mixer = Headphone
|
||||
speaker-mixer = Speaker
|
||||
headphone-mixer = Headphone
|
||||
|
||||
; NOTE: This is required if headphone_mixer is defined
|
||||
; 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
|
||||
headphone_control_numid = 9
|
||||
headphone-id = 9
|
||||
~~~
|
||||
|
||||
##### Extra formatting (example)
|
||||
@ -1033,15 +1021,15 @@ See [the bspwm module](#module-internalbspwm) for details on `label-dimmed`.
|
||||
; the additional "exec" property
|
||||
;
|
||||
; Available exec commands:
|
||||
; menu_open-LEVEL
|
||||
; menu_close
|
||||
; menu-open-LEVEL
|
||||
; menu-close
|
||||
; Other commands will be executed using "/usr/bin/env sh -c $COMMAND"
|
||||
|
||||
menu-0-0 = Browsers
|
||||
menu-0-0-exec = menu_open-1
|
||||
menu-0-0-exec = menu-open-1
|
||||
menu-0-0-foreground = #fba922
|
||||
menu-0-2 = Multimedia
|
||||
menu-0-2-exec = menu_open-3
|
||||
menu-0-2-exec = menu-open-3
|
||||
menu-0-2-foreground = #fba922
|
||||
|
||||
menu-1-0 = Firefox
|
||||
|
98
config
98
config
@ -7,8 +7,8 @@
|
||||
monitor = eDP-1
|
||||
width = 100%
|
||||
height = 27
|
||||
offset_x = 0
|
||||
offset_y = 0
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
|
||||
background = #ee222222
|
||||
foreground = #ccfafafa
|
||||
@ -19,10 +19,10 @@ border-bottom-color = #333
|
||||
|
||||
spacing = 1
|
||||
lineheight = 1
|
||||
padding_left = 0
|
||||
padding_right = 2
|
||||
module_margin_left = 1
|
||||
module_margin_right = 2
|
||||
padding-left = 0
|
||||
padding-right = 2
|
||||
module-margin-left = 1
|
||||
module-margin-right = 2
|
||||
|
||||
font-0 = tamzen:size=9;1
|
||||
font-1 = siji:pixelsize=10;0
|
||||
@ -53,9 +53,9 @@ border-top-color = #333
|
||||
|
||||
spacing = ${bar/top.spacing}
|
||||
lineheight = ${bar/top.lineheight}
|
||||
padding_right = ${bar/top.padding_right}
|
||||
module_margin_left = 0
|
||||
module_margin_right = ${bar/top.module_margin_right}
|
||||
padding-right = ${bar/top.padding_right}
|
||||
module-margin-left = 0
|
||||
module-margin-right = ${bar/top.module_margin_right}
|
||||
|
||||
font-0 = ${bar/top.font-0}
|
||||
font-1 = ${bar/top.font-1}
|
||||
@ -70,13 +70,13 @@ wm-restack = ${bar/top.wm-restack}
|
||||
type = internal/bspwm
|
||||
format = <label-state> <label-mode>
|
||||
|
||||
; workspace_icon-0 = term;
|
||||
; workspace_icon-1 = web;
|
||||
; workspace_icon-2 = code;
|
||||
; workspace_icon-3 = music;
|
||||
; workspace_icon-4 = irssi;
|
||||
; workspace_icon-default =
|
||||
workspace_icon-default = x
|
||||
; ws-icon-0 = term;
|
||||
; ws-icon-1 = web;
|
||||
; ws-icon-2 = code;
|
||||
; ws-icon-3 = music;
|
||||
; ws-icon-4 = irssi;
|
||||
; ws-icon-default =
|
||||
ws-icon-default = x
|
||||
|
||||
label-active = o
|
||||
label-active-background = #ee333333
|
||||
@ -112,30 +112,30 @@ interval = 2
|
||||
format = <label> <bar-load>
|
||||
label = CPU
|
||||
|
||||
; ramp-load_per_core-0 = ▁
|
||||
; ramp-load_per_core-0-font = 2
|
||||
; ramp-load_per_core-0-foreground = #55aa55
|
||||
; ramp-load_per_core-1 = ▂
|
||||
; ramp-load_per_core-1-font = 2
|
||||
; ramp-load_per_core-1-foreground = #55aa55
|
||||
; ramp-load_per_core-2 = ▃
|
||||
; ramp-load_per_core-2-font = 2
|
||||
; ramp-load_per_core-2-foreground = #55aa55
|
||||
; ramp-load_per_core-3 = ▄
|
||||
; ramp-load_per_core-3-font = 2
|
||||
; ramp-load_per_core-3-foreground = #55aa55
|
||||
; ramp-load_per_core-4 = ▅
|
||||
; ramp-load_per_core-4-font = 2
|
||||
; ramp-load_per_core-4-foreground = #f5a70a
|
||||
; ramp-load_per_core-5 = ▆
|
||||
; ramp-load_per_core-5-font = 2
|
||||
; ramp-load_per_core-5-foreground = #f5a70a
|
||||
; ramp-load_per_core-6 = ▇
|
||||
; ramp-load_per_core-6-font = 2
|
||||
; ramp-load_per_core-6-foreground = #ff5555
|
||||
; ramp-load_per_core-7 = █
|
||||
; ramp-load_per_core-7-font = 2
|
||||
; ramp-load_per_core-7-foreground = #ff5555
|
||||
; ramp-coreload-0 = ▁
|
||||
; ramp-coreload-0-font = 2
|
||||
; ramp-coreload-0-foreground = #55aa55
|
||||
; ramp-coreload-1 = ▂
|
||||
; ramp-coreload-1-font = 2
|
||||
; ramp-coreload-1-foreground = #55aa55
|
||||
; ramp-coreload-2 = ▃
|
||||
; ramp-coreload-2-font = 2
|
||||
; ramp-coreload-2-foreground = #55aa55
|
||||
; ramp-coreload-3 = ▄
|
||||
; ramp-coreload-3-font = 2
|
||||
; ramp-coreload-3-foreground = #55aa55
|
||||
; ramp-coreload-4 = ▅
|
||||
; ramp-coreload-4-font = 2
|
||||
; ramp-coreload-4-foreground = #f5a70a
|
||||
; ramp-coreload-5 = ▆
|
||||
; ramp-coreload-5-font = 2
|
||||
; ramp-coreload-5-foreground = #f5a70a
|
||||
; ramp-coreload-6 = ▇
|
||||
; ramp-coreload-6-font = 2
|
||||
; ramp-coreload-6-foreground = #ff5555
|
||||
; ramp-coreload-7 = █
|
||||
; ramp-coreload-7-font = 2
|
||||
; ramp-coreload-7-foreground = #ff5555
|
||||
|
||||
bar-load-width = 20
|
||||
bar-load-foreground-0 = #55aa55
|
||||
@ -180,7 +180,7 @@ bar-used-empty-foreground = #444444
|
||||
type = internal/network
|
||||
interface = net1
|
||||
interval = 3.0
|
||||
;udspeed_minwidth = 3
|
||||
;udspeed-minwidth = 3
|
||||
|
||||
format-connected = <ramp-signal> <label-connected>
|
||||
;label-connected = %essid% %{F#66}%local_ip%
|
||||
@ -210,7 +210,7 @@ label-disconnected-foreground = #66
|
||||
[module/date]
|
||||
type = internal/date
|
||||
date = %%{F#666}%{F#cc} %Y-%m-%d %%{F#e60053}%%{F#cc} %H:%M
|
||||
date_detailed = %%{F#666}%{F#cc} %Y-%m-%d %%{F#e60053}%%{F#cc} %H:%M:%S
|
||||
date-alt = %%{F#666}%{F#cc} %Y-%m-%d %%{F#e60053}%%{F#cc} %H:%M:%S
|
||||
interval = 5
|
||||
|
||||
|
||||
@ -226,9 +226,9 @@ ramp-foreground = #666
|
||||
|
||||
[module/volume]
|
||||
type = internal/volume
|
||||
speaker_mixer = Speaker
|
||||
headphone_mixer = Headphone
|
||||
headphone_control_numid = 9
|
||||
speaker-mixer = Speaker
|
||||
headphone-mixer = Headphone
|
||||
headphone-id = 9
|
||||
|
||||
; format-volume = <ramp-volume> <label-volume>
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
@ -268,7 +268,7 @@ bar-volume-empty-foreground = #444444
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
full_at = 98
|
||||
full-at = 98
|
||||
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
@ -283,7 +283,7 @@ animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-foreground = #666
|
||||
animation-charging-framerate_ms = 750
|
||||
animation-charging-framerate = 750
|
||||
|
||||
|
||||
[module/mpd]
|
||||
@ -320,8 +320,8 @@ icon-seekf =
|
||||
icon-random =
|
||||
icon-repeat =
|
||||
|
||||
toggle_on-foreground = #e60053
|
||||
toggle_off-foreground = #66
|
||||
toggle-on-foreground = #e60053
|
||||
toggle-off-foreground = #66
|
||||
|
||||
bar-progress-width = 15
|
||||
bar-progress-indicator =
|
||||
|
295
examples/config
295
examples/config
@ -7,6 +7,297 @@
|
||||
;
|
||||
;=====================================================
|
||||
|
||||
[bar/top]
|
||||
monitor = eDP-1
|
||||
dock = true
|
||||
width = 100%
|
||||
height = 27
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
|
||||
background = #ee222222
|
||||
foreground = #ccfafafa
|
||||
linecolor = #666
|
||||
|
||||
border-bottom = 2
|
||||
border-bottom-color = #333
|
||||
|
||||
spacing = 1
|
||||
lineheight = 1
|
||||
padding-left = 0
|
||||
padding-right = 2
|
||||
module-margin-left = 1
|
||||
module-margin-right = 2
|
||||
|
||||
font-0 = tamzen:size=9;1
|
||||
font-1 = siji:pixelsize=10;0
|
||||
font-2 = unifont:size=6;-1
|
||||
|
||||
modules-left = mpd
|
||||
modules-center = date
|
||||
modules-right = volume memory cpu
|
||||
|
||||
tray-position = right
|
||||
|
||||
|
||||
[bar/external_bottom]
|
||||
monitor = HDMI-1
|
||||
dock = false
|
||||
bottom = true
|
||||
width = 100%
|
||||
height = ${bar/top.height}
|
||||
|
||||
background = ${bar/top.background}
|
||||
foreground = ${bar/top.foreground}
|
||||
linecolor = ${bar/top.linecolor}
|
||||
|
||||
border-top = 2
|
||||
border-top-color = #333
|
||||
|
||||
spacing = ${bar/top.spacing}
|
||||
lineheight = ${bar/top.lineheight}
|
||||
padding-right = ${bar/top.padding_right}
|
||||
module-margin-left = 0
|
||||
module-margin-right = ${bar/top.module_margin_right}
|
||||
|
||||
font-0 = ${bar/top.font-0}
|
||||
font-1 = ${bar/top.font-1}
|
||||
font-2 = ${bar/top.font-2}
|
||||
|
||||
modules-left = powermenu
|
||||
modules-right = date
|
||||
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
|
||||
format = <label> <bar-used>
|
||||
label = RAM
|
||||
|
||||
bar-used-width = 20
|
||||
bar-used-foreground-0 = #55aa55
|
||||
bar-used-foreground-1 = #55aa55
|
||||
bar-used-foreground-2 = #f5a70a
|
||||
bar-used-foreground-3 = #ff5555
|
||||
bar-used-gradient = false
|
||||
bar-used-indicator = │
|
||||
bar-used-indicator-font = 2
|
||||
bar-used-indicator-foreground = #ff
|
||||
bar-used-fill = ━
|
||||
bar-used-fill-font = 2
|
||||
bar-used-empty = ━
|
||||
bar-used-empty-font = 2
|
||||
bar-used-empty-foreground = #444444
|
||||
|
||||
|
||||
[module/wifi]
|
||||
type = internal/network
|
||||
interface = net1
|
||||
interval = 3.0
|
||||
;udspeed-minwidth = 3
|
||||
|
||||
format-connected = <ramp-signal> <label-connected>
|
||||
;label-connected = %essid% %{F#66}%local_ip%
|
||||
;label-connected = %{F#666}%{F#cc} %upspeed% %{F#666}%{F#cc} %downspeed%
|
||||
label-connected = %{O-6 F#666}%{O2 F#cc}%downspeed%
|
||||
label-disconnected = %{F#666}%{F#cc} not connected
|
||||
label-disconnected-foreground = #66
|
||||
|
||||
ramp-signal-0 =
|
||||
ramp-signal-1 =
|
||||
ramp-signal-2 =
|
||||
ramp-signal-3 =
|
||||
ramp-signal-4 =
|
||||
ramp-signal-foreground = #666
|
||||
|
||||
|
||||
[module/wired]
|
||||
type = internal/network
|
||||
interface = net0
|
||||
interval = 3.0
|
||||
|
||||
label-connected = %{T3}%local_ip%%{T-}
|
||||
label-disconnected = %{T3}Not connected%{T-}
|
||||
label-disconnected-foreground = #66
|
||||
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
date = %%{F#666}%{F#cc} %Y-%m-%d %%{F#e60053}%%{F#cc} %H:%M
|
||||
date-alt = %%{F#666}%{F#cc} %Y-%m-%d %%{F#e60053}%%{F#cc} %H:%M:%S
|
||||
interval = 5
|
||||
|
||||
|
||||
[module/backlight]
|
||||
type = internal/backlight
|
||||
card = intel_backlight
|
||||
format = <ramp> <label>
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
ramp-2 =
|
||||
ramp-foreground = #666
|
||||
|
||||
|
||||
[module/volume]
|
||||
type = internal/volume
|
||||
speaker-mixer = Speaker
|
||||
headphone-mixer = Headphone
|
||||
headphone-id = 9
|
||||
|
||||
; format-volume = <ramp-volume> <label-volume>
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
|
||||
label-volume = VOL
|
||||
label-volume-foreground = ${BAR.foreground}
|
||||
|
||||
label-muted = %{F#66} sound muted
|
||||
|
||||
;ramp-volume-0 =
|
||||
;ramp-volume-1 =
|
||||
;ramp-volume-2 =
|
||||
;ramp-volume-3 =
|
||||
;ramp-volume-foreground = #666
|
||||
|
||||
;ramp-headphones-0 =
|
||||
;ramp-headphones-1 =
|
||||
|
||||
bar-volume-width = 20
|
||||
bar-volume-foreground-0 = #55aa55
|
||||
bar-volume-foreground-1 = #55aa55
|
||||
bar-volume-foreground-2 = #55aa55
|
||||
bar-volume-foreground-3 = #55aa55
|
||||
bar-volume-foreground-4 = #55aa55
|
||||
bar-volume-foreground-5 = #f5a70a
|
||||
bar-volume-foreground-6 = #ff5555
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator = │
|
||||
bar-volume-indicator-font = 2
|
||||
bar-volume-indicator-foreground = #ff
|
||||
bar-volume-fill = ━
|
||||
bar-volume-fill-font = 2
|
||||
bar-volume-empty = ━
|
||||
bar-volume-empty-font = 2
|
||||
bar-volume-empty-foreground = #444444
|
||||
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
full-at = 98
|
||||
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
format-full = %{F#666}%{F#cc} <label-full>
|
||||
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-foreground = #666
|
||||
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-foreground = #666
|
||||
animation-charging-framerate = 750
|
||||
|
||||
|
||||
[module/mpd]
|
||||
type = internal/mpd
|
||||
|
||||
format-online = <label-time> <bar-progress> <label-song> <icon-prev> <icon-seekb> <icon-stop> <toggle> <icon-seekf> <icon-next> <icon-repeat> <icon-random>
|
||||
format-online-background = #ee333333
|
||||
format-online-underline = #cc333333
|
||||
format-online-padding = 3
|
||||
|
||||
format-offline = <label-offline>
|
||||
format-offline-foreground = #66
|
||||
|
||||
label-offline = mpd is off
|
||||
|
||||
label-song-maxlen = 45
|
||||
label-song-ellipsis = true
|
||||
|
||||
icon-prev =
|
||||
icon-seekb =
|
||||
icon-stop =
|
||||
icon-play =
|
||||
icon-pause =
|
||||
icon-next =
|
||||
icon-seekf =
|
||||
; icon-prev = ⏮
|
||||
; icon-seekb = ⏪
|
||||
; icon-stop = ⏹
|
||||
; icon-play = ⏵
|
||||
; icon-pause = ⏸
|
||||
; icon-seekf = ⏩
|
||||
; icon-next = ⏭
|
||||
|
||||
icon-random =
|
||||
icon-repeat =
|
||||
|
||||
toggle-on-foreground = #e60053
|
||||
toggle-off-foreground = #66
|
||||
|
||||
bar-progress-width = 15
|
||||
bar-progress-indicator =
|
||||
bar-progress-indicator-foreground = #bb
|
||||
bar-progress-fill = ─
|
||||
bar-progress-fill-foreground = #bb
|
||||
bar-progress-fill-font = 3
|
||||
bar-progress-empty = ─
|
||||
bar-progress-empty-foreground = #44
|
||||
bar-progress-empty-font = 3
|
||||
|
||||
label-time-foreground = #77
|
||||
|
||||
|
||||
[module/powermenu]
|
||||
type = custom/menu
|
||||
|
||||
label-open =
|
||||
label-close =
|
||||
label-separator = /
|
||||
|
||||
menu-0-0 = Terminate WM
|
||||
menu-0-0-foreground = #e60053
|
||||
menu-0-0-exec = bspc quit -1
|
||||
menu-0-1 = Reboot
|
||||
menu-0-1-foreground = #e60053
|
||||
menu-0-1-exec = menu_open-1
|
||||
menu-0-2 = Power off
|
||||
menu-0-2-foreground = #e60053
|
||||
menu-0-2-exec = menu_open-2
|
||||
|
||||
menu-1-0 = Cancel
|
||||
menu-1-0-foreground = #e60053
|
||||
menu-1-0-exec = menu_open-0
|
||||
menu-1-1 = Reboot
|
||||
menu-1-1-foreground = #e60053
|
||||
menu-1-1-exec = sudo reboot
|
||||
|
||||
menu-2-0 = Power off
|
||||
menu-2-0-foreground = #e60053
|
||||
menu-2-0-exec = sudo poweroff
|
||||
menu-2-1 = Cancel
|
||||
menu-2-1-foreground = #e60053
|
||||
menu-2-1-exec = menu_open-0
|
||||
|
||||
|
||||
[module/counter]
|
||||
type = internal/counter
|
||||
format = <counter>
|
||||
interval = 0.1
|
||||
|
||||
; vim:ft=dosini
|
||||
;=====================================================
|
||||
;
|
||||
; To learn more about how to configure Lemonbuddy
|
||||
; go to https://github.com/jaagr/lemonbuddy
|
||||
;
|
||||
; The README contains alot of information
|
||||
;
|
||||
;=====================================================
|
||||
|
||||
[bar/example]
|
||||
;monitor = eDP1
|
||||
bottom = true
|
||||
@ -15,8 +306,8 @@ dock = false
|
||||
width = 100%
|
||||
height = 25
|
||||
|
||||
padding_left = 2
|
||||
padding_right = 2
|
||||
padding-left = 2
|
||||
padding-right = 2
|
||||
|
||||
background = #00ffffff
|
||||
foreground = #ddefefef
|
||||
|
@ -7,66 +7,359 @@
|
||||
;
|
||||
;=====================================================
|
||||
|
||||
[bar/example]
|
||||
;monitor = eDP1
|
||||
bottom = true
|
||||
dock = false
|
||||
|
||||
[bar/top]
|
||||
monitor = eDP-1
|
||||
dock = true
|
||||
width = 100%
|
||||
height = 25
|
||||
height = 27
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
|
||||
padding_left = 2
|
||||
padding_right = 2
|
||||
background = #ee222222
|
||||
foreground = #ccfafafa
|
||||
linecolor = #666
|
||||
|
||||
background = #00ffffff
|
||||
foreground = #ddefefef
|
||||
border-bottom = 2
|
||||
border-bottom-color = #333
|
||||
|
||||
font-0 = Sans:size=8;0
|
||||
font-1 = FontAwesome:size=10:weight=heavy;0
|
||||
spacing = 1
|
||||
lineheight = 1
|
||||
padding-left = 0
|
||||
padding-right = 2
|
||||
module-margin-left = 1
|
||||
module-margin-right = 2
|
||||
|
||||
modules-left = bspwm
|
||||
modules-center = label
|
||||
modules-right = volume cpu ram clock
|
||||
font-0 = tamzen:size=9;1
|
||||
font-1 = siji:pixelsize=10;0
|
||||
font-2 = unifont:size=6;-1
|
||||
|
||||
modules-left = mpd
|
||||
modules-center = bspwm
|
||||
modules-right = volume memory cpu date
|
||||
|
||||
tray-position = right
|
||||
|
||||
wm-restack = bspwm
|
||||
|
||||
[module/label]
|
||||
type = custom/text
|
||||
content = %{F#f90f59}Example%{F#ff} configuration
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
label = CPU: %percentage%
|
||||
format-foreground = #f9b70f
|
||||
[bar/external_bottom]
|
||||
monitor = HDMI-1
|
||||
dock = false
|
||||
bottom = true
|
||||
width = 100%
|
||||
height = ${bar/top.height}
|
||||
|
||||
[module/ram]
|
||||
type = internal/memory
|
||||
label = RAM: %percentage_used%
|
||||
format-foreground = #0fc7f9
|
||||
background = ${bar/top.background}
|
||||
foreground = ${bar/top.foreground}
|
||||
linecolor = ${bar/top.linecolor}
|
||||
|
||||
[module/clock]
|
||||
type = internal/date
|
||||
date = %Y-%m-%d %H:%M
|
||||
format-foreground = #e10ff9
|
||||
border-top = 2
|
||||
border-top-color = #333
|
||||
|
||||
spacing = ${bar/top.spacing}
|
||||
lineheight = ${bar/top.lineheight}
|
||||
padding-right = ${bar/top.padding_right}
|
||||
module-margin-left = 0
|
||||
module-margin-right = ${bar/top.module_margin_right}
|
||||
|
||||
font-0 = ${bar/top.font-0}
|
||||
font-1 = ${bar/top.font-1}
|
||||
font-2 = ${bar/top.font-2}
|
||||
|
||||
modules-left = bspwm
|
||||
modules-right = date powermenu
|
||||
|
||||
wm-restack = ${bar/top.wm-restack}
|
||||
|
||||
[module/volume]
|
||||
type = internal/volume
|
||||
format-volume-foreground = #1ef90f
|
||||
format-muted-foreground = #1ef90f
|
||||
label-volume = Volume: %percentage%
|
||||
label-muted = Sound is muted
|
||||
|
||||
[module/bspwm]
|
||||
type = internal/bspwm
|
||||
label-active =
|
||||
label-active-padding = 1
|
||||
label-active-foreground = #0ba2f9
|
||||
label-occupied =
|
||||
label-occupied-padding = 1
|
||||
label-empty =
|
||||
label-empty-padding = 1
|
||||
label-empty-foreground = #55
|
||||
ws-icon-default = x
|
||||
|
||||
label-active = o %index%
|
||||
label-active-background = #ee333333
|
||||
label-active-underline= #cc333333
|
||||
label-active-padding = 2
|
||||
|
||||
label-occupied = %{O-1}⏺%{O-1} %index%
|
||||
label-occupied-padding = 2
|
||||
|
||||
label-urgent = ! %index%
|
||||
label-urgent-background = #bd2c40
|
||||
label-urgent-padding = 2
|
||||
|
||||
label-empty = x %index%
|
||||
label-empty-foreground = #444
|
||||
label-empty-padding = 2
|
||||
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
|
||||
;format = <label> <bar-load> <ramp-coreload>
|
||||
format = <label> <bar-load>
|
||||
label = CPU
|
||||
|
||||
; ramp-coreload-0 = ▁
|
||||
; ramp-coreload-0-font = 2
|
||||
; ramp-coreload-0-foreground = #55aa55
|
||||
; ramp-coreload-1 = ▂
|
||||
; ramp-coreload-1-font = 2
|
||||
; ramp-coreload-1-foreground = #55aa55
|
||||
; ramp-coreload-2 = ▃
|
||||
; ramp-coreload-2-font = 2
|
||||
; ramp-coreload-2-foreground = #55aa55
|
||||
; ramp-coreload-3 = ▄
|
||||
; ramp-coreload-3-font = 2
|
||||
; ramp-coreload-3-foreground = #55aa55
|
||||
; ramp-coreload-4 = ▅
|
||||
; ramp-coreload-4-font = 2
|
||||
; ramp-coreload-4-foreground = #f5a70a
|
||||
; ramp-coreload-5 = ▆
|
||||
; ramp-coreload-5-font = 2
|
||||
; ramp-coreload-5-foreground = #f5a70a
|
||||
; ramp-coreload-6 = ▇
|
||||
; ramp-coreload-6-font = 2
|
||||
; ramp-coreload-6-foreground = #ff5555
|
||||
; ramp-coreload-7 = █
|
||||
; ramp-coreload-7-font = 2
|
||||
; ramp-coreload-7-foreground = #ff5555
|
||||
|
||||
bar-load-width = 20
|
||||
bar-load-foreground-0 = #55aa55
|
||||
bar-load-foreground-1 = #55aa55
|
||||
bar-load-foreground-2 = #f5a70a
|
||||
bar-load-foreground-3 = #ff5555
|
||||
bar-load-gradient = false
|
||||
bar-load-indicator = │
|
||||
bar-load-indicator-font = 2
|
||||
bar-load-indicator-foreground = #ff
|
||||
bar-load-fill = ━
|
||||
bar-load-fill-font = 2
|
||||
bar-load-empty = ━
|
||||
bar-load-empty-font = 2
|
||||
bar-load-empty-foreground = #444444
|
||||
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
|
||||
format = <label> <bar-used>
|
||||
label = RAM
|
||||
|
||||
bar-used-width = 20
|
||||
bar-used-foreground-0 = #55aa55
|
||||
bar-used-foreground-1 = #55aa55
|
||||
bar-used-foreground-2 = #f5a70a
|
||||
bar-used-foreground-3 = #ff5555
|
||||
bar-used-gradient = false
|
||||
bar-used-indicator = │
|
||||
bar-used-indicator-font = 2
|
||||
bar-used-indicator-foreground = #ff
|
||||
bar-used-fill = ━
|
||||
bar-used-fill-font = 2
|
||||
bar-used-empty = ━
|
||||
bar-used-empty-font = 2
|
||||
bar-used-empty-foreground = #444444
|
||||
|
||||
|
||||
[module/wifi]
|
||||
type = internal/network
|
||||
interface = net1
|
||||
interval = 3.0
|
||||
;udspeed-minwidth = 3
|
||||
|
||||
format-connected = <ramp-signal> <label-connected>
|
||||
;label-connected = %essid% %{F#66}%local_ip%
|
||||
;label-connected = %{F#666}%{F#cc} %upspeed% %{F#666}%{F#cc} %downspeed%
|
||||
label-connected = %{O-6 F#666}%{O2 F#cc}%downspeed%
|
||||
label-disconnected = %{F#666}%{F#cc} not connected
|
||||
label-disconnected-foreground = #66
|
||||
|
||||
ramp-signal-0 =
|
||||
ramp-signal-1 =
|
||||
ramp-signal-2 =
|
||||
ramp-signal-3 =
|
||||
ramp-signal-4 =
|
||||
ramp-signal-foreground = #666
|
||||
|
||||
|
||||
[module/wired]
|
||||
type = internal/network
|
||||
interface = net0
|
||||
interval = 3.0
|
||||
|
||||
label-connected = %{T3}%local_ip%%{T-}
|
||||
label-disconnected = %{T3}Not connected%{T-}
|
||||
label-disconnected-foreground = #66
|
||||
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
date = %%{F#666}%{F#cc} %Y-%m-%d %%{F#e60053}%%{F#cc} %H:%M
|
||||
date-alt = %%{F#666}%{F#cc} %Y-%m-%d %%{F#e60053}%%{F#cc} %H:%M:%S
|
||||
interval = 5
|
||||
|
||||
|
||||
[module/backlight]
|
||||
type = internal/backlight
|
||||
card = intel_backlight
|
||||
format = <ramp> <label>
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
ramp-2 =
|
||||
ramp-foreground = #666
|
||||
|
||||
|
||||
[module/volume]
|
||||
type = internal/volume
|
||||
speaker-mixer = Speaker
|
||||
headphone-mixer = Headphone
|
||||
headphone-id = 9
|
||||
|
||||
; format-volume = <ramp-volume> <label-volume>
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
|
||||
label-volume = VOL
|
||||
label-volume-foreground = ${BAR.foreground}
|
||||
|
||||
label-muted = %{F#66} sound muted
|
||||
|
||||
;ramp-volume-0 =
|
||||
;ramp-volume-1 =
|
||||
;ramp-volume-2 =
|
||||
;ramp-volume-3 =
|
||||
;ramp-volume-foreground = #666
|
||||
|
||||
;ramp-headphones-0 =
|
||||
;ramp-headphones-1 =
|
||||
|
||||
bar-volume-width = 20
|
||||
bar-volume-foreground-0 = #55aa55
|
||||
bar-volume-foreground-1 = #55aa55
|
||||
bar-volume-foreground-2 = #55aa55
|
||||
bar-volume-foreground-3 = #55aa55
|
||||
bar-volume-foreground-4 = #55aa55
|
||||
bar-volume-foreground-5 = #f5a70a
|
||||
bar-volume-foreground-6 = #ff5555
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator = │
|
||||
bar-volume-indicator-font = 2
|
||||
bar-volume-indicator-foreground = #ff
|
||||
bar-volume-fill = ━
|
||||
bar-volume-fill-font = 2
|
||||
bar-volume-empty = ━
|
||||
bar-volume-empty-font = 2
|
||||
bar-volume-empty-foreground = #444444
|
||||
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
full-at = 98
|
||||
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
format-full = %{F#666}%{F#cc} <label-full>
|
||||
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-foreground = #666
|
||||
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-foreground = #666
|
||||
animation-charging-framerate = 750
|
||||
|
||||
|
||||
[module/mpd]
|
||||
type = internal/mpd
|
||||
|
||||
format-online = <label-time> <bar-progress> <label-song> <icon-prev> <icon-seekb> <icon-stop> <toggle> <icon-seekf> <icon-next> <icon-repeat> <icon-random>
|
||||
format-online-background = #ee333333
|
||||
format-online-underline = #cc333333
|
||||
format-online-padding = 3
|
||||
|
||||
format-offline = <label-offline>
|
||||
format-offline-foreground = #66
|
||||
|
||||
label-offline = mpd is off
|
||||
|
||||
label-song-maxlen = 45
|
||||
label-song-ellipsis = true
|
||||
|
||||
icon-prev =
|
||||
icon-seekb =
|
||||
icon-stop =
|
||||
icon-play =
|
||||
icon-pause =
|
||||
icon-next =
|
||||
icon-seekf =
|
||||
; icon-prev = ⏮
|
||||
; icon-seekb = ⏪
|
||||
; icon-stop = ⏹
|
||||
; icon-play = ⏵
|
||||
; icon-pause = ⏸
|
||||
; icon-seekf = ⏩
|
||||
; icon-next = ⏭
|
||||
|
||||
icon-random =
|
||||
icon-repeat =
|
||||
|
||||
toggle-on-foreground = #e60053
|
||||
toggle-off-foreground = #66
|
||||
|
||||
bar-progress-width = 15
|
||||
bar-progress-indicator =
|
||||
bar-progress-indicator-foreground = #bb
|
||||
bar-progress-fill = ─
|
||||
bar-progress-fill-foreground = #bb
|
||||
bar-progress-fill-font = 3
|
||||
bar-progress-empty = ─
|
||||
bar-progress-empty-foreground = #44
|
||||
bar-progress-empty-font = 3
|
||||
|
||||
label-time-foreground = #77
|
||||
|
||||
|
||||
[module/powermenu]
|
||||
type = custom/menu
|
||||
|
||||
label-open =
|
||||
label-close =
|
||||
label-separator = /
|
||||
|
||||
menu-0-0 = Terminate WM
|
||||
menu-0-0-foreground = #e60053
|
||||
menu-0-0-exec = bspc quit -1
|
||||
menu-0-1 = Reboot
|
||||
menu-0-1-foreground = #e60053
|
||||
menu-0-1-exec = menu_open-1
|
||||
menu-0-2 = Power off
|
||||
menu-0-2-foreground = #e60053
|
||||
menu-0-2-exec = menu_open-2
|
||||
|
||||
menu-1-0 = Cancel
|
||||
menu-1-0-foreground = #e60053
|
||||
menu-1-0-exec = menu_open-0
|
||||
menu-1-1 = Reboot
|
||||
menu-1-1-foreground = #e60053
|
||||
menu-1-1-exec = sudo reboot
|
||||
|
||||
menu-2-0 = Power off
|
||||
menu-2-0-foreground = #e60053
|
||||
menu-2-0-exec = sudo poweroff
|
||||
menu-2-1 = Cancel
|
||||
menu-2-1-foreground = #e60053
|
||||
menu-2-1-exec = menu_open-0
|
||||
|
||||
|
||||
[module/counter]
|
||||
type = internal/counter
|
||||
format = <counter>
|
||||
interval = 0.1
|
||||
|
||||
; vim:ft=dosini
|
||||
|
@ -7,63 +7,372 @@
|
||||
;
|
||||
;=====================================================
|
||||
|
||||
[bar/example]
|
||||
;monitor = eDP1
|
||||
bottom = true
|
||||
[bar/top]
|
||||
monitor = eDP-1
|
||||
dock = false
|
||||
|
||||
width = 100%
|
||||
height = 25
|
||||
height = 27
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
|
||||
padding_left = 2
|
||||
padding_right = 2
|
||||
background = #ee222222
|
||||
foreground = #ccfafafa
|
||||
linecolor = #666
|
||||
|
||||
background = #00ffffff
|
||||
foreground = #ddefefef
|
||||
border-bottom = 2
|
||||
border-bottom-color = #333
|
||||
|
||||
font-0 = Sans:size=8;0
|
||||
font-1 = FontAwesome:size=10:weight=heavy;0
|
||||
spacing = 1
|
||||
lineheight = 1
|
||||
|
||||
modules-left = i3
|
||||
modules-center = label
|
||||
modules-right = volume cpu ram clock
|
||||
padding-left = 0
|
||||
padding-right = 2
|
||||
|
||||
module-margin-left = 1
|
||||
module-margin-right = 2
|
||||
|
||||
font-0 = tamzen:size=9;1
|
||||
font-1 = siji:pixelsize=10;0
|
||||
font-2 = unifont:size=6;-1
|
||||
|
||||
modules-left = mpd
|
||||
modules-center = i3
|
||||
modules-right = volume memory cpu date
|
||||
|
||||
tray-position = right
|
||||
|
||||
[module/label]
|
||||
type = custom/text
|
||||
content = %{F#f90f59}Example%{F#ff} configuration
|
||||
wm-restack = i3
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
label = CPU: %percentage%
|
||||
format-foreground = #f9b70f
|
||||
|
||||
[module/ram]
|
||||
type = internal/memory
|
||||
label = RAM: %percentage_used%
|
||||
format-foreground = #0fc7f9
|
||||
[bar/external_bottom]
|
||||
monitor = HDMI-1
|
||||
dock = false
|
||||
bottom = true
|
||||
width = 100%
|
||||
height = ${bar/top.height}
|
||||
|
||||
[module/clock]
|
||||
type = internal/date
|
||||
date = %Y-%m-%d %H:%M
|
||||
format-foreground = #e10ff9
|
||||
background = ${bar/top.background}
|
||||
foreground = ${bar/top.foreground}
|
||||
linecolor = ${bar/top.linecolor}
|
||||
|
||||
border-top = 2
|
||||
border-top-color = #333
|
||||
|
||||
spacing = ${bar/top.spacing}
|
||||
lineheight = ${bar/top.lineheight}
|
||||
padding-right = ${bar/top.padding_right}
|
||||
module-margin-left = 0
|
||||
module-margin-right = ${bar/top.module_margin_right}
|
||||
|
||||
font-0 = ${bar/top.font-0}
|
||||
font-1 = ${bar/top.font-1}
|
||||
font-2 = ${bar/top.font-2}
|
||||
|
||||
modules-left = i3
|
||||
modules-right = date powermenu
|
||||
|
||||
wm-restack = ${bar/top.wm-restack}
|
||||
|
||||
[module/volume]
|
||||
type = internal/volume
|
||||
format-volume-foreground = #1ef90f
|
||||
format-muted-foreground = #f90f2e
|
||||
label-volume = Volume: %percentage%
|
||||
label-muted = Sound is muted
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
label-focused =
|
||||
label-focused-padding = 1
|
||||
label-focused-foreground = #0ba2f9
|
||||
label-unfocused =
|
||||
label-unfocused-padding = 1
|
||||
label-visible =
|
||||
label-visible-padding = 1
|
||||
format = <label-state>
|
||||
|
||||
;pin-workspaces = true
|
||||
;wsname-maxlen = 1
|
||||
;index-sort = true
|
||||
|
||||
;ws-icon-0 = term;
|
||||
;ws-icon-1 = web;
|
||||
;ws-icon-2 = code;
|
||||
;ws-icon-3 = music;
|
||||
;ws-icon-4 = irssi;
|
||||
;ws-icon-default =
|
||||
ws-icon-default = x
|
||||
|
||||
label-focused = o %index%
|
||||
label-focused-background = #ee333333
|
||||
label-focused-underline= #cc333333
|
||||
label-focused-padding = 2
|
||||
|
||||
label-unfocused = %{O-1}⏺%{O-1} %index%
|
||||
label-unfocused-padding = 2
|
||||
|
||||
label-urgent = ! %index%
|
||||
label-urgent-background = #bd2c40
|
||||
label-urgent-padding = 2
|
||||
|
||||
label-visible = x %index%
|
||||
label-visible-foreground = #444
|
||||
label-visible-padding = 2
|
||||
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
|
||||
format = <label> <bar-load>
|
||||
label = CPU
|
||||
|
||||
; ramp-coreload-0 = ▁
|
||||
; ramp-coreload-0-font = 2
|
||||
; ramp-coreload-0-foreground = #55aa55
|
||||
; ramp-coreload-1 = ▂
|
||||
; ramp-coreload-1-font = 2
|
||||
; ramp-coreload-1-foreground = #55aa55
|
||||
; ramp-coreload-2 = ▃
|
||||
; ramp-coreload-2-font = 2
|
||||
; ramp-coreload-2-foreground = #55aa55
|
||||
; ramp-coreload-3 = ▄
|
||||
; ramp-coreload-3-font = 2
|
||||
; ramp-coreload-3-foreground = #55aa55
|
||||
; ramp-coreload-4 = ▅
|
||||
; ramp-coreload-4-font = 2
|
||||
; ramp-coreload-4-foreground = #f5a70a
|
||||
; ramp-coreload-5 = ▆
|
||||
; ramp-coreload-5-font = 2
|
||||
; ramp-coreload-5-foreground = #f5a70a
|
||||
; ramp-coreload-6 = ▇
|
||||
; ramp-coreload-6-font = 2
|
||||
; ramp-coreload-6-foreground = #ff5555
|
||||
; ramp-coreload-7 = █
|
||||
; ramp-coreload-7-font = 2
|
||||
; ramp-coreload-7-foreground = #ff5555
|
||||
|
||||
bar-load-width = 20
|
||||
bar-load-foreground-0 = #55aa55
|
||||
bar-load-foreground-1 = #55aa55
|
||||
bar-load-foreground-2 = #f5a70a
|
||||
bar-load-foreground-3 = #ff5555
|
||||
bar-load-gradient = false
|
||||
bar-load-indicator = │
|
||||
bar-load-indicator-font = 2
|
||||
bar-load-indicator-foreground = #ff
|
||||
bar-load-fill = ━
|
||||
bar-load-fill-font = 2
|
||||
bar-load-empty = ━
|
||||
bar-load-empty-font = 2
|
||||
bar-load-empty-foreground = #444444
|
||||
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
|
||||
format = <label> <bar-used>
|
||||
label = RAM
|
||||
|
||||
bar-used-width = 20
|
||||
bar-used-foreground-0 = #55aa55
|
||||
bar-used-foreground-1 = #55aa55
|
||||
bar-used-foreground-2 = #f5a70a
|
||||
bar-used-foreground-3 = #ff5555
|
||||
bar-used-gradient = false
|
||||
bar-used-indicator = │
|
||||
bar-used-indicator-font = 2
|
||||
bar-used-indicator-foreground = #ff
|
||||
bar-used-fill = ━
|
||||
bar-used-fill-font = 2
|
||||
bar-used-empty = ━
|
||||
bar-used-empty-font = 2
|
||||
bar-used-empty-foreground = #444444
|
||||
|
||||
|
||||
[module/wifi]
|
||||
type = internal/network
|
||||
interface = net1
|
||||
interval = 3.0
|
||||
;udspeed-minwidth = 3
|
||||
|
||||
format-connected = <ramp-signal> <label-connected>
|
||||
;label-connected = %essid% %{F#66}%local_ip%
|
||||
;label-connected = %{F#666}%{F#cc} %upspeed% %{F#666}%{F#cc} %downspeed%
|
||||
label-connected = %{O-6 F#666}%{O2 F#cc}%downspeed%
|
||||
label-disconnected = %{F#666}%{F#cc} not connected
|
||||
label-disconnected-foreground = #66
|
||||
|
||||
ramp-signal-0 =
|
||||
ramp-signal-1 =
|
||||
ramp-signal-2 =
|
||||
ramp-signal-3 =
|
||||
ramp-signal-4 =
|
||||
ramp-signal-foreground = #666
|
||||
|
||||
|
||||
[module/wired]
|
||||
type = internal/network
|
||||
interface = net0
|
||||
interval = 3.0
|
||||
|
||||
label-connected = %{T3}%local_ip%%{T-}
|
||||
label-disconnected = %{T3}Not connected%{T-}
|
||||
label-disconnected-foreground = #66
|
||||
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
date = %%{F#666}%{F#cc} %Y-%m-%d %%{F#e60053}%%{F#cc} %H:%M
|
||||
date-alt = %%{F#666}%{F#cc} %Y-%m-%d %%{F#e60053}%%{F#cc} %H:%M:%S
|
||||
interval = 5
|
||||
|
||||
|
||||
[module/backlight]
|
||||
type = internal/backlight
|
||||
card = intel_backlight
|
||||
format = <ramp> <label>
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
ramp-2 =
|
||||
ramp-foreground = #666
|
||||
|
||||
|
||||
[module/volume]
|
||||
type = internal/volume
|
||||
speaker-mixer = Speaker
|
||||
headphone-mixer = Headphone
|
||||
headphone-id = 9
|
||||
|
||||
; format-volume = <ramp-volume> <label-volume>
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
|
||||
label-volume = VOL
|
||||
label-volume-foreground = ${BAR.foreground}
|
||||
|
||||
label-muted = %{F#66} sound muted
|
||||
|
||||
;ramp-volume-0 =
|
||||
;ramp-volume-1 =
|
||||
;ramp-volume-2 =
|
||||
;ramp-volume-3 =
|
||||
;ramp-volume-foreground = #666
|
||||
|
||||
;ramp-headphones-0 =
|
||||
;ramp-headphones-1 =
|
||||
|
||||
bar-volume-width = 20
|
||||
bar-volume-foreground-0 = #55aa55
|
||||
bar-volume-foreground-1 = #55aa55
|
||||
bar-volume-foreground-2 = #55aa55
|
||||
bar-volume-foreground-3 = #55aa55
|
||||
bar-volume-foreground-4 = #55aa55
|
||||
bar-volume-foreground-5 = #f5a70a
|
||||
bar-volume-foreground-6 = #ff5555
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator = │
|
||||
bar-volume-indicator-font = 2
|
||||
bar-volume-indicator-foreground = #ff
|
||||
bar-volume-fill = ━
|
||||
bar-volume-fill-font = 2
|
||||
bar-volume-empty = ━
|
||||
bar-volume-empty-font = 2
|
||||
bar-volume-empty-foreground = #444444
|
||||
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
full-at = 98
|
||||
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
format-full = %{F#666}%{F#cc} <label-full>
|
||||
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-foreground = #666
|
||||
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-foreground = #666
|
||||
animation-charging-framerate = 750
|
||||
|
||||
|
||||
[module/mpd]
|
||||
type = internal/mpd
|
||||
|
||||
format-online = <label-time> <bar-progress> <label-song> <icon-prev> <icon-seekb> <icon-stop> <toggle> <icon-seekf> <icon-next> <icon-repeat> <icon-random>
|
||||
format-online-background = #ee333333
|
||||
format-online-underline = #cc333333
|
||||
format-online-padding = 3
|
||||
|
||||
format-offline = <label-offline>
|
||||
format-offline-foreground = #66
|
||||
|
||||
label-offline = mpd is off
|
||||
|
||||
label-song-maxlen = 45
|
||||
label-song-ellipsis = true
|
||||
|
||||
icon-prev =
|
||||
icon-seekb =
|
||||
icon-stop =
|
||||
icon-play =
|
||||
icon-pause =
|
||||
icon-next =
|
||||
icon-seekf =
|
||||
; icon-prev = ⏮
|
||||
; icon-seekb = ⏪
|
||||
; icon-stop = ⏹
|
||||
; icon-play = ⏵
|
||||
; icon-pause = ⏸
|
||||
; icon-seekf = ⏩
|
||||
; icon-next = ⏭
|
||||
|
||||
icon-random =
|
||||
icon-repeat =
|
||||
|
||||
toggle-on-foreground = #e60053
|
||||
toggle-off-foreground = #66
|
||||
|
||||
bar-progress-width = 15
|
||||
bar-progress-indicator =
|
||||
bar-progress-indicator-foreground = #bb
|
||||
bar-progress-fill = ─
|
||||
bar-progress-fill-foreground = #bb
|
||||
bar-progress-fill-font = 3
|
||||
bar-progress-empty = ─
|
||||
bar-progress-empty-foreground = #44
|
||||
bar-progress-empty-font = 3
|
||||
|
||||
label-time-foreground = #77
|
||||
|
||||
|
||||
[module/powermenu]
|
||||
type = custom/menu
|
||||
|
||||
label-open =
|
||||
label-close =
|
||||
label-separator = /
|
||||
|
||||
menu-0-0 = Terminate WM
|
||||
menu-0-0-foreground = #e60053
|
||||
menu-0-0-exec = i3-msg -t command exit
|
||||
menu-0-1 = Reboot
|
||||
menu-0-1-foreground = #e60053
|
||||
menu-0-1-exec = menu_open-1
|
||||
menu-0-2 = Power off
|
||||
menu-0-2-foreground = #e60053
|
||||
menu-0-2-exec = menu_open-2
|
||||
|
||||
menu-1-0 = Cancel
|
||||
menu-1-0-foreground = #e60053
|
||||
menu-1-0-exec = menu_open-0
|
||||
menu-1-1 = Reboot
|
||||
menu-1-1-foreground = #e60053
|
||||
menu-1-1-exec = sudo reboot
|
||||
|
||||
menu-2-0 = Power off
|
||||
menu-2-0-foreground = #e60053
|
||||
menu-2-0-exec = sudo poweroff
|
||||
menu-2-1 = Cancel
|
||||
menu-2-1-foreground = #e60053
|
||||
menu-2-1-exec = menu_open-0
|
||||
|
||||
|
||||
[module/counter]
|
||||
type = internal/counter
|
||||
format = <counter>
|
||||
interval = 0.1
|
||||
|
||||
; vim:ft=dosini
|
||||
|
@ -150,12 +150,12 @@ class bar : public xpp::event::sink<evt::button_press, evt::expose> {
|
||||
GET_CONFIG_VALUE(bs, m_bar.bottom, "bottom");
|
||||
GET_CONFIG_VALUE(bs, m_bar.spacing, "spacing");
|
||||
GET_CONFIG_VALUE(bs, m_bar.lineheight, "lineheight");
|
||||
GET_CONFIG_VALUE(bs, m_bar.offset_x, "offset_x");
|
||||
GET_CONFIG_VALUE(bs, m_bar.offset_y, "offset_y");
|
||||
GET_CONFIG_VALUE(bs, m_bar.padding_left, "padding_left");
|
||||
GET_CONFIG_VALUE(bs, m_bar.padding_right, "padding_right");
|
||||
GET_CONFIG_VALUE(bs, m_bar.module_margin_left, "module_margin_left");
|
||||
GET_CONFIG_VALUE(bs, m_bar.module_margin_right, "module_margin_right");
|
||||
GET_CONFIG_VALUE(bs, m_bar.offset_x, "offset-x");
|
||||
GET_CONFIG_VALUE(bs, m_bar.offset_y, "offset-y");
|
||||
GET_CONFIG_VALUE(bs, m_bar.padding_left, "padding-left");
|
||||
GET_CONFIG_VALUE(bs, m_bar.padding_right, "padding-right");
|
||||
GET_CONFIG_VALUE(bs, m_bar.module_margin_left, "module-margin-left");
|
||||
GET_CONFIG_VALUE(bs, m_bar.module_margin_right, "module-margin-right");
|
||||
|
||||
auto w = m_conf.get<string>(bs, "width", "100%");
|
||||
auto h = m_conf.get<string>(bs, "height", "24");
|
||||
@ -197,7 +197,7 @@ class bar : public xpp::event::sink<evt::button_press, evt::expose> {
|
||||
// Set the WM_NAME value {{{
|
||||
|
||||
m_bar.wmname = "lemonbuddy-" + bs.substr(4) + "_" + m_bar.monitor->name;
|
||||
m_bar.wmname = m_conf.get<string>(bs, "wm_name", m_bar.wmname);
|
||||
m_bar.wmname = m_conf.get<string>(bs, "wm-name", m_bar.wmname);
|
||||
m_bar.wmname = string_util::replace(m_bar.wmname, " ", "-");
|
||||
|
||||
// }}}
|
||||
|
@ -189,9 +189,9 @@ class controller {
|
||||
bootstrap_modules();
|
||||
|
||||
// Allow <throttle_limit> ticks within <throttle_ms> timeframe
|
||||
const auto throttle_limit = m_conf.get<unsigned int>("settings", "throttle_limit", 3);
|
||||
const auto throttle_limit = m_conf.get<unsigned int>("settings", "throttle-limit", 3);
|
||||
const auto throttle_ms = chrono::duration<double, std::milli>(
|
||||
m_conf.get<unsigned int>("settings", "throttle_ms", 60));
|
||||
m_conf.get<unsigned int>("settings", "throttle-ms", 60));
|
||||
m_throttler = throttle_util::make_throttler(throttle_limit, throttle_ms);
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ struct bar_settings {
|
||||
alignment align{alignment::RIGHT};
|
||||
|
||||
bool bottom{false};
|
||||
bool dock{true};
|
||||
bool dock{false};
|
||||
|
||||
monitor_t monitor;
|
||||
string wmname;
|
||||
|
@ -74,7 +74,7 @@ namespace drawtypes {
|
||||
vec.emplace_back(forward<icon_t>(
|
||||
get_optional_config_icon(conf, section, name + "-" + to_string(i), frames[i])));
|
||||
|
||||
auto framerate = conf.get<int>(section, name + "-framerate_ms", 1000);
|
||||
auto framerate = conf.get<int>(section, name + "-framerate", 1000);
|
||||
|
||||
return animation_t{new animation(move(vec), framerate)};
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ namespace modules {
|
||||
|
||||
m_battery = m_conf.get<string>(name(), "battery", "BAT0");
|
||||
m_adapter = m_conf.get<string>(name(), "adapter", "ADP1");
|
||||
m_fullat = m_conf.get<int>(name(), "full_at", 100);
|
||||
m_fullat = m_conf.get<int>(name(), "full-at", 100);
|
||||
|
||||
m_path_capacity = string_util::replace(PATH_BATTERY_CAPACITY, "%battery%", m_battery);
|
||||
m_path_adapter = string_util::replace(PATH_ADAPTER_STATUS, "%adapter%", m_adapter);
|
||||
@ -180,7 +180,7 @@ namespace modules {
|
||||
dur = chrono::duration<double>(float(m_animation_charging->framerate()) / 1000.0f);
|
||||
|
||||
int i = 0;
|
||||
const int poll_seconds = m_conf.get<float>(name(), "poll_interval", 3.0f) / dur.count();
|
||||
const int poll_seconds = m_conf.get<float>(name(), "poll-interval", 3.0f) / dur.count();
|
||||
|
||||
while (enabled()) {
|
||||
// TODO(jaagr): Keep track of when the values were last read to determine
|
||||
|
@ -49,12 +49,9 @@ namespace modules {
|
||||
}
|
||||
|
||||
void setup() {
|
||||
// Load configuration values {{{
|
||||
|
||||
m_monitor = m_bar.monitor->name;
|
||||
m_log.trace("%s: Primary monitor '%s'", name(), m_monitor);
|
||||
|
||||
// }}}
|
||||
// Add formats and create components {{{
|
||||
|
||||
m_formatter->add(DEFAULT_FORMAT, TAG_LABEL_STATE, {TAG_LABEL_STATE}, {TAG_LABEL_MODE});
|
||||
@ -93,7 +90,7 @@ namespace modules {
|
||||
m_icons->add(
|
||||
DEFAULT_WS_ICON, icon_t{new icon(m_conf.get<string>(name(), DEFAULT_WS_ICON, ""))});
|
||||
|
||||
for (auto workspace : m_conf.get_list<string>(name(), "workspace_icon", {})) {
|
||||
for (auto workspace : m_conf.get_list<string>(name(), "ws-icon", {})) {
|
||||
auto vec = string_util::split(workspace, ';');
|
||||
if (vec.size() == 2) {
|
||||
m_icons->add(vec[0], icon_t{new icon{vec[1]}});
|
||||
@ -335,7 +332,7 @@ namespace modules {
|
||||
}
|
||||
|
||||
private:
|
||||
static constexpr auto DEFAULT_WS_ICON = "workspace_icon-default";
|
||||
static constexpr auto DEFAULT_WS_ICON = "ws-icon-default";
|
||||
static constexpr auto DEFAULT_WS_LABEL = "%icon% %name%";
|
||||
static constexpr auto TAG_LABEL_STATE = "<label-state>";
|
||||
static constexpr auto TAG_LABEL_MODE = "<label-mode>";
|
||||
|
@ -159,7 +159,7 @@ namespace modules {
|
||||
static constexpr auto TAG_LABEL = "<label>";
|
||||
static constexpr auto TAG_BAR_LOAD = "<bar-load>";
|
||||
static constexpr auto TAG_RAMP_LOAD = "<ramp-load>";
|
||||
static constexpr auto TAG_RAMP_LOAD_PER_CORE = "<ramp-load_per_core>";
|
||||
static constexpr auto TAG_RAMP_LOAD_PER_CORE = "<ramp-coreload>";
|
||||
|
||||
progressbar_t m_barload;
|
||||
ramp_t m_rampload;
|
||||
|
@ -15,7 +15,7 @@ namespace modules {
|
||||
m_formatter->add(DEFAULT_FORMAT, TAG_DATE, {TAG_DATE});
|
||||
|
||||
m_format = m_conf.get<string>(name(), "date");
|
||||
m_format_detailed = m_conf.get<string>(name(), "date_detailed", "");
|
||||
m_formatalt = m_conf.get<string>(name(), "date-alt", "");
|
||||
}
|
||||
|
||||
bool update() {
|
||||
@ -23,7 +23,7 @@ namespace modules {
|
||||
return false;
|
||||
|
||||
auto time = std::time(nullptr);
|
||||
auto date_format = m_detailed ? m_format_detailed : m_format;
|
||||
auto date_format = m_toggled ? m_formatalt : m_format;
|
||||
char buffer[256] = {'\0'};
|
||||
|
||||
std::strftime(buffer, sizeof(buffer), date_format.c_str(), std::localtime(&time));
|
||||
@ -37,7 +37,7 @@ namespace modules {
|
||||
}
|
||||
|
||||
string get_output() {
|
||||
if (!m_format_detailed.empty())
|
||||
if (!m_formatalt.empty())
|
||||
m_builder->cmd(mousebtn::LEFT, EVENT_TOGGLE);
|
||||
m_builder->node(timer_module::get_output());
|
||||
return m_builder->flush();
|
||||
@ -51,7 +51,7 @@ namespace modules {
|
||||
|
||||
bool handle_event(string cmd) {
|
||||
if (cmd == EVENT_TOGGLE) {
|
||||
m_detailed = !m_detailed;
|
||||
m_toggled = !m_toggled;
|
||||
wakeup();
|
||||
}
|
||||
return cmd == EVENT_TOGGLE;
|
||||
@ -67,10 +67,10 @@ namespace modules {
|
||||
static constexpr auto EVENT_TOGGLE = "datetoggle";
|
||||
|
||||
string m_format;
|
||||
string m_format_detailed;
|
||||
string m_formatalt;
|
||||
|
||||
char m_buffer[256] = {'\0'};
|
||||
stateflag m_detailed{false};
|
||||
stateflag m_toggled{false};
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ namespace modules {
|
||||
// }}}
|
||||
// Add formats and create components {{{
|
||||
|
||||
for (auto workspace : m_conf.get_list<string>(name(), "workspace_icon", {})) {
|
||||
for (auto workspace : m_conf.get_list<string>(name(), "ws-icon", {})) {
|
||||
auto vec = string_util::split(workspace, ';');
|
||||
if (vec.size() == 2)
|
||||
m_icons->add(vec[0], icon_t{new icon{vec[1]}});
|
||||
@ -228,7 +228,7 @@ namespace modules {
|
||||
}
|
||||
|
||||
private:
|
||||
static constexpr auto DEFAULT_WS_ICON = "workspace_icon-default";
|
||||
static constexpr auto DEFAULT_WS_ICON = "ws-icon-default";
|
||||
static constexpr auto DEFAULT_WS_LABEL = "%icon% %name%";
|
||||
static constexpr auto TAG_LABEL_STATE = "<label-state>";
|
||||
static constexpr auto EVENT_CLICK = "i3-wsfocus-";
|
||||
|
@ -130,8 +130,8 @@ namespace modules {
|
||||
static constexpr auto TAG_LABEL_TOGGLE = "<label-toggle>";
|
||||
static constexpr auto TAG_MENU = "<menu>";
|
||||
|
||||
static constexpr auto EVENT_MENU_OPEN = "menu_open-";
|
||||
static constexpr auto EVENT_MENU_CLOSE = "menu_close";
|
||||
static constexpr auto EVENT_MENU_OPEN = "menu-open-";
|
||||
static constexpr auto EVENT_MENU_CLOSE = "menu-close";
|
||||
|
||||
label_t m_labelopen;
|
||||
label_t m_labelclose;
|
||||
|
@ -81,8 +81,8 @@ namespace modules {
|
||||
}
|
||||
if (m_formatter->has(TAG_ICON_RANDOM) || m_formatter->has(TAG_ICON_REPEAT) ||
|
||||
m_formatter->has(TAG_ICON_REPEAT_ONE)) {
|
||||
m_toggle_on_color = m_conf.get<string>(name(), "toggle_on-foreground", "");
|
||||
m_toggle_off_color = m_conf.get<string>(name(), "toggle_off-foreground", "");
|
||||
m_toggle_on_color = m_conf.get<string>(name(), "toggle-on-foreground", "");
|
||||
m_toggle_off_color = m_conf.get<string>(name(), "toggle-off-foreground", "");
|
||||
}
|
||||
if (m_formatter->has(TAG_LABEL_OFFLINE, FORMAT_OFFLINE))
|
||||
m_label_offline = get_config_label(m_conf, name(), TAG_LABEL_OFFLINE);
|
||||
|
@ -26,8 +26,8 @@ namespace modules {
|
||||
// Load configuration values
|
||||
m_interface = m_conf.get<string>(name(), "interface");
|
||||
m_interval = chrono::duration<double>(m_conf.get<float>(name(), "interval", 1));
|
||||
m_ping_nth_update = m_conf.get<int>(name(), "ping_interval", 0);
|
||||
m_udspeed_minwidth = m_conf.get<int>(name(), "udspeed_minwidth", m_udspeed_minwidth);
|
||||
m_ping_nth_update = m_conf.get<int>(name(), "ping-interval", 0);
|
||||
m_udspeed_minwidth = m_conf.get<int>(name(), "udspeed-minwidth", m_udspeed_minwidth);
|
||||
|
||||
// Add formats
|
||||
m_formatter->add(
|
||||
|
@ -17,27 +17,27 @@ namespace modules {
|
||||
void setup() {
|
||||
// Load configuration values {{{
|
||||
|
||||
auto master_mixer = m_conf.get<string>(name(), "master_mixer", "Master");
|
||||
auto speaker_mixer = m_conf.get<string>(name(), "speaker_mixer", "");
|
||||
auto headphone_mixer = m_conf.get<string>(name(), "headphone_mixer", "");
|
||||
auto master_mixer = m_conf.get<string>(name(), "master-mixer", "Master");
|
||||
auto speaker_mixer = m_conf.get<string>(name(), "speaker-mixer", "");
|
||||
auto headphone_mixer = m_conf.get<string>(name(), "headphone-mixer", "");
|
||||
|
||||
m_headphone_ctrl_numid = m_conf.get<int>(name(), "headphone_control_numid", -1);
|
||||
m_headphone_ctrl_numid = m_conf.get<int>(name(), "headphone-id", -1);
|
||||
|
||||
if (!headphone_mixer.empty() && m_headphone_ctrl_numid == -1)
|
||||
throw module_error(
|
||||
"volume_module: Missing required property value for \"headphone_control_numid\"...");
|
||||
"volume_module: Missing required property value for \"headphone-id\"...");
|
||||
else if (headphone_mixer.empty() && m_headphone_ctrl_numid != -1)
|
||||
throw module_error(
|
||||
"volume_module: Missing required property value for \"headphone_mixer\"...");
|
||||
"volume_module: Missing required property value for \"headphone-mixer\"...");
|
||||
|
||||
if (string_util::lower(speaker_mixer) == "master")
|
||||
throw module_error(
|
||||
"volume_module: The \"Master\" mixer is already processed internally. Specify another "
|
||||
"mixer or comment out the \"speaker_mixer\" parameter...");
|
||||
"mixer or comment out the \"speaker-mixer\" parameter...");
|
||||
if (string_util::lower(headphone_mixer) == "master")
|
||||
throw module_error(
|
||||
"volume_module: The \"Master\" mixer is already processed internally. Specify another "
|
||||
"mixer or comment out the \"headphone_mixer\" parameter...");
|
||||
"mixer or comment out the \"headphone-mixer\" parameter...");
|
||||
|
||||
// }}}
|
||||
// Setup mixers {{{
|
||||
|
Loading…
Reference in New Issue
Block a user