add i3 and polybar conf, add new rofi logout screen
This commit is contained in:
17
polybar/scripts/wifi.sh
Executable file
17
polybar/scripts/wifi.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
SSID=$(iwgetid -r)
|
||||
SSIG=$(grep "$(iwgetid -m | awk '{ printf "%s", $1 }')" /proc/net/wireless | awk '{ printf "%i\n", int($3 * 100 / 70) }')
|
||||
IP=$(ip route get 8.8.8.8 | grep -oP 'src \K[^ ]+')
|
||||
SIG=$(echo "$SSIG" | rev | cut -c 2- | rev)
|
||||
|
||||
NETWORK_UP=$(echo "scale=2 ; $(cat /proc/net/dev | awk '/wlo1:/ { print $2 }') / 1024" | bc)
|
||||
NETWORK_DOWN=$(echo "scale=2 ; $(cat /proc/net/dev | awk '/wlo1:/ { print $10 }') / 1024" | bc)
|
||||
|
||||
#wifi off
|
||||
|
||||
if [[ $SSID ]]; then
|
||||
echo "$IP $NETWORK_UP MB/s $NETWORK_DOWN MB/s"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
Reference in New Issue
Block a user