]> git.r.bdr.sh - rbdr/dotfiles/blame - config/sway/status.sh
Update deps, fix for linux
[rbdr/dotfiles] / config / sway / status.sh
CommitLineData
9252e5c9
RBR
1bat_capacity=$(cat /sys/class/power_supply/macsmc-battery/capacity)
2bat_status=$(cat /sys/class/power_supply/macsmc-battery/status)
3datestr=$(date +'%Y-%m-%d %H:%M:%S')
4drive=$(df -h / --output=avail | tail -n 1 | awk '{$1=$1};1')
5wifi_status=$(nmcli -t -f IN-USE,BARS,SSID dev wifi | rg '^\*')
6wifi_bars=$(echo ${wifi_status} | cut -d':' -f 2)
7wifi_ssid=$(echo ${wifi_status} | cut -d':' -f 3)
8
9echo "${wifi_bars} ${wifi_ssid} | ${drive} | ${bat_capacity}% [${bat_status:0:1}] | ${datestr}"