add network module

This commit is contained in:
Thomas Dehaeze 2020-04-10 16:37:55 +02:00
parent 0d39bd69d6
commit 42cd11d3ef

View File

@ -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-connected>
label-disconnected = ""
label-disconnected-foreground = ${colors.gray}
format-disconnected = <label-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-connected>
label-disconnected = ""
label-disconnected-foreground = ${colors.gray}
format-disconnected = <label-disconnected>
label-connected = 直 %essid%
label-connected-foreground = ${colors.fg}
label-disconnected = 睊
label-disconnected-foreground = #777
#+end_src
* Wireguard