Browse Source

Add iface script

master
Riyyi 5 years ago
parent
commit
8d864e5207
  1. 8
      .config/polybar/modules
  2. 0
      .scripts/panel/battery.sh
  3. 10
      .scripts/panel/iface.sh
  4. 0
      .scripts/panel/wifi.sh

8
.config/polybar/modules

@ -76,7 +76,7 @@ type = internal/network
interval = 10
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}
label-connected = %signal%%
@ -90,9 +90,11 @@ type = internal/network
interval = 10
interface = eth0
format-connected =
format-connected = %{A1:$HOME/.scripts/panel/iface.sh:}<label-connected>%{A}
format-connected-foreground = ${colors.white-bright}
label-connected =
format-disconnected =
format-disconnected-foreground = ${wmcolors.fgcolor-inactive}
@ -130,7 +132,7 @@ label-discharging = %percentage%% (%time%)
type = custom/script
interval = 30
exec = $HOME/.scripts/panel/battery-lite.sh
exec = $HOME/.scripts/panel/battery.sh
format =

0
.scripts/panel/battery-lite.sh → .scripts/panel/battery.sh

10
.scripts/panel/iface.sh

@ -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"

0
.scripts/panel/wifi-lite.sh → .scripts/panel/wifi.sh

Loading…
Cancel
Save