1 |
On 170420-05:57+0200, Floyd Anderson wrote: |
2 |
> On Do, 13 Apr 21:55:29 +0200 |
3 |
> Miroslav Rovis <miro.rovis@××××××××××××××.hr> wrote: |
4 |
... |
5 |
> > |
6 |
> >But I forgot floyd has got a "patch to keep the window position while |
7 |
> >resizing the font" and offered it: |
8 |
> > |
9 |
> >https://marc.info/?l=gentoo-user&m=149205691530349&w=2 |
10 |
... |
11 |
> |
12 |
> Hi Miroslav, |
13 |
> |
14 |
> back from some computer-free holidays, |
15 |
I hope you had good and restful time! |
16 |
|
17 |
> I haven’t forgotten that I owe |
18 |
> you a patch. Study my attached approach and if you like, apply the patch |
19 |
> at your own risk (it should be clean applicable to the currently latest |
20 |
> upstream commit [1]). |
21 |
which I just git clone'd, for that purpose. |
22 |
|
23 |
> If you have any questions or ideas, get back to me. |
24 |
Don't worry, I will! With my usual excuse for my slowness and relative |
25 |
inaptitude... |
26 |
|
27 |
> But keep in mind, |
28 |
> I’m neither a developer nor a GUI programmer guru. |
29 |
> |
30 |
> It has some limits and/or doesn’t resolve certain issues: |
31 |
> - the patch assumes ‘NorthWest’ as the reference point for the window |
32 |
> gravity. |
33 |
NW is just fine, I would expect that, it's the usual default. |
34 |
|
35 |
> - if terminal background is colourised via escape sequences (as Andrew |
36 |
> mentioned in [2]), |
37 |
Yeah, I had marked important that email previously already, but only now |
38 |
found some time to study the links (and only *some* time)... |
39 |
|
40 |
And some of these notes of yours below I'll only more fully understand |
41 |
when I, hopefully, try and apply the patch (more about my plan on that |
42 |
further below): |
43 |
> you may notice that a borderless window colourise |
44 |
> only full cells (of rows/columns), not the gap between a terminal |
45 |
> cell end and the window edge. Framed windows seems not to be |
46 |
> affected by this behaviour. |
47 |
> - window edges flutters/flickers while resizing fonts (independently |
48 |
> from step-size and also when using escape sequences for resizing) |
49 |
> - toggling a window between normal -> fullscreen/maximised state -> |
50 |
> and back, you may notice that the window size has changed. I don’t |
51 |
> know the reason for this issue (which occurs independently from the |
52 |
> urxvt-font-size extension and my patch). |
53 |
> - different window manager (WM) probably produces different |
54 |
> behaviours. Think about a WM that try to imitate a tiling window |
55 |
> manager by automatic resizing/positioning within a snapping area |
56 |
> near the desktop edges. |
57 |
> - patch is tested to my moderate needs but not fully with all kinds of |
58 |
> fonts, WMs, multi monitor environment, etc. |
59 |
> - ... |
60 |
> |
61 |
> The patch is too unimportant to solve some/all of the above issues |
62 |
> and/or bloating up the urxvt extension script. And additionally, |
63 |
> rxvt-unicode won’t and doesn’t expose all Xlib functions (such as |
64 |
> XGetWindowAttributes) in urxvtperl, the embedded perl interpreter. So it |
65 |
$ man urxvtperl # but how cryptic!, how long study that will be... I don't |
66 |
have all those hours right now... |
67 |
I hope I'll find a solution with less time to invest, |
68 |
else... |
69 |
> will be tricky sometimes, to solve a specific behaviour. |
70 |
> |
71 |
> My used and tested urxvt-font-size related Xresource settings: |
72 |
> URxvt.font-size.keepwin: true |
73 |
> URxvt.font-size.step: 4 |
74 |
> URxvt.keysym.C-0xffad: font-size:decrease |
75 |
> URxvt.keysym.C-0xffab: font-size:increase |
76 |
> URxvt.keysym.C-0xffb0: font-size:reset |
77 |
> |
78 |
> Since I use the default keysyms for font-size:{decrease,increase,reset} |
79 |
> in Vim, I changed those defaults to C-KP_Substract (C-0xffad), C-KP_Add |
80 |
> (C-0xffab), C-KP_0 (C-0xffb0) like in Firefox and others. |
81 |
I don't get what these are. Not at this time. And this is my second |
82 |
reading of your email... |
83 |
|
84 |
NOTE (at proofreading): Is that 'C-KP_Substract' should read |
85 |
'C-KP_Subtract'?, the "-" on the keypad? So 'C-KP_Subtract' means |
86 |
Ctrl-<minus>?, and C-KP_0 means Ctrl-0? |
87 |
|
88 |
I also compared what I have currently installed: |
89 |
|
90 |
# eix urxvt-font-size |
91 |
[I] x11-misc/urxvt-font-size |
92 |
Available versions: 1.1 **9999 |
93 |
Installed versions: 1.1(13:07:28 22/02/15) |
94 |
Homepage: https://github.com/majutsushi/urxvt-font-size/ |
95 |
Description: Perl extension for rxvt-unicode to change the font size on the fly |
96 |
|
97 |
# |
98 |
|
99 |
# qlist urxvt-font-size |
100 |
/usr/lib64/urxvt/perl/font-size |
101 |
/usr/share/doc/urxvt-font-size-1.1/README.markdown.bz2 |
102 |
# |
103 |
|
104 |
[I compared what I have currently installed] with the 9999 version, which |
105 |
is the version that, IIUC, I plan to hopefully try and patch with your |
106 |
patch... |
107 |
|
108 |
> |
109 |
> References: |
110 |
> [1] <https://github.com/majutsushi/urxvt-font-size/commit/0cc2624489fb60fcebf85d5c4dd62f425196c5b0> |
111 |
That's the the two colons that Jan Larres, the current maintainer left |
112 |
out, and you reminded him they were missing. Nice of you! (IIUC) |
113 |
|
114 |
> [2] <https://archives.gentoo.org/gentoo-user/message/a4d58e993934aa4a273998eda030d115> |
115 |
The link that Savchenko gave in that email is puzzling me: |
116 |
http://rcr.io/words/dynamic-xterm-colors.html |
117 |
I want to try and figure out that bash script there... It's very |
118 |
educational. |
119 |
|
120 |
I need more time to study this. But I do have a question: |
121 |
|
122 |
I read, somewhere, spender (the author of grsecurity) wrote it, but I |
123 |
don't recall the entire context, and so I can only vaguely paraphrase |
124 |
what I remember he wrote, that... Aaargh, can't remember well at all... |
125 |
I think it wasn't about perl only, or perl wasn't even mentioned |
126 |
explicity, but it was spender saying how running scripts by using stuff |
127 |
like: |
128 |
|
129 |
#!/usr/bin/env [perl|python|...] |
130 |
( |
131 |
in the new script it's |
132 |
#!/usr/bin/env perl |
133 |
) |
134 |
|
135 |
|
136 |
instead of the more simple, traditional shebang line: |
137 |
|
138 |
#!/usr/bin/<interpreter> # perl or python or bash |
139 |
|
140 |
( |
141 |
in the old script it's |
142 |
#!/usr/bin/perl |
143 |
) |
144 |
|
145 |
that the former (...env <interpreter>) is not as safe as the latter |
146 |
(...bin/<interpreter>). |
147 |
|
148 |
Why was it necessary to introduce that change? I'm referring to Jan's |
149 |
change, of course. |
150 |
|
151 |
It can't be it does not bring a tiny bit more into the attack surface, |
152 |
can it? |
153 |
|
154 |
I need to try and understand some more of the above, but not |
155 |
immediately. A couple of hours of work on this today still got me |
156 |
too inconclusive in my understanding... And I do have other stuff on my |
157 |
hands that require my efforts and time... |
158 |
|
159 |
And my plan is... Probably bump the ebuild into my custom overlay, as I |
160 |
don't install online from git (until it becomes possible to verifiably |
161 |
install packages while online, I mean: for non-experts like me; it is |
162 |
possible to verifiably install packages with the old webrsync, also |
163 |
while online...; OTOH app-crypt/gkeys that Savchenko recommended to me |
164 |
in an email a month or two ago to try and test, those do bring in |
165 |
more verifiability when installing from git, but I haven't found time to |
166 |
study gkeys yet...) |
167 |
|
168 |
[And my plan is... Probably bump the ebuild into my custom overlay,] |
169 |
modify it to get the git source served from my local Apache cgit repo |
170 |
[1] (and urxvt-font-size package is not even PGP-signed, neither tags |
171 |
nor commits, which is always an important feature missing with the code, |
172 |
for me...) |
173 |
|
174 |
[modify it to get the git source from my local Apache cgit repo], put |
175 |
your patch in /etc/portage/patches/x11-misc/urxvt-font-size/ check that |
176 |
my /etc/portage/bashrc is ready to apply user patches (I recently |
177 |
updated it as per the wiki page, gave the link in another email a couple |
178 |
of days ago, to this list, yeah, it was in the non-replied-to message to |
179 |
Ian Zimmermann in a 2 emails --so far-- thread split from this one... |
180 |
which was about window positions as well!... [2]), and... |
181 |
|
182 |
...And emerge it: |
183 |
|
184 |
# emerge urxvt-font-size |
185 |
|
186 |
Courious to read what your opinion is on usage of /env vs plain /bin |
187 |
scripts security-wise, as I put it further above! And why that change... |
188 |
|
189 |
Regards! |
190 |
--- |
191 |
[1] I have actually learned when installing gnunet from |
192 |
youbroketheinternet-overlay just two days ago that I probably can |
193 |
use local overlay even without seving it with cgit and Apache, |
194 |
simply from local filesystem! |
195 |
|
196 |
[2] openbox window positions |
197 |
https://lists.gt.net/gentoo/user/325342 |
198 |
(and my reply to it contains digressions, but also simple |
199 |
questions...) |
200 |
|
201 |
-- |
202 |
Miroslav Rovis |
203 |
Zagreb, Croatia |
204 |
https://www.CroatiaFidelis.hr |