Skip to content

Instantly share code, notes, and snippets.

View stupid-kid-af's full-sized avatar
🎯
Focusing

Ashutosh Tripathi stupid-kid-af

🎯
Focusing
  • Pale Blue Dot
View GitHub Profile
@stupid-kid-af
stupid-kid-af / dwm_status.sh
Created October 21, 2022 06:19 — forked from deadjakk/dwm_status.sh
Outputs status information to dwm status bar.
#!/bin/bash
# Original source: https://raw.githubusercontent.com/kaihendry/dotfiles/master/bin/dwm_status
# Network speed stuff stolen from http://linuxclues.blogspot.sg/2009/11/shell-script-show-network-speed.html
print_wifi() {
ip=$(ip route get 8.8.8.8 2>/dev/null|grep -Eo 'src [0-9.]+'|grep -Eo '[0-9.]+')
if=wlan0
while IFS=$': \t' read -r label value
do
case $label in SSID) SSID=$value