[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] groffview shell script
From: |
Bernd Warken |
Subject: |
Re: [Groff] groffview shell script |
Date: |
Wed, 28 Nov 2001 15:23:21 +0100 |
User-agent: |
Mutt/1.2.5i |
On Wed, Nov 28, 2001 at 10:55:23AM +0000, Ralph Corderoy wrote:
>
> Hi Bernd,
>
> > In a later version, there should be an automatic detection if X75 or
> > X100 is better.
>
> Here's a first stab.
>
> xset q |
> awk '
> BEGIN {
> FS = "/"
> f = "75dpi"
> }
> {
> for (i = 1; i <= NF; i++) {
> if ($i ~ /^(75|100)dpi$/) {
> f = $i
> exit
> }
> }
> }
> END {
> print f
> }
> '
>
Good idea, thank you :-) Tho the xset output might not be reliable
everywhere it is a good starting point. But I would shorten it to a
test on `grep /100dpi', such as
if -n "$DISPLAY"; then
if xset q | grep "/100dpi" >/dev/null; then resolution=100
else resolution=75
fi
... -T X$resolution
else
...-T latin1 | less
fi
Bernd Warken
- [Groff] groffview shell script, Bernd Warken, 2001/11/27
- Re: [Groff] groffview shell script, Ralph Corderoy, 2001/11/28
- Re: [Groff] groffview shell script,
Bernd Warken <=
- Re: [Groff] groffview shell script, Stewart C. Russell, 2001/11/28
- Re: [Groff] groffview shell script, Larry Jones, 2001/11/28
- Re: [Groff] groffview shell script, Ralph Corderoy, 2001/11/28
- Message not available
- Re: [Groff] groffview shell script, Bernd Warken, 2001/11/29
- Message not available
- Re: [Groff] groffview shell script, Bernd Warken, 2001/11/29
- Re: [Groff] groffview shell script, Stewart C. Russell, 2001/11/30
- Re: [Groff] groffview shell script, Ralph Corderoy, 2001/11/30
- Re: [Groff] groffview shell script, Bernd Warken, 2001/11/30
- Re: [Groff] groffview shell script, Colin Watson, 2001/11/30
- Re: [Groff] groffview shell script, Bernd Warken, 2001/11/30