Guest User

Untitled

a guest
Aug 12th, 2025
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. #!/bin/bash -norc
  2. interface=wlan0
  3. link_quality=$(iwconfig $interface | awk '/Link Quality/{print $2}' | cut -f2 -d= | cut -f1 -d/)
  4. percentage=$(echo "scale=2;($link_quality/70)*100" | bc | rev | cut -f2 -d. | rev)
  5. volume=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | cut -f2 -d.)
  6. ssid=$(iwconfig $interface | awk '/ESSID/{print $4}' | cut -f2 -d'"' | cut -f1 -d/)
  7. bitrate=$(iwconfig wlan0 | awk '/Bit/{print $2}' | cut -f2 -d= | cut -f1 -d/)
  8. freq=$(iwconfig wlan0 | awk '/Frequency/{print $2}' | cut -f2 -d: | cut -f1 -d/)
  9. output=$(wpctl status | awk '/*/' | cut -f2 -d. | cut -f1 -d'[' | cut -c 2-99 | head -n 1)
  10. input=$(wpctl status | awk '/*/' | cut -f2 -d. | cut -f1 -d'[' | cut -c 2-99 | tail -1)
  11. echo -e "<txt>WFI: $percentage%\nSND: $volume%</txt>"
  12.  
  13. echo -e "<tool><span font-family='terminus'>$interface</span>\n<span font-family='terminus'>SSID: $ssid</span>\n<span font-family='terminus'>Quality: $percentage%</span>\n<span font-family='terminus'>Bitrate: $bitrate</span><span font-family='terminus'>Mb/s</span>\n<span font-family='terminus'>Frequency: $freq</span><span font-family='terminus'>GHz</span>\n\n<span font-family='terminus'>Audio Output: $output</span>\n<span font-family='terminus'>Audio Input: $input</span></tool>"
  14.  
Advertisement
Add Comment
Please, Sign In to add comment