summaryrefslogtreecommitdiff
path: root/awesome/bin
diff options
context:
space:
mode:
authormediocregopher <mediocregopher@gmail.com>2023-08-13 21:34:14 +0200
committermediocregopher <mediocregopher@gmail.com>2023-08-13 21:35:17 +0200
commit1957081c122fe231eb6120192489dd979d214317 (patch)
treeb8cd0812ec3c0452d54cb789ba938e6f0c0e8278 /awesome/bin
parentef8da74f1ae38d9eceb68846fe9ef402c8e30fcf (diff)
Update branch with all changes which could be brought in from private branches
For a while I was keeping a private branch where there were a lot of non-public things included, and that became the de-facto branch while this one lagged. This one is now up-to-date, all private stuff is dealt with via config files which are not committed.
Diffstat (limited to 'awesome/bin')
-rwxr-xr-xawesome/bin/cricketbin2744274 -> 0 bytes
-rwxr-xr-xawesome/bin/scrot-gobin.sh4
-rwxr-xr-xawesome/bin/scrot.sh7
-rwxr-xr-xawesome/bin/sysstats.sh50
4 files changed, 7 insertions, 54 deletions
diff --git a/awesome/bin/cricket b/awesome/bin/cricket
deleted file mode 100755
index b8d5699..0000000
--- a/awesome/bin/cricket
+++ /dev/null
Binary files differ
diff --git a/awesome/bin/scrot-gobin.sh b/awesome/bin/scrot-gobin.sh
deleted file mode 100755
index 33bfc9f..0000000
--- a/awesome/bin/scrot-gobin.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-scrot -o -s "/tmp/shot.png"
-eog /tmp/shot.png
diff --git a/awesome/bin/scrot.sh b/awesome/bin/scrot.sh
new file mode 100755
index 0000000..8a39ac9
--- /dev/null
+++ b/awesome/bin/scrot.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+mkdir -p ~/Screenshots
+f="$HOME/Screenshots/shot-$(date +%s).png"
+scrot -o -s "$f"
+feh "$f"
diff --git a/awesome/bin/sysstats.sh b/awesome/bin/sysstats.sh
deleted file mode 100755
index f42588e..0000000
--- a/awesome/bin/sysstats.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-cd $(dirname "$0")
-
-sep=" | "
-
-out=$(/home/mediocregopher/.config/awesome/bin/cricket \
- --limit 1 \
- --ping-hosts 8.8.8.8 \
- --net-interval "" \
- --disk-interval "" \
- --disk-io-interval "")
-
-function outNum {
- echo "$out" | grep "$1" | grep -oP "$2=\"[0-9]+\"" | grep -oP '[0-9]+'
-}
-
-echo -n "ping:$(outNum "ping result" "tookMSAvg")ms"
-
-echo -n "$sep"
-
-memBarSize=10
-memPer=$(outNum "mem stats" "memUsedPer")
-memUsed=$(expr $memPer / $memBarSize)
-memUnused=$(expr $memBarSize - $memUsed)
-echo -n "mem:"
-for i in $(seq $memUsed); do echo -n "█"; done
-for i in $(seq $memUnused); do echo -n "░"; done
-for i in $(seq $(expr $memBarSize - $memUsed - $memUnused)); do echo -n "░"; done
-
-echo -n "$sep"
-
-cpuBarSize=20
-cpuIdle=$(outNum "cpu stats" "cpuIdle")
-cpuSys=$(outNum "cpu stats" "cpuSystem")
-cpuUser=$(outNum "cpu stats" "cpuUser")
-cpuTot=$(expr $cpuIdle + $cpuSys + $cpuUser)
-function cpuL {
- python -c "print(int($1 / $cpuTot * $cpuBarSize))"
-}
-cpuLIdle=$(cpuL $cpuIdle)
-cpuLSys=$(cpuL $cpuSys)
-cpuLUser=$(cpuL $cpuUser)
-echo -n "cpu:"
-for i in $(seq $cpuLUser); do echo -n "█"; done
-for i in $(seq $cpuLSys); do echo -n "▓"; done
-for i in $(seq $cpuLIdle); do echo -n "░"; done
-for i in $(seq $(expr $cpuBarSize - $cpuLIdle - $cpuLSys - $cpuLUser)); do echo -n "░"; done
-
-echo ""