add a little documentation and give a spartan default while letting '-x' flag print random hex bytes
This commit is contained in:
parent
2d8eff2298
commit
7f9a4aa11d
1 changed files with 6 additions and 0 deletions
6
desks.sh
6
desks.sh
|
@ -6,9 +6,15 @@
|
|||
# copyleft 2020 Derek Stevens <drkste@zoho.com>
|
||||
# MIT License - do whatever you want
|
||||
|
||||
# if we're feeling spartan, just print a simple string for the executor
|
||||
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
|
||||
|
||||
# otherwise switch desks
|
||||
else
|
||||
currentDeskNum=$(wmctrl -d | grep -n [*] | awk '{print $1}' | awk -F : '{print $1}')
|
||||
numDesks=$(wmctrl -d | wc -l)
|
||||
|
|
Loading…
Reference in a new issue