Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'One-liner [Arranging Terminal windows]' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
One-liner [Arranging Terminal windows]
Authored by: ubi on Nov 06, '03 12:29:23AM

Thanks for the tip. I never knew about printf as a sh/bash command. Cool. The only thing my C code does better is handle a variable number of arguments. Here's the suggested bash function:

function xgeom { printf '^[[8;%d;%dt^[[3;%d;%dt' $@ ; }



[ Reply to This | # ]
One-liner [Arranging Terminal windows]
Authored by: kmue on Nov 06, '03 04:22:13AM
Nice! Its easier to cut 'n pasta if you use escape codes:

xgeom() { printf '\033[\033[8;%d;%dt\033[\033[3;%d;%dt' $@; }


[ Reply to This | # ]