Add iface script

This commit is contained in:
Riyyi
2020-07-14 14:23:43 +02:00
parent 99f13642c1
commit 8d864e5207
4 changed files with 15 additions and 3 deletions
+5 -3
View File
@@ -76,7 +76,7 @@ type = internal/network
interval = 10 interval = 10
interface = wlan0 interface = wlan0
format-connected = %{A1:$HOME/.scripts/panel/wifi-lite.sh:}<label-connected>%{A} format-connected = %{A1:$HOME/.scripts/panel/wifi.sh:}<label-connected>%{A}
format-connected-foreground = ${colors.white-bright} format-connected-foreground = ${colors.white-bright}
label-connected =  %signal%% label-connected =  %signal%%
@@ -90,9 +90,11 @@ type = internal/network
interval = 10 interval = 10
interface = eth0 interface = eth0
format-connected = format-connected = %{A1:$HOME/.scripts/panel/iface.sh:}<label-connected>%{A}
format-connected-foreground = ${colors.white-bright} format-connected-foreground = ${colors.white-bright}
label-connected = 
format-disconnected =  format-disconnected = 
format-disconnected-foreground = ${wmcolors.fgcolor-inactive} format-disconnected-foreground = ${wmcolors.fgcolor-inactive}
@@ -130,7 +132,7 @@ label-discharging = %percentage%% (%time%)
type = custom/script type = custom/script
interval = 30 interval = 30
exec = $HOME/.scripts/panel/battery-lite.sh exec = $HOME/.scripts/panel/battery.sh
format = format =
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
WIRED="${1:-eth0}"
IP="$(ip a show "$WIRED" \
| awk '/inet / { print substr($2, 0, length($2) - 3) }')"
notify-send -r 3 "Wired" "\
Interface: $WIRED
IP: $IP"