From d1e5d12463b5a76de88a498ab419955bbd5c65f3 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Fri, 10 Apr 2020 16:37:55 +0200 Subject: [PATCH] add network module --- dotfiles/polybar.org | 45 +++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/dotfiles/polybar.org b/dotfiles/polybar.org index c41bd14..e0b43c0 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 wireguard nordvpn lockscreen dunst packages unread_news unread_mail temperature battery date + modules-right = pulseaudio wired-network wireless-network wireguard nordvpn redshift lockscreen dunst packages unread_news unread_mail temperature battery date wm-restack = i3 @@ -252,6 +252,18 @@ label = %{A1:$TERMINAL -e "htop" &:}﬙ %percentage:2%%%{A} #+END_SRC +* TODO Test IPC +#+begin_src conf + [module/demo] + type = custom/ipc + hook-0 = echo foobar + hook-1 = date +%s + hook-2 = whoami + initial = 1 + click-left = polybar-msg -p %pid% hook demo 1 + click-right = polybar-msg -p %pid% hook demo 2 + double-click-left = polybar-msg -p %pid% hook demo 3 +#+end_src * Date #+BEGIN_SRC conf [module/date] @@ -718,33 +730,28 @@ #+begin_src conf [module/wired-network] type = internal/network - interface = enp0s20f0u9u4 + interface = enp0s20f0u6u4 - label-connected = %local_ip% - label-connected-foreground = ${color.fg} + label-connected =  %local_ip% + label-connected-foreground = ${colors.fg} - format-connected-prefix = " " - format-connected = - - label-disconnected = "" - label-disconnected-foreground = ${colors.gray} - - format-disconnected = + label-disconnected =  + label-disconnected-foreground = #777 +#+end_src +#+begin_src conf [module/wireless-network] type = internal/network interface = wlp2s0 - label-connected = %essid% - label-connected-foreground = ${color.fg} - - format-connected-prefix = " " format-connected = - - label-disconnected = "" - label-disconnected-foreground = ${colors.gray} - format-disconnected = + + label-connected = 直 %essid% + label-connected-foreground = ${colors.fg} + + label-disconnected = 睊 + label-disconnected-foreground = #777 #+end_src * Wireguard