Some hacking.
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
. ~/cshenv/lib/vulgar.sh
|
. ~/cshenv/lib/vulgar.sh
|
||||||
|
|
||||||
|
save_block 11 1 15 32
|
||||||
erase_block 11 1 15 32
|
erase_block 11 1 15 32
|
||||||
|
|
||||||
create_button Red 12 2 Red 1
|
create_button Red 12 2 Red 1
|
||||||
@ -50,3 +51,5 @@ do
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
restore_block 11 1 15 32
|
||||||
|
sleep 10
|
||||||
|
|||||||
@ -1,5 +1,23 @@
|
|||||||
. ~/cshenv/lib/vulgar.sh
|
. ~/cshenv/lib/vulgar.sh
|
||||||
|
|
||||||
get_terminal_size rows cols
|
#get_terminal_size rows cols
|
||||||
|
|
||||||
echo "Terminal is ${rows} rows and ${cols} cols"
|
#echo "Terminal is ${rows} rows and ${cols} cols"
|
||||||
|
|
||||||
|
when=`date +"%F %R:%S"`
|
||||||
|
write_string "${when}" 1 120 107 35
|
||||||
|
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
sleep 0.25
|
||||||
|
when=`date +"%R:%S"`
|
||||||
|
write_string "${when}" 1 131 107 35
|
||||||
|
#fill_block_attributes 1 90 1 115 47
|
||||||
|
#fill_block_attributes 1 90 1 115 35
|
||||||
|
#old=`stty -g`
|
||||||
|
#stty -echo #-icanon
|
||||||
|
#stty -echo #-icanon
|
||||||
|
#echo -n "[P7[1000000A[1000000C[19D[35;107m${when}8Q"
|
||||||
|
#stty ${old}
|
||||||
|
done
|
||||||
|
|||||||
@ -21,11 +21,10 @@ send_csi_command()
|
|||||||
shift 1
|
shift 1
|
||||||
|
|
||||||
|
|
||||||
echo -n ''
|
echo -n "[${1}"
|
||||||
echo -n '['
|
|
||||||
|
|
||||||
# First one no ';' prefix....
|
# First one no ';' prefix....
|
||||||
echo -n "${1}"
|
#echo -n "${1}"
|
||||||
shift 1
|
shift 1
|
||||||
|
|
||||||
while [ -n "${1}" ]
|
while [ -n "${1}" ]
|
||||||
@ -45,12 +44,12 @@ send_csi_command()
|
|||||||
|
|
||||||
save_block()
|
save_block()
|
||||||
{
|
{
|
||||||
send_csi_command '$v' $* 0 $* 1
|
send_csi_command '$v' $* 1 $(( 25 + $1 )) $(( 25 + $2 )) $(( 25 + $3 )) $(( 25 + $4 )) 1
|
||||||
}
|
}
|
||||||
|
|
||||||
restore_block()
|
restore_block()
|
||||||
{
|
{
|
||||||
send_csi_command '$v' $* 1 $* 0
|
send_csi_command '$v' $(( 25 + $1 )) $(( 25 + $2 )) $(( 25 + $3 )) $(( 25 + $4 )) 1 $* 1
|
||||||
}
|
}
|
||||||
|
|
||||||
##### END DECCRA Block ##############
|
##### END DECCRA Block ##############
|
||||||
@ -58,7 +57,7 @@ restore_block()
|
|||||||
erase_block()
|
erase_block()
|
||||||
{
|
{
|
||||||
send_csi_command '*x' 2
|
send_csi_command '*x' 2
|
||||||
send_csi_command '$r' ${*} 0
|
fill_block_attributes ${*} 0
|
||||||
send_csi_command '${' ${*}
|
send_csi_command '${' ${*}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,6 +103,10 @@ write_string()
|
|||||||
_str=${_str:1}
|
_str=${_str:1}
|
||||||
_code=`printf '%d' "'$_ch"`
|
_code=`printf '%d' "'$_ch"`
|
||||||
write_char_raw $_code $_row $_col
|
write_char_raw $_code $_row $_col
|
||||||
|
if [ -n "${*}" ]
|
||||||
|
then
|
||||||
|
fill_block_attributes ${_row} ${_col} ${_row} ${_col} ${*}
|
||||||
|
fi
|
||||||
_col=$(( ${_col} + 1 ))
|
_col=$(( ${_col} + 1 ))
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user