From 71c0b9c7b17a25fd5bf728972e294f8f2708f1f6 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Fri, 27 Mar 2020 15:37:24 +0100 Subject: [PATCH] Add wireguard module for polybar --- dotfiles/polybar.org | 77 +++++++++++++++++++++++++++++++------------- 1 file changed, 55 insertions(+), 22 deletions(-) diff --git a/dotfiles/polybar.org b/dotfiles/polybar.org index f40cf5d..a380167 100644 --- a/dotfiles/polybar.org +++ b/dotfiles/polybar.org @@ -80,7 +80,7 @@ modules-left = i3 bspwm xwindow modules-center = - modules-right = pulseaudio xbacklight redshift nordvpn lockscreen dunst packages unread_mail cpu battery temperature date + modules-right = pulseaudio xbacklight redshift wireguard nordvpn lockscreen dunst packages unread_mail temperature battery date wm-restack = i3 @@ -247,10 +247,9 @@ interval = 2 format-prefix-foreground = ${colors.fg} - format-underline = ${colors.bg} - label = %{A1:$TERMINAL -e "htop" &:} ﬙ %percentage:2%% %{A} + label = %{A1:$TERMINAL -e "htop" &:}﬙ %percentage:2%%%{A} #+END_SRC * Date @@ -311,10 +310,10 @@ adapter = AC full-at = 95 - format-charging = %{A1:xfce4-power-manager-settings &:} %{A} + format-charging = %{A1:xfce4-power-manager-settings &:} %{A} format-charging-underline = ${colors.blue} - format-discharging = %{A1:xfce4-power-manager-settings &:} %{A} + format-discharging = %{A1:xfce4-power-manager-settings &:} %{A} format-discharging-underline = ${colors.red} label-full = %{A1:xfce4-power-manager-settings &:} %{A} @@ -325,23 +324,6 @@ ramp-capacity-2 =  ramp-capacity-3 =  ramp-capacity-4 =  - ramp-capacity-foreground = ${colors.fg} - - animation-charging-0 =  - animation-charging-1 =  - animation-charging-2 =  - animation-charging-3 =  - animation-charging-4 =  - animation-charging-foreground = ${colors.fg} - animation-charging-framerate = 750 - - animation-discharging-0 =  - animation-discharging-1 =  - animation-discharging-2 =  - animation-discharging-3 =  - animation-discharging-4 =  - animation-discharging-foreground = ${color.fg} - animation-discharging-framerate = 750 #+END_SRC * Temperature @@ -663,6 +645,57 @@ format-disconnected = #+end_src +* Wireguard +#+BEGIN_SRC conf + [module/wireguard] + type = custom/script + + format-underline = ${colors.bg} + click-left = ~/.config/polybar/scripts/wireguard-toggle.sh + format =