From 758aacbec3b35fb9a425dc26be9cdad0f9bbf2a7 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Thu, 21 Jul 2022 22:18:02 +0200 Subject: [PATCH] polybar: network --- polybar/conf.d/mod_network | 30 ++++++++++++++++++++++++++++++ polybar/config | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 polybar/conf.d/mod_network diff --git a/polybar/conf.d/mod_network b/polybar/conf.d/mod_network new file mode 100644 index 0000000..d5d0f83 --- /dev/null +++ b/polybar/conf.d/mod_network @@ -0,0 +1,30 @@ +[modules/network_defaults] + +format-connected = +format-disconnected = + +format-connected-prefix = NW +format-disconnected-prefix = NW + +format-connected-prefix-foreground = ${colors.foreground-alt} +format-disconnected-prefix-foreground = ${colors.foreground-alt} + +label-connected = %ifname% : %local_ip% +label-disconnected = %ifname%: not connected + +[module/wired] +inherit = module/network_defaults +type = internal/network +interface = enp0s25 +interface-type = wired + +[module/wireless] +inherit = module/network_defaults +type = internal/network +interface = wlp3s0 +interface-type = wireless +label-connected = %ifname%@%essid% : %local_ip% + + +format-charging-prefix = "PWR " +format-charging-prefix-foreground =${colors.foreground-alt} diff --git a/polybar/config b/polybar/config index a4d27fa..a4a9739 100644 --- a/polybar/config +++ b/polybar/config @@ -25,7 +25,7 @@ margin-bottom = 5 inherit = bar/defaults modules-left = i3 modules-center = dunst -modules-right = backlight cpu system-cpu-loadavg memory filesystem battery +modules-right = wired wireless backlight cpu system-cpu-loadavg memory filesystem battery tray-position = right tray-padding = 2