Add colors to Bar Widgets

This commit is contained in:
Linux User
2022-08-16 10:50:49 +00:00
parent 3a35a95ce9
commit 85d64f0ac7
13 changed files with 55 additions and 23 deletions

8
.local/scripts/9994_cpu Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
COLOR1="#990057"
COLOR2="#FF00B2"
usage=$(cat <(grep 'cpu ' /proc/stat) <(sleep 0.3 && grep 'cpu ' /proc/stat) | awk -v RS="" '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}' | cut -d'.' -f1)"%"
echo "^c$COLOR1^^b$COLOR2^  ^b$COLOR1^^c$COLOR2^ $usage ^d^"