Added more dwm-scrips as well as screenshot script making use of maim

This commit is contained in:
2021-01-29 01:09:38 +01:00
parent d586229326
commit c167d62f5a
8 changed files with 57 additions and 11 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
read cpu a b c previdle rest < /proc/stat
prevtotal=$((a+b+c+previdle))
sleep 0.5
read cpu a b c idle rest < /proc/stat
total=$((a+b+c+idle))
cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) ))
icon=""
printf " %s %s \\n" "$icon" "$cpu%"