This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Re: font


Andrew DeFaria wrote:
> Too many things? Other than I/O (which I agree is important)
> of certain Windows only programs what else does rxvt do wrong?

This is getting a bit off-topic, but one thing that
bothers me is "normal" resizing under Windows. I'd
rather it behave like it does under X (and command
windows do under Windows), jumping to even multiples
of lines & columns. I use a tiny zsh script to clean
up (with the added benefit of allowing you to resize
via command line):

-----CUT-----
#!/usr/bin/zsh

# Resize RXVT window to an exact number of LINES & COLUMNS
#
# Usage:
#   fs [LINES] [COLUMNS]
#
# Where LINES or COLUMNS may be:
#
#   <number>            - specify exact value
#   (+|-|*|/)<number>   - value relative to current setting (+1, /2,
etc.)
#   <anything else>     - use current setting (current text region)
#
# 'fs' by itself trims the current window to exactly match its text
region
#
# E.g.:
#   Trim to fit text: fs
#   Set width to 132: fs . 132
#   Set to 24x80:     fs 24 80
#   Add one line:     fs +1
#   Double the width: fs . '*2'  # must quote '*' from the shell

case $1 in
    +[0-9]*|-[0-9]*|\*[0-9]*|/[0-9]*)   ((L = $LINES $1)) ;;
    [0-9]*)                             L=$1 ;;
    *)                                  L=$LINES ;;
esac

case $2 in
    +[0-9]*|-[0-9]*|\*[0-9]*|/[0-9]*)   ((C = $COLUMNS $2)) ;;
    [0-9]*)                             C=$2 ;;
    *)                                  C=$COLUMNS ;;
esac

print $'\e[8;'"$L;${C}t"
-----CUT-----

gsw


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]