* usr/lib/byobu/include/mondrian:

- simply and speed up using perl
This commit is contained in:
Dustin Kirkland 2012-02-17 01:01:20 -06:00
commit e1438899c6
2 changed files with 3 additions and 8 deletions

3
debian/changelog vendored
View file

@ -1,6 +1,7 @@
byobu (5.13) unreleased; urgency=low byobu (5.13) unreleased; urgency=low
* UNRELEASED * usr/lib/byobu/include/mondrian:
- simply and speed up using perl
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 16 Feb 2012 23:58:36 -0600 -- Dustin Kirkland <kirkland@ubuntu.com> Thu, 16 Feb 2012 23:58:36 -0600

View file

@ -25,14 +25,8 @@ trap "tput reset" EXIT HUP INT QUIT TERM KILL ILL TRAP ABRT BUS FPE USR1 SEGV US
if [ "$1" = "color" ] && [ -n "$2" ]; then if [ "$1" = "color" ] && [ -n "$2" ]; then
i=0 i=0
out= out=
tput setab "$2"
tput setaf "$2"
count=$(stty size | awk '{print $1*$2}') count=$(stty size | awk '{print $1*$2}')
while [ $i -lt $count ]; do perl -e "print color 'reset'; printf \"\x1b[48;5;${2}m%${count}s\", \" \";";
out="$out "
i=$((i+1))
done
printf "$out"
head -n1 head -n1
exit 0 exit 0
fi fi