From 5979f900325f9ef18a3f37c40bdf5862e4af3338 Mon Sep 17 00:00:00 2001 From: Severin Kaderli Date: Wed, 29 May 2019 14:18:19 +0200 Subject: [PATCH] Add wired network indicator Signed-off-by: Severin Kaderli --- system/.config/polybar/config | 24 +++++++++++++++++++++++- system/.config/polybar/launch | 2 ++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/system/.config/polybar/config b/system/.config/polybar/config index f0aa1c3..482b427 100644 --- a/system/.config/polybar/config +++ b/system/.config/polybar/config @@ -43,7 +43,7 @@ module-margin = 2 modules-left = i3 modules-center = -modules-right = update gmail todo battery volume backlight wlan date power +modules-right = update gmail todo battery volume backlight wlan network date power tray-position = none separator = | @@ -257,6 +257,28 @@ scroll-up = light -A 5 scroll-down = light -U 5 +############################################################################## +# Network indicator # +############################################################################## +[module/network] +type = internal/network +interface = ${env:POLYBAR_NETWORK} + +format-connected = +label-connected = %essid% + +format-disconnected = +label-disconnected = Disconnected + +ramp-signal-0 =  +ramp-signal-1 =  +ramp-signal-2 =  +ramp-signal-3 =  +ramp-signal-4 =  +ramp-signal-foreground = ${settings.foreground-color} + +interval = 1 + ############################################################################## # WiFi indicator # ############################################################################## diff --git a/system/.config/polybar/launch b/system/.config/polybar/launch index 779bb3d..c3d92b5 100755 --- a/system/.config/polybar/launch +++ b/system/.config/polybar/launch @@ -21,9 +21,11 @@ while pgrep -x polybar >/dev/null; do sleep 1; done if [ "${IS_WORK}" = "1" ]; then export POLYBAR_BATTERY="BAT1" export POLYBAR_WLAN="wlp4s0" + export POLYBAR_NETWORK="enp0s31f6" else export POLYBAR_BATTERY="BAT0" export POLYBAR_WLAN="wlp3s0" + export POLYBAR_NETWORK="enp0s31f6" fi # Launch bar1 and bar2