add a little documentation and give a spartan default while letting '-x' flag print random hex bytes

This commit is contained in:
Iris Lightshard 2020-10-02 14:09:10 -04:00
parent 2d8eff2298
commit 7f9a4aa11d
Signed by: Iris Lightshard
GPG key ID: 3B7FBC22144E6398

View file

@ -6,9 +6,15 @@
# copyleft 2020 Derek Stevens <drkste@zoho.com> # copyleft 2020 Derek Stevens <drkste@zoho.com>
# MIT License - do whatever you want # MIT License - do whatever you want
# if we're feeling spartan, just print a simple string for the executor
if [ -z $1 ]; then if [ -z $1 ]; then
echo " >>"
# if we pass '-x', spit a few hexadecimal bytes into the executor for eye-candy
elif [ "$1" = "-x" ]; then
od -vAn -N2 -x < /dev/urandom od -vAn -N2 -x < /dev/urandom
# otherwise switch desks
else else
currentDeskNum=$(wmctrl -d | grep -n [*] | awk '{print $1}' | awk -F : '{print $1}') currentDeskNum=$(wmctrl -d | grep -n [*] | awk '{print $1}' | awk -F : '{print $1}')
numDesks=$(wmctrl -d | wc -l) numDesks=$(wmctrl -d | wc -l)