mirror of
https://github.com/kuhyx/scripts.git
synced 2026-11-11 16:33:59 +01:00
feat: shorten wifi and ethernet blocks
This commit is contained in:
parent
e59773f2e9
commit
bd6250c0fe
@ -40,7 +40,7 @@ interval=1
|
|||||||
color=#50FA7B
|
color=#50FA7B
|
||||||
|
|
||||||
[ethernet]
|
[ethernet]
|
||||||
command=ip -o -4 addr show enp6s0 | awk '{print " LAN: "$4}' || echo " LAN: down" # for Ethernet
|
command=ip -o -4 addr show enp6s0 | awk '{print " "$4}' || echo " down" # for Ethernet
|
||||||
interval=10
|
interval=10
|
||||||
|
|
||||||
[wifi]
|
[wifi]
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Get the current volume level and mute status
|
# Get the current volume level and mute status
|
||||||
|
|||||||
@ -5,7 +5,7 @@ wifi_interface=$(iw dev | awk '$1=="Interface"{print $2}')
|
|||||||
|
|
||||||
# If no WiFi interface is found, exit
|
# If no WiFi interface is found, exit
|
||||||
if [ -z "$wifi_interface" ]; then
|
if [ -z "$wifi_interface" ]; then
|
||||||
echo " WiFi: down"
|
echo " down"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ signal=$(echo "$wifi_info" | awk '/Signal level/ {print $4}' | tr -d 'level=')
|
|||||||
|
|
||||||
# Output the result
|
# Output the result
|
||||||
if [ -z "$ssid" ]; then
|
if [ -z "$ssid" ]; then
|
||||||
echo " down"
|
echo " down"
|
||||||
else
|
else
|
||||||
echo " $ssid ($signal dBm)"
|
echo " $ssid ($signal dBm)"
|
||||||
fi
|
fi
|
||||||
Loading…
Reference in New Issue
Block a user