Re: Ignore size hint for specific applications
Anthony Thyssen <a.thyssen-YlX7AVbyhojX/[email protected]> Tue, 6 Nov 2018 06:57:01 +0000
| Newsgroups | gmane.comp.window-managers.openbox |
|---|---|
| Message-ID | <SYXPR01MB20301433BD13020CF2C1857AB2CB0@SYXPR01MB2030.ausprd01.prod.outlook.com> |
--===============2207464386154300840==
Content-Language: en-AU
Content-Type: multipart/alternative;
boundary="_000_SYXPR01MB20301433BD13020CF2C1857AB2CB0SYXPR01MB2030ausp_"
--_000_SYXPR01MB20301433BD13020CF2C1857AB2CB0SYXPR01MB2030ausp_
Content-Type: text/plain; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable
That is quite normal. Many older terminal programs (urxvt, xterm) define t=
here size based on the number of rows and columns of characters, rather tha=
n on a pixel dimension.
I myself had to deail with this as I wanted to place xterms in specific til=
e-like layout on a display that automatically adjusts according to the phys=
ical display size.
For this I ended up actually picking the font the xterm's is to use and fro=
m that calculating the pixel dimensions that would result for that window, =
so I can either define window positions, or adjust the row count (fixed 80 =
column width) to fit the desired height space available. The script once =
made has been in general use for more than ten years, only being tweeked oc=
casionally due to window manager changes (title bar size and window border =
settings).
The script does all the calculations, sets xresources for the terminal wind=
ows, and exports some environment variables for the xterm geometry (size an=
d position) on screen.
Some code extracts (watch out for unicode substitutions by mailers)....
stored in a script "xset_resources" and run using eval `xset_resources=
` as part of the x window client start up sequence.
# ----- Collect Server information -----
# Get Display width and height...
eval `xrdb -symbols -screen | sed -n '/^-D\(WIDTH\|HEIGHT\)/{s/-D/X_/gp;}'`
# ----- Basic Positionings of terminals -----
#
# These values may also depend on my window manager setup
x1pos=3D5 # position of first (left) xterm window (gap for left gnome-=
panel)
y1pos=3D100 # space above xterm window, for other popup applications.
x2pos=3D'' # X location of right xterm windows calculated below
y2pos=3D$y1pos # Y location of right xterm is same as the first
wgap=3D5 # window gaps (5) -- not used if $x2pos is defined
hbot=3D2 # enforced space at bottom of display (above a panel)
hgap=3D0 # an exact vertical gap between terminals (if non-zero)
# XTerm application extras
wapp=3D15 # xterms extra width (scrollbar (9+2), text sep (2x2)
happ=3D4 # xterm extra height: internal seperation of text to window e=
dge
# OpenBox Decorations ( title is display DPI dependant? )
openbox_wdcr=3D4 # borders (2) X 2
openbox_hdcr=3D31 # titlebar (20) + handle (3) + borders (2) X 4 =3D> 3=
1
# other previous window manager constants left out.
xfce_left=3D60 # icons=3D48 2*( margin=3D3 box=3D1 magrin=3D2 )
xfce_bottom=3D28 # icons=3D16 2*( margin=3D3 box=3D1 magrin=3D2 )
# ----- Display Size (Font and position changes) -----
# this gets quite complex... one example shown...
if [ "$X_WIDTH" -gt "1600" ]; then # ------ Wide Laptop Display ------
[ "$VERBOSE" ] && echo "HDMI or Multi Screen Displays (Width>1600)"
font_w=3D9; font_h=3D15 # Standard xterm "large" font
x1pos=3D50; wgap=3D30 # increase intra-window gaps
elif [ "$X_WIDTH" -eq "1400" ] ||
[ "$X_WIDTH" -eq "1280" ]; then # ------- Solaris/PC Display ------=
--
[ "$VERBOSE" ] && echo "PC Display (Width=3D1400 or Width=3D1280)"
font_w=3D7; font_h=3D13 # Slightly bigger font
#...
else # ------- unknown display size ------
echo >&2 "x_set_resources: unknown display size ${X_WIDTH}x${X_HEIGHT}"
font_w=3D6; font_h=3D13 # Default font
fi
# Font selection also complex...
# Font selection using the pixel width and height... (Actually this is also=
quite complex)
FONT=3D"-misc-fixed-medium-r-*-*-${font_h}-*-75-75-c-${font_w}0-iso10646-1"
BFONT=3D"-misc-fixed-bold-r-*-*-${font_h}-*-75-75-c-${font_w}0-iso10646-1"
# ----- Adjustments for window manager and panels -----
# Assume no panels will be in use
X_LEFT_MARGIN=3D0
X_TOP_MARGIN=3D0
X_BOTTOM_MARGIN=3D0
# Assume openbox decorations for windows
wdcr=3D$openbox_wdcr
hdcr=3D$openbox_hdcr
# xfce4-panel
X_LEFT_MARGIN=3D$xfce_left
X_BOTTOM_MARGIN=3D$xfce_bottom
# add margins to the windows appropriatally
x1pos=3D`expr $x1pos + $X_LEFT_MARGIN`
y1pos=3D`expr $y1pos + $X_TOP_MARGIN`
hbot=3D`expr $hbot + $X_BOTTOM_MARGIN`
# ----- XTerm Size Calculations -----
#
# Calculate placement xterm windows to fit font and display settings
width=3D"`expr $font_w \* 80 + $wapp `" # width =3D 80 columns + app wi=
dth
height=3D"`expr "$X_HEIGHT" - $y1pos - $hdcr - $happ - $hbot`"
# height space available to use
rows=3D`expr $height / $font_h` # number of rows for large xter=
m
[ ! "$x2pos" ] && # calc for side by side arrangmen=
t?
x2pos=3D"`expr $x1pos + $width + $wdcr + $wgap`" # x2pos =3D width + wind=
ow gaps
STDGEOM=3D"${width}x${height}" # standard window size (pixels)
XTERMGEOM_L=3D"80x${rows}+${x1pos}+${y1pos}" # left side xterm
XTERMGEOM_R=3D"80x${rows}+${x2pos}+${y2pos}" # right side xterm
# Set up a two vertically stacked windows on the left hand side
height=3D"`expr $height - $hdcr - $happ - $hgap`" # space lost by extra xte=
rm
rows=3D`expr $height / $font_h` # rows to divide between two te=
rms
rows2=3D`expr $rows \* 1 / 4` # divide text over two windows
rows1=3D`expr $rows - $rows2`
XTERMGEOM_L1=3D"80x${rows1}+${x1pos}+${y1pos}" # left top xterm window geo=
metry
# If no gap given, center lower window in the space left
height=3D`expr $height - $rows \* $font_h ` # more space lost to the tex=
t
[ "$hgap" -eq 0 ] && hgap=3D`expr $height / 2` # gap is half the remaining =
space
y2pos=3D`expr $y1pos + $rows1 \* $font_h + $hdcr + $happ + $hgap`
XTERMGEOM_L2=3D"80x${rows2}+${x1pos}+${y2pos}"
# use the upper left window size for default xterm size (with minimum)
[ ${rows1} -lt 25 ] && rows1=3D25
XTERMGEOM=3D"80x${rows1}"
# ------ Set Resources and Output Environmnt ------
#
# Set X resources, including the font I picked above...
#
# Do NOT let xrdb use "mcpp" for preprocessing.
# As mcpp adds a space at end of defines, unless an option -@old or -@kr is
# added (which cannot be added by users)
#
( cd; # go home in a sub-shell as a precaution
xrdb -cpp /bin/cpp \
-DHOME=3D"$HOME" -DSTDGEOM=3D"$STDGEOM" \
-DFONT=3D"$FONT" -DBFONT=3D"$BFONT" \
-merge .Xresources
)
echo "X_WIDTH=3D\"$X_WIDTH\""
echo "X_HEIGHT=3D\"$X_HEIGHT\""
echo "STDGEOM=3D\"$STDGEOM\""
echo "XTERMGEOM=3D\"$XTERMGEOM\""
echo "XTERMGEOM_L=3D\"$XTERMGEOM_L\""
echo "XTERMGEOM_R=3D\"$XTERMGEOM_R\""
echo "XTERMGEOM_L1=3D\"$XTERMGEOM_L1\""
echo "XTERMGEOM_L2=3D\"$XTERMGEOM_L2\""
[ "$VERBOSE" ] && echo "FONT=3D\"$FONT\""
[ "$VERBOSE" ] && echo "BFONT=3D\"$BFONT\""
echo 'export X_WIDTH X_HEIGHT STDGEOM XTERMGEOM'
echo 'export XTERMGEOM_L XTERMGEOM_R XTERMGEOM_L1 XTERMGEOM_L2'
Enjoy...
________________________________
From: openbox <[email protected]> on behalf of sunnycemetery@gmai=
l.com <[email protected]>
Sent: Thursday, 1 November 2018 10:39:01 PM
To: [email protected]
Subject: Re: [openbox] Ignore size hint for specific applications
> I'm using OpenBox as my window manager, and I have some hot keys configur=
ed to move windows into certain areas of the screen with a specified window=
size. All windows are respecting this, except urxvt which is calculating i=
ts size based on the font size of the characters it is displaying.
Have you tried using percentages in your resize actions? XTerm (and most te=
rminal emulators, I imagine) reports its window size as $COLUMNS =D7 $LINES=
, yet sizing it to, say, 50% of the screen results in the correct pixel siz=
e. Example:
<action name=3D"MoveResizeTo"> <width>50%</width> <height>50%</height> <x>-=
0</x> <y>-0</y> </action>
This is one of those quirks that initially bothered me but has since become=
irrelevant.
_______________________________________________
openbox mailing list
[email protected]
http://icculus.org/mailman/listinfo/openbox<http://icculus.org/mailman/list=
info/openbox>
--_000_SYXPR01MB20301433BD13020CF2C1857AB2CB0SYXPR01MB2030ausp_
Content-Type: text/html; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"><!-- P {margin-top:0;margi=
n-bottom:0;} --></style>
</head>
<body dir=3D"ltr">
<div id=3D"divtagdefaultwrapper" style=3D"font-size:12pt;color:#000000;font=
-family:Calibri,Helvetica,sans-serif;" dir=3D"ltr">
<p style=3D"margin-top:0;margin-bottom:0">That is quite normal. Many =
older terminal programs (urxvt, xterm) define there size based on the numbe=
r of rows and columns of characters, rather than on a pixel dimension.<br>
<br>
I myself had to deail with this as I wanted to place xterms in specific til=
e-like layout on a display that automatically adjusts according to the phys=
ical display size.<br>
<br>
For this I ended up actually picking the font the xterm's is to use an=
d from that calculating the pixel dimensions that would result for that win=
dow, so I can either define window positions, or adjust the row count (fixe=
d 80 column width) to fit the desired height
space available. The script once made has been in general use =
for more than ten years, only being tweeked occasionally due to window=
manager changes (title bar size and window border settings).</p>
<p style=3D"margin-top:0;margin-bottom:0"><br>
</p>
<p style=3D"margin-top:0;margin-bottom:0">The script does all the calculati=
ons, sets xresources for the terminal windows, and exports some environment=
variables for the xterm geometry (size and position) on screen.<br>
<br>
Some code extracts (watch out for unicode substitutions by mailers)....</p>
<p style=3D"margin-top:0;margin-bottom:0">stored in a script "xset_res=
ources" and run using eval `xset_resources`&n=
bsp; as part of the x window client start up sequence.<br>
<br>
</p>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># ----- Col=
lect Server information -----</span></div>
<div><span style=3D"font-size: 12pt; font-family: Consolas, Courier, monosp=
ace;"># Get Display width and height...</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">eval `xrdb =
-symbols -screen | sed -n '/^-D\(WIDTH\|HEIGHT\)/{s/-D/X_/gp;}'`</span></di=
v>
<div><br>
</div>
<br>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># ----- Bas=
ic Positionings of terminals -----</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">#</span></d=
iv>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># These val=
ues may also depend on my window manager setup</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">x1pos=3D5&n=
bsp; # position of first (left) xterm window (gap for left gn=
ome-panel)</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">y1pos=3D100=
# space above xterm window, for other popup applications.</sp=
an></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">x2pos=3D''&=
nbsp; # X location of right xterm windows calculated below</sp=
an></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">y2pos=3D$y1=
pos # Y location of right xterm is same as the first</span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">wgap=3D5&nb=
sp; # window gaps (5) -- not used if $x2pos is defined</span>=
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">hbot=3D2&nb=
sp; # enforced space at bottom of display (above a panel)</sp=
an></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">hgap=3D0&nb=
sp; # an exact vertical gap between terminals (if non-zero)</=
span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># XTerm app=
lication extras</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">wapp=3D15&n=
bsp; # xterms extra width (scrollbar (9+2), text sep (2x2)</sp=
an></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">happ=3D4&nb=
sp; # xterm extra height: internal seperation of text to wind=
ow edge</span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># OpenBox D=
ecorations ( title is display DPI dependant? )</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">openbox_wdc=
r=3D4 # borders (2) X 2</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">openbox_hdc=
r=3D31 # titlebar (20) + handle (3) + borders (2) X 4 =
=3D> 31</span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># other pre=
vious window manager constants left out.</span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">xfce_left=
=3D60 # icons=3D48 2*( margin=3D3 box=3D1 =
magrin=3D2 )</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">xfce_bottom=
=3D28 # icons=3D16 2*( margin=3D3 box=3D1 magrin=
=3D2 )</span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># ----- Dis=
play Size (Font and position changes) -----</span></div>
<div><br>
</div>
<span style=3D"font-family: Consolas, Courier, monospace;"># this gets quit=
e complex... one example shown...</span><br>
<div><span style=3D"font-family: Consolas, Courier, monospace;">if [ "=
$X_WIDTH" -gt "1600" ]; then # ------ Wi=
de Laptop Display ------</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"> [ &q=
uot;$VERBOSE" ] && echo "HDMI or Multi Screen Displays (Width>=
1600)"</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"> font=
_w=3D9; font_h=3D15 =
# Standard xterm "large" font</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"> x1po=
s=3D50; wgap=3D30 &n=
bsp; # increase intra-window gaps</span></div>
<div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">elif [ &quo=
t;$X_WIDTH" -eq "1400" ] ||</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"> &nbs=
p; [ "$X_WIDTH" -eq "1280" ]; then #=
------- Solaris/PC Display --------</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"> [ &q=
uot;$VERBOSE" ] && echo "PC Display (Width=3D1400 or Width=3D1280=
)"</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"> font=
_w=3D7; font_h=3D13 =
# Slightly bigger font</span></div>
<span style=3D"font-family: Consolas, Courier, monospace;"><br>
</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">#...</span>=
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"><br>
</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">
<div>else &nb=
sp; # ------- unknown disp=
lay size ------</div>
<div> echo >&2 "x_set_resources: unknown display size ${X_WID=
TH}x${X_HEIGHT}"</div>
<div> font_w=3D6; font_h=3D13  =
; # Default font</div>
<div><br>
</div>
fi</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"><br>
</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># Font sele=
ction also complex...</span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"><br>
</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># Font sele=
ction using the pixel width and height... </span><span style=3D"font-f=
amily: Consolas, Courier, monospace;">(Actually this is </span><span s=
tyle=3D"font-family: Consolas, Courier, monospace;">also
</span><span style=3D"font-family: Consolas, Courier, monospace;">quite com=
plex)</span></div>
<div>
<div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">FONT=3D&quo=
t;-misc-fixed-medium-r-*-*-${font_h}-*-75-75-c-${font_w}0-iso10646-1"<=
/span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">BFONT=3D&qu=
ot;-misc-fixed-bold-r-*-*-${font_h}-*-75-75-c-${font_w}0-iso10646-1"</=
span></div>
<div><br>
</div>
</div>
<div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># ----- Adj=
ustments for window manager and panels -----</span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># Assume no=
panels will be in use</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">X_LEFT_MARG=
IN=3D0</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">X_TOP_MARGI=
N=3D0</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">X_BOTTOM_MA=
RGIN=3D0</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"><br>
</span></div>
<div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># Assume op=
enbox decorations for windows</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">wdcr=3D$ope=
nbox_wdcr</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">hdcr=3D$ope=
nbox_hdcr</span></div>
<div><br>
</div>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># xfce4-pan=
el</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">X_LEFT_MARG=
IN=3D$xfce_left</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">X_BOTTOM_MA=
RGIN=3D$xfce_bottom</span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># add margi=
ns to the windows appropriatally</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">x1pos=3D`ex=
pr $x1pos + $X_LEFT_MARGIN`</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">y1pos=3D`ex=
pr $y1pos + $X_TOP_MARGIN`</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">hbot=3D`exp=
r $hbot + $X_BOTTOM_MARGIN`</span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># ----- XTe=
rm Size Calculations -----</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">#</span></d=
iv>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># Calculate=
placement xterm windows to fit font and display settings</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">width=3D&qu=
ot;`expr $font_w \* 80 + $wapp `" # width =3D 80 co=
lumns + app width</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">height=3D&q=
uot;`expr "$X_HEIGHT" - $y1pos - $hdcr - $happ - $hbot`"</sp=
an></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"> &nbs=
p; &n=
bsp; # height space=
available to use</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">rows=3D`exp=
r $height / $font_h` # numbe=
r of rows for large xterm</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">[ ! "$=
x2pos" ] && &nb=
sp; # calc for side by side arrangment?</span></=
div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"> x2po=
s=3D"`expr $x1pos + $width + $wdcr + $wgap`" # x2pos =3D width + =
window gaps</span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">STDGEOM=3D&=
quot;${width}x${height}" &nbs=
p; # standard window size (pixels)</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">XTERMGEOM_L=
=3D"80x${rows}+${x1pos}+${y1pos}" # left side xterm</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">XTERMGEOM_R=
=3D"80x${rows}+${x2pos}+${y2pos}" # right side xterm</span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># Set up a =
two vertically stacked windows on the left hand side</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">height=3D&q=
uot;`expr $height - $hdcr - $happ - $hgap`" # space lost by extra xter=
m</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">rows=3D`exp=
r $height / $font_h` # rows =
to divide between two terms</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">rows2=3D`ex=
pr $rows \* 1 / 4` # =
divide text over two windows</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">rows1=3D`ex=
pr $rows - $rows2`</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">XTERMGEOM_L=
1=3D"80x${rows1}+${x1pos}+${y1pos}" # left top xterm window=
geometry</span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># If no gap=
given, center lower window in the space left</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">height=3D`e=
xpr $height - $rows \* $font_h ` # more space lost to the text=
</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">[ "$hg=
ap" -eq 0 ] && hgap=3D`expr $height / 2` # gap is half the remaining s=
pace</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">y2pos=3D`ex=
pr $y1pos + $rows1 \* $font_h + $hdcr + $happ + $hgap`</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">XTERMGEOM_L=
2=3D"80x${rows2}+${x1pos}+${y2pos}"</span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># use the u=
pper left window size for default xterm size (with minimum)</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">[ ${rows1} =
-lt 25 ] && rows1=3D25</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">XTERMGEOM=
=3D"80x${rows1}"</span></div>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># ------ Se=
t Resources and Output Environmnt ------</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">#</span></d=
iv>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># Set X res=
ources, including the font I picked above...</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">#</span></d=
iv>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># Do NOT le=
t xrdb use "mcpp" for preprocessing.</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># As mcpp a=
dds a space at end of defines, unless an option -@old or -@kr is</span></di=
v>
<div><span style=3D"font-family: Consolas, Courier, monospace;"># added (wh=
ich cannot be added by users)</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">#</span></d=
iv>
<div><span style=3D"font-family: Consolas, Courier, monospace;">( cd; =
# go home in a sub-shell as a precaution</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"> xrdb=
-cpp /bin/cpp \</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"> &nbs=
p; -DHOME=3D"$HOME" -DSTDGEOM=3D"$STDGEOM"=
; \</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"> &nbs=
p; -DFONT=3D"$FONT" -DBFONT=3D"$BFONT"&nb=
sp; \</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;"> &nbs=
p; -merge .Xresources</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">)</span></d=
iv>
<div><br>
</div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">echo "=
X_WIDTH=3D\"$X_WIDTH\""</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">echo "=
X_HEIGHT=3D\"$X_HEIGHT\""</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">echo "=
STDGEOM=3D\"$STDGEOM\""</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">echo "=
XTERMGEOM=3D\"$XTERMGEOM\""</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">echo "=
XTERMGEOM_L=3D\"$XTERMGEOM_L\""</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">echo "=
XTERMGEOM_R=3D\"$XTERMGEOM_R\""</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">echo "=
XTERMGEOM_L1=3D\"$XTERMGEOM_L1\""</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">echo "=
XTERMGEOM_L2=3D\"$XTERMGEOM_L2\""</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">[ "$VE=
RBOSE" ] && echo "FONT=3D\"$FONT\""</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">[ "$VE=
RBOSE" ] && echo "BFONT=3D\"$BFONT\""</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">echo 'expor=
t X_WIDTH X_HEIGHT STDGEOM XTERMGEOM'</span></div>
<div><span style=3D"font-family: Consolas, Courier, monospace;">echo 'expor=
t XTERMGEOM_L XTERMGEOM_R XTERMGEOM_L1 XTERMGEOM_L2'</span></div>
<div><br>
</div>
<br>
</div>
<div></div>
<div><br>
</div>
</div>
<p></p>
<p style=3D"margin-top:0;margin-bottom:0"><br>
</p>
<p style=3D"margin-top:0;margin-bottom:0">Enjoy...</p>
<p style=3D"margin-top:0;margin-bottom:0"><br>
</p>
</div>
<hr style=3D"display:inline-block;width:98%" tabindex=3D"-1">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st=
yle=3D"font-size:11pt" color=3D"#000000"><b>From:</b> openbox <openbox-b=
[email protected]> on behalf of [email protected] <sunnycemete=
[email protected]><br>
<b>Sent:</b> Thursday, 1 November 2018 10:39:01 PM<br>
<b>To:</b> [email protected]<br>
<b>Subject:</b> Re: [openbox] Ignore size hint for specific applications</f=
ont>
<div> </div>
</div>
<div>> I'm using OpenBox as my window manager, and I have some hot keys =
configured to move windows into certain areas of the screen with a specifie=
d window size. All windows are respecting this, except urxvt which is calcu=
lating its size based on the font size
of the characters it is displaying.<br>
<br>
Have you tried using percentages in your resize actions? XTerm (and most te=
rminal emulators, I imagine) reports its window size as $COLUMNS =D7 $LINES=
, yet sizing it to, say, 50% of the screen results in the correct pixel siz=
e. Example:<br>
<br>
<action name=3D"MoveResizeTo"> <width>50%</width&g=
t; <height>50%</height> <x>-0</x> <y>-0</y=
> </action><br>
<br>
This is one of those quirks that initially bothered me but has since become=
irrelevant.<br>
_______________________________________________<br>
openbox mailing list<br>
[email protected]<br>
<a href=3D"http://icculus.org/mailman/listinfo/openbox">http://icculus.org/=
mailman/listinfo/openbox</a>
</div>
</body>
</html>
--_000_SYXPR01MB20301433BD13020CF2C1857AB2CB0SYXPR01MB2030ausp_--
--===============2207464386154300840==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18Kb3BlbmJveCBt
YWlsaW5nIGxpc3QKb3BlbmJveEBpY2N1bHVzLm9yZwpodHRwOi8vaWNjdWx1cy5vcmcvbWFpbG1h
bi9saXN0aW5mby9vcGVuYm94
--===============2207464386154300840==--