Super hacky shell wrapper around lemonbar that aims to poll as little as possible, minimising bar updates to the screen and reduce resource usage.
git clone https://mcol.xyz/code/lemontools
Log | Files | Refs | README | LICENSE

commit 6a3f9bc33915831cc338ec55e5517b02e5f9777e
parent 0f9a59a6ed8829b7468d4f136e42893388eb05e0
Author: mcol <mcol@posteo.net>
Date:   Sun, 28 Apr 2019 08:51:36 +0100

always print wireguard module at initial launch

Diffstat:
Mmodules/wireguard | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/wireguard b/modules/wireguard @@ -30,11 +30,11 @@ update_wireguard() { _wireguard() { - [ -n "$wireguard_interface" ] || wireguard_interface=wg0 + local wg_is_up=false get_clicks wireguard - local wg_is_up - wg_is_up=false + [[ -n "$wireguard_interface" ]] || + wireguard_interface=wg0 [[ -z "$wireguard_up_format" ]] && wireguard_up_format='%{B$highlight}${pad}${pad}%{B-}' @@ -42,6 +42,7 @@ _wireguard() { [[ -z "$wireguard_down_format" ]] && wireguard_down_format='%{B$urgent}${pad}${pad}%{B-}' + send "wireguard='${wireguard_pre}$(eval echo $wireguard_down_format)${wireguard_post}'" & while true; do update_wireguard sleep 10