Added more dwm-scrips as well as screenshot script making use of maim
This commit is contained in:
Executable
+11
@@ -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%"
|
||||
|
||||
Reference in New Issue
Block a user