Gentoo Archives: gentoo-user

From: Floyd Anderson <f.a@××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: How to set size to windows in Openbox in local config [SOLVED]
Date: Thu, 20 Apr 2017 03:57:50
Message-Id: 20170420035726.GA4514@31c0.net
In Reply to: Re: [gentoo-user] Re: How to set size to windows in Openbox in local config [SOLVED] by Miroslav Rovis
1 On Do, 13 Apr 21:55:29 +0200
2 Miroslav Rovis <miro.rovis@××××××××××××××.hr> wrote:
3 >ERRATA: I wrote...
4 >
5 >On 170413-21:19+0200, Miroslav Rovis wrote:
6 >...
7 >
8 >[... I wrote]:
9 >> Only ERRATA may follow in the topic, as far as I am concerned.
10 >
11 >But I forgot floyd has got a "patch to keep the window position while
12 >resizing the font" and offered it:
13 >
14 >https://marc.info/?l=gentoo-user&m=149205691530349&w=2
15 >
16 >And I, in my reply, accepted to try and apply it.
17 >
18 >So, it depends on him if this topic is over or not.
19 >
20 >It's very related, so probably best not to do any new subject for it.
21
22 Hi Miroslav,
23
24 back from some computer-free holidays, I haven’t forgotten that I owe
25 you a patch. Study my attached approach and if you like, apply the patch
26 at your own risk (it should be clean applicable to the currently latest
27 upstream commit [1]).
28
29 If you have any questions or ideas, get back to me. But keep in mind,
30 I’m neither a developer nor a GUI programmer guru.
31
32 It has some limits and/or doesn’t resolve certain issues:
33 - the patch assumes ‘NorthWest’ as the reference point for the window
34 gravity.
35 - if terminal background is colourised via escape sequences (as Andrew
36 mentioned in [2]), you may notice that a borderless window colourise
37 only full cells (of rows/columns), not the gap between a terminal
38 cell end and the window edge. Framed windows seems not to be
39 affected by this behaviour.
40 - window edges flutters/flickers while resizing fonts (independently
41 from step-size and also when using escape sequences for resizing)
42 - toggling a window between normal -> fullscreen/maximised state ->
43 and back, you may notice that the window size has changed. I don’t
44 know the reason for this issue (which occurs independently from the
45 urxvt-font-size extension and my patch).
46 - different window manager (WM) probably produces different
47 behaviours. Think about a WM that try to imitate a tiling window
48 manager by automatic resizing/positioning within a snapping area
49 near the desktop edges.
50 - patch is tested to my moderate needs but not fully with all kinds of
51 fonts, WMs, multi monitor environment, etc.
52 - ...
53
54 The patch is too unimportant to solve some/all of the above issues
55 and/or bloating up the urxvt extension script. And additionally,
56 rxvt-unicode won’t and doesn’t expose all Xlib functions (such as
57 XGetWindowAttributes) in urxvtperl, the embedded perl interpreter. So it
58 will be tricky sometimes, to solve a specific behaviour.
59
60 My used and tested urxvt-font-size related Xresource settings:
61 URxvt.font-size.keepwin: true
62 URxvt.font-size.step: 4
63 URxvt.keysym.C-0xffad: font-size:decrease
64 URxvt.keysym.C-0xffab: font-size:increase
65 URxvt.keysym.C-0xffb0: font-size:reset
66
67 Since I use the default keysyms for font-size:{decrease,increase,reset}
68 in Vim, I changed those defaults to C-KP_Substract (C-0xffad), C-KP_Add
69 (C-0xffab), C-KP_0 (C-0xffb0) like in Firefox and others.
70
71
72 References:
73 [1] <https://github.com/majutsushi/urxvt-font-size/commit/0cc2624489fb60fcebf85d5c4dd62f425196c5b0>
74 [2] <https://archives.gentoo.org/gentoo-user/message/a4d58e993934aa4a273998eda030d115>
75
76 --
77 Regards,
78 floyd

Attachments

File name MIME type
urxvt-font-size-1.1_ability-to-keep-window-size-and-pos.patch text/x-diff

Replies

Subject Author
Re: [gentoo-user] Re: How to set size to windows in Openbox in local config [SOLVED] Miroslav Rovis <miro.rovis@××××××××××××××.hr>