Starting a bash-curses thing
Vulgarity, cursing... get it?
This commit is contained in:
45
bin/vulgar.sh
Executable file
45
bin/vulgar.sh
Executable file
@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
send_os_command()
|
||||
{
|
||||
_splat=""
|
||||
_suffix=""
|
||||
while [ -n "${1}" ]
|
||||
do
|
||||
[ -n '${_splat}' ] && _splat=${_splat}';'
|
||||
_splat="${_splat}${1}"
|
||||
shift 1
|
||||
done
|
||||
echo "]${_splat}${_suffix}"
|
||||
}
|
||||
|
||||
send_csi_command()
|
||||
{
|
||||
_splat=""
|
||||
_suffix="${1}"
|
||||
shift 1
|
||||
while [ -n "${1}" ]
|
||||
do
|
||||
[ -n '${_splat}' ] && _splat="${_splat}"';'
|
||||
_splat="${_splat}${1}"
|
||||
shift 1
|
||||
done
|
||||
echo ${_splat}
|
||||
echo "[${_splat}${_suffix}"
|
||||
}
|
||||
|
||||
erase_block()
|
||||
{
|
||||
send_csi_command '${' $*
|
||||
}
|
||||
|
||||
fill_block()
|
||||
{
|
||||
send_csi_command '$x' $*
|
||||
}
|
||||
|
||||
|
||||
|
||||
erase_block 20 20 30 30
|
||||
fill_block X 21 21 29 29
|
||||
|
Reference in New Issue
Block a user