summaryrefslogtreecommitdiff
path: root/.scripts/cpu_py
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-10-01 00:56:51 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-10-01 00:56:51 +0530
commitded37b8f6515772648527fe2a3e9d9d490066ca0 (patch)
tree9f2fe68e715f67bc6685b9e2e14a9947c479bfa8 /.scripts/cpu_py
parent7ce96f4805774b256b4d1f1f7be89ae182dbceca (diff)
minimizing scripts + replacing emojis for fonticons
Diffstat (limited to '.scripts/cpu_py')
-rwxr-xr-x.scripts/cpu_py2
1 files changed, 2 insertions, 0 deletions
diff --git a/.scripts/cpu_py b/.scripts/cpu_py
new file mode 100755
index 0000000..64edafe
--- /dev/null
+++ b/.scripts/cpu_py
@@ -0,0 +1,2 @@
+#!/bin/sh
+printf "%b" "import psutil\nprint('{}%'.format(psutil.cpu_percent(interval=2)))" | python3 | awk '{printf (" %2.1f%",($1))}'