[dwmstatus] Add graphics for status2d, obsolete script
This commit is contained in:
parent
ae43b0bc90
commit
412530d2e4
1 changed files with 11 additions and 3 deletions
14
dwmstatus
14
dwmstatus
|
@ -1,8 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
bat="$(cat /sys/class/power_supply/BAT1/capacity)%"
|
||||
t="$(date '+%d/%m %T')"
|
||||
########################################
|
||||
# /!\ THIS SCRIPT IS OBSOLETE /!\ #
|
||||
# Use slstatus instead #
|
||||
# https://tools.suckless.org/slstatus/ #
|
||||
########################################
|
||||
|
||||
xsetroot -name "$t $bat"
|
||||
bat="$(awk 'BEGIN{c[0]="ff0000";c[1]="ff8800";c[2]="ddff00";c[3]="00ff00";}{print "^r0,7,2,4^^r2,4,22,10^^c#000000^^r3,5,20,8^^c#"c[int(($1-1)/25)]"^^r"3+20-int($1/5)",5,"int($1/5)",8^^f24^^d^"}' /sys/class/power_supply/BAT1/capacity)"
|
||||
t="$(date '+%d/%m %T')"
|
||||
wifi="$(nmcli -f ACTIVE,SIGNAL,BARS dev wifi list | grep "yes")"
|
||||
wifi_lvl="$(echo $wifi | awk 'BEGIN{c[0]="ff0000";c[1]="ff8800";c[2]="ddff00";c[3]="00ff00";}/yes/{print "^c#"c[int(($2-1)/25)]"^"$3}')"
|
||||
|
||||
xsetroot -name "$t $bat $wifi_lvl"
|
||||
|
||||
sleep 5s
|
||||
|
|
Loading…
Reference in a new issue