Re: [gentoo-user] Re: How to set size to windows in Openbox in local config [SOLVED]

2017-05-13 Thread Miroslav Rovis
On 170423-13:31+0200, Miroslav Rovis wrote:
> Hi Floyd!
> 
> This is just an interim notice-reply. I need a few days to find a couple
> of hours time to study the links you gave. I only wish to express my
> appreciation, as the links look interesting and to the point, as well as
> the rest of your reply.

I always try to keep my word, but I am not likely to be able to. My
Gentoo system is currently somewhat (probably mildly) broken, as can be
figured out from:

Strange script planted with Bash
https://www.croatiafidelis.hr/foss/cap/cap-170504-strange-bash/
and
Same Issue with Editcap
https://www.croatiafidelis.hr/foss/cap/cap-170313-git-devuan-mail/git-devuan-mail-4.php

and nice and useful, but cosmetic, issues fade away in importance
confronted with security issues.

(only my sig at end, no more new text)
> 
> On 170422-04:35+0200, Floyd Anderson wrote:
> > On Fr, 21 Apr 00:12:28 +0200
> > Miroslav Rovis  wrote:
> > >On 170420-05:57+0200, Floyd Anderson wrote:
> > >> On Do, 13 Apr 21:55:29 +0200
> > >> Miroslav Rovis  wrote:
> ...
> > >> back from some computer-free holidays,
> > >I hope you had good and restful time!
> ...
> > >[2]  openbox window positions
> > > https://lists.gt.net/gentoo/user/325342
> > > (and my reply to it contains digressions, but also simple
> > > questions...)
> > >
> > Your plan with the Apache cgit repo seems to be a nice challenge to 
> > learn something but as I noted above, creating and maintaining an 
> > overlay for so tiny things is a little bit overkill in my opinion. 
> > Fetching the related Git repository from time to time and you are done 
> > while an overlay needs probably more significant work.
> > 
> > As an example, I am currently just imagine I have to create overlays for 
> > my favourite Vim plugins instead of using well known manager like 
> > Vundle, NeoBundle, Dein or what else. That were a lot of work for the 
> > overlay solution or did I miss the point?
> > 
> > 
> > References:
> > [1] 
> > 
> > 
> > -- 
> > Regards,
> > floyd

-- 
Miroslav Rovis
Zagreb, Croatia
https://www.CroatiaFidelis.hr


signature.asc
Description: Digital signature


Re: [gentoo-user] Re: How to set size to windows in Openbox in local config [SOLVED]

2017-04-23 Thread Miroslav Rovis
Hi Floyd!

This is just an interim notice-reply. I need a few days to find a couple
of hours time to study the links you gave. I only wish to express my
appreciation, as the links look interesting and to the point, as well as
the rest of your reply.

On 170422-04:35+0200, Floyd Anderson wrote:
> On Fr, 21 Apr 00:12:28 +0200
> Miroslav Rovis  wrote:
> >On 170420-05:57+0200, Floyd Anderson wrote:
> >> On Do, 13 Apr 21:55:29 +0200
> >> Miroslav Rovis  wrote:
...
> >> back from some computer-free holidays,
> >I hope you had good and restful time!
...
> >[2]  openbox window positions
> > https://lists.gt.net/gentoo/user/325342
> > (and my reply to it contains digressions, but also simple
> > questions...)
> >
> Your plan with the Apache cgit repo seems to be a nice challenge to 
> learn something but as I noted above, creating and maintaining an 
> overlay for so tiny things is a little bit overkill in my opinion. 
> Fetching the related Git repository from time to time and you are done 
> while an overlay needs probably more significant work.
> 
> As an example, I am currently just imagine I have to create overlays for 
> my favourite Vim plugins instead of using well known manager like 
> Vundle, NeoBundle, Dein or what else. That were a lot of work for the 
> overlay solution or did I miss the point?
> 
> 
> References:
> [1] 
> 
> 
> -- 
> Regards,
> floyd

-- 
Miroslav Rovis
Zagreb, Croatia
https://www.CroatiaFidelis.hr


signature.asc
Description: Digital signature


Re: [gentoo-user] Re: How to set size to windows in Openbox in local config [SOLVED]

2017-04-21 Thread Floyd Anderson

On Fr, 21 Apr 00:12:28 +0200
Miroslav Rovis  wrote:

On 170420-05:57+0200, Floyd Anderson wrote:

On Do, 13 Apr 21:55:29 +0200
Miroslav Rovis  wrote:

...

>
>But I forgot floyd has got a "patch to keep the window position while
>resizing the font" and offered it:
>
>https://marc.info/?l=gentoo-user=149205691530349=2

...


Hi Miroslav,

back from some computer-free holidays,

I hope you had good and restful time!
Yes, thanks, it was like that and I had better stay there because after 
an update yesterday, xorg-server kills my last nerve while I am fighting 
with a "Segmentation fault at address 0x0" server error. :-(



The patch is too unimportant to solve some/all of the above issues
and/or bloating up the urxvt extension script. And additionally,
rxvt-unicode won’t and doesn’t expose all Xlib functions (such as
XGetWindowAttributes) in urxvtperl, the embedded perl interpreter. So it

$ man urxvtperl # but how cryptic!, how long study that will be... I don't
 have all those hours right now...
 I hope I'll find a solution with less time to invest,
 else...
Yes it needs investigation. That was the reason why I does not realise 
firstly, that the changes to my local font-size extension script were 
made by me (as I mentioned in an earlier reply). I could not believe 
that I spend my time to those cryptic stuff (have not used Git for this 
in the past, which had simply shown myself as the author). 


My used and tested urxvt-font-size related Xresource settings:
URxvt.font-size.keepwin:true
URxvt.font-size.step:   4
URxvt.keysym.C-0xffad:  font-size:decrease
URxvt.keysym.C-0xffab:  font-size:increase
URxvt.keysym.C-0xffb0:  font-size:reset

Since I use the default keysyms for font-size:{decrease,increase,reset}
in Vim, I changed those defaults to C-KP_Substract (C-0xffad), C-KP_Add
(C-0xffab), C-KP_0 (C-0xffb0) like in Firefox and others.

I don't get what these are. Not at this time. And this is my second
reading of your email...

NOTE (at proofreading): Is that 'C-KP_Substract' should read
'C-KP_Subtract'?, the "-" on the keypad? So 'C-KP_Subtract' means
Ctrl-?, and C-KP_0 means Ctrl-0?
Sorry, I was not quite verbose about this. Yes your are right, the "C" 
means control key and "KP" stands for keypad. Normally you can use those 
identifier directly in the keysym definitions but those for keypad keys 
does not work for me, so I used their hexadecimal keycode equivalents. 
You can find the keycodes with the command `xev` or by looking in the 
header file "/usr/include/X11/keysymdef.h" near line 202.



I also compared what I have currently installed:

# eix urxvt-font-size
[I] x11-misc/urxvt-font-size
Available versions:  1.1 **
Installed versions:  1.1(13:07:28 22/02/15)
Homepage:https://github.com/majutsushi/urxvt-font-size/
Description: Perl extension for rxvt-unicode to change the font 
size on the fly

#

# qlist urxvt-font-size
/usr/lib64/urxvt/perl/font-size
/usr/share/doc/urxvt-font-size-1.1/README.markdown.bz2
#

[I compared what I have currently installed] with the  version, which
is the version that, IIUC, I plan to hopefully try and patch with your
patch...
Cannot figure out what IIUC is but anyway. Patching will fail with the 
v1.1-tag commit (two years, four month old).


I would recommend not to hassle portage with those tiny installs (at 
least on a single user machine). Simply tell rxvt-unicode where it can 
find your additionally extension script(s) by using for instance:

   URxvt.perl-lib: $HOME/.config/urxvt/ext

in your Xresource file for rxvt-unicode. Have a look at urxvt(1) manual 
for more alternatives. I see only one disadvantage, you have to apply 
the patch manually but only once if you are using a local Git repo (as 
you do and mentioned in your reply).



[2] 


The link that Savchenko gave in that email is puzzling me:
http://rcr.io/words/dynamic-xterm-colors.html
I want to try and figure out that bash script there... It's very
educational.

I need more time to study this. […]
Not necessary if you rarely use it (in my opinion) but always good to 
known that it is there when you need it. Becomes probably very handy 
e.g. for terminal prompt designs, window titling or:

 - quickly change/test fonts, where  is one of {710..713} which
   stands for regular, bold, italic, bold-italic and  something
   like 9x15, fixed or xft:termminus-12 and so on.
   $ printf '\e]%s;%s\007' "" ""
 - query RGB colour values, where  is one of {0..255}
   $ echo -ne "\033]4;;?\007"
 - window sizing/positioning (e.g. 1144x954+0+0 bound to Ctrl+F11) in
   urxvt. Did you remember the syntax? :-)
   URxvt.keysym.C-F11: command:\033[4;1144;954t\033[3;0;0t
 - ...


[…] But I do have a question:


Re: [gentoo-user] Re: How to set size to windows in Openbox in local config [SOLVED]

2017-04-20 Thread Miroslav Rovis
On 170420-05:57+0200, Floyd Anderson wrote:
> On Do, 13 Apr 21:55:29 +0200
> Miroslav Rovis  wrote:
...
> >
> >But I forgot floyd has got a "patch to keep the window position while
> >resizing the font" and offered it:
> >
> >https://marc.info/?l=gentoo-user=149205691530349=2
...
> 
> Hi Miroslav,
> 
> back from some computer-free holidays,
I hope you had good and restful time!

> I haven’t forgotten that I owe 
> you a patch. Study my attached approach and if you like, apply the patch 
> at your own risk (it should be clean applicable to the currently latest 
> upstream commit [1]).
which I just git clone'd, for that purpose. 

> If you have any questions or ideas, get back to me.
Don't worry, I will! With my usual excuse for my slowness and relative
inaptitude...

> But keep in mind, 
> I’m neither a developer nor a GUI programmer guru.
> 
> It has some limits and/or doesn’t resolve certain issues:
>   - the patch assumes ‘NorthWest’ as the reference point for the window 
> gravity.
NW is just fine, I would expect that, it's the usual default.

>   - if terminal background is colourised via escape sequences (as Andrew 
> mentioned in [2]),
Yeah, I had marked important that email previously already, but only now
found some time to study the links (and only *some* time)...

And some of these notes of yours below I'll only more fully understand
when I, hopefully, try and apply the patch (more about my plan on that
further below):
> you may notice that a borderless window colourise 
> only full cells (of rows/columns), not the gap between a terminal 
> cell end and the window edge. Framed windows seems not to be
> affected by this behaviour.
>   - window edges flutters/flickers while resizing fonts (independently 
> from step-size and also when using escape sequences for resizing)
>   - toggling a window between normal -> fullscreen/maximised state -> 
> and back, you may notice that the window size has changed. I don’t 
> know the reason for this issue (which occurs independently from the 
> urxvt-font-size extension and my patch).
>   - different window manager (WM) probably produces different 
> behaviours. Think about a WM that try to imitate a tiling window 
> manager by automatic resizing/positioning within a snapping area 
> near the desktop edges.
>   - patch is tested to my moderate needs but not fully with all kinds of 
> fonts, WMs, multi monitor environment, etc.
>   - ...
> 
> The patch is too unimportant to solve some/all of the above issues 
> and/or bloating up the urxvt extension script. And additionally, 
> rxvt-unicode won’t and doesn’t expose all Xlib functions (such as 
> XGetWindowAttributes) in urxvtperl, the embedded perl interpreter. So it 
$ man urxvtperl # but how cryptic!, how long study that will be... I don't
  have all those hours right now...
  I hope I'll find a solution with less time to invest,
  else...
> will be tricky sometimes, to solve a specific behaviour.
> 
> My used and tested urxvt-font-size related Xresource settings:
>   URxvt.font-size.keepwin:true
>   URxvt.font-size.step:   4
>   URxvt.keysym.C-0xffad:  font-size:decrease
>   URxvt.keysym.C-0xffab:  font-size:increase
>   URxvt.keysym.C-0xffb0:  font-size:reset
> 
> Since I use the default keysyms for font-size:{decrease,increase,reset} 
> in Vim, I changed those defaults to C-KP_Substract (C-0xffad), C-KP_Add 
> (C-0xffab), C-KP_0 (C-0xffb0) like in Firefox and others.
I don't get what these are. Not at this time. And this is my second
reading of your email...

NOTE (at proofreading): Is that 'C-KP_Substract' should read
'C-KP_Subtract'?, the "-" on the keypad? So 'C-KP_Subtract' means
Ctrl-?, and C-KP_0 means Ctrl-0?

I also compared what I have currently installed:

# eix urxvt-font-size
[I] x11-misc/urxvt-font-size
 Available versions:  1.1 **
 Installed versions:  1.1(13:07:28 22/02/15)
 Homepage:https://github.com/majutsushi/urxvt-font-size/
 Description: Perl extension for rxvt-unicode to change the font 
size on the fly

#

# qlist urxvt-font-size
/usr/lib64/urxvt/perl/font-size
/usr/share/doc/urxvt-font-size-1.1/README.markdown.bz2
#

[I compared what I have currently installed] with the  version, which
is the version that, IIUC, I plan to hopefully try and patch with your
patch...

> 
> References:
> [1] 
> 
That's the the two colons that Jan Larres, the current maintainer left
out, and you reminded him they were missing. Nice of you! (IIUC)

> [2] 
> 
The link that Savchenko gave in that email is puzzling me:
http://rcr.io/words/dynamic-xterm-colors.html
I want to try and figure out that 

Re: [gentoo-user] Re: How to set size to windows in Openbox in local config [SOLVED]

2017-04-19 Thread Floyd Anderson

On Do, 13 Apr 21:55:29 +0200
Miroslav Rovis  wrote:

ERRATA: I wrote...

On 170413-21:19+0200, Miroslav Rovis wrote:
...

[... I wrote]:

Only ERRATA may follow in the topic, as far as I am concerned.


But I forgot floyd has got a "patch to keep the window position while
resizing the font" and offered it:

https://marc.info/?l=gentoo-user=149205691530349=2

And I, in my reply, accepted to try and apply it.

So, it depends on him if this topic is over or not.

It's very related, so probably best not to do any new subject for it.


Hi Miroslav,

back from some computer-free holidays, I haven’t forgotten that I owe 
you a patch. Study my attached approach and if you like, apply the patch 
at your own risk (it should be clean applicable to the currently latest 
upstream commit [1]).


If you have any questions or ideas, get back to me. But keep in mind, 
I’m neither a developer nor a GUI programmer guru.


It has some limits and/or doesn’t resolve certain issues:
 - the patch assumes ‘NorthWest’ as the reference point for the window 
   gravity.
 - if terminal background is colourised via escape sequences (as Andrew 
   mentioned in [2]), you may notice that a borderless window colourise 
   only full cells (of rows/columns), not the gap between a terminal 
   cell end and the window edge. Framed windows seems not to be

   affected by this behaviour.
 - window edges flutters/flickers while resizing fonts (independently 
   from step-size and also when using escape sequences for resizing)
 - toggling a window between normal -> fullscreen/maximised state -> 
   and back, you may notice that the window size has changed. I don’t 
   know the reason for this issue (which occurs independently from the 
   urxvt-font-size extension and my patch).
 - different window manager (WM) probably produces different 
   behaviours. Think about a WM that try to imitate a tiling window 
   manager by automatic resizing/positioning within a snapping area 
   near the desktop edges.
 - patch is tested to my moderate needs but not fully with all kinds of 
   fonts, WMs, multi monitor environment, etc.

 - ...

The patch is too unimportant to solve some/all of the above issues 
and/or bloating up the urxvt extension script. And additionally, 
rxvt-unicode won’t and doesn’t expose all Xlib functions (such as 
XGetWindowAttributes) in urxvtperl, the embedded perl interpreter. So it 
will be tricky sometimes, to solve a specific behaviour.


My used and tested urxvt-font-size related Xresource settings:
URxvt.font-size.keepwin:true
URxvt.font-size.step:   4
URxvt.keysym.C-0xffad:  font-size:decrease
URxvt.keysym.C-0xffab:  font-size:increase
URxvt.keysym.C-0xffb0:  font-size:reset

Since I use the default keysyms for font-size:{decrease,increase,reset} 
in Vim, I changed those defaults to C-KP_Substract (C-0xffad), C-KP_Add 
(C-0xffab), C-KP_0 (C-0xffb0) like in Firefox and others.



References:
[1] 

[2] 


--
Regards,
floyd

diff --git a/font-size b/font-size
index c16924c..8d3417e 100755
--- a/font-size
+++ b/font-size
@@ -105,6 +105,14 @@ size change sequence would be for example 8->12->16->20 instead of
 available in specific sizes, though, and odd sizes are often not
 available, resulting in an effective step size of 2 instead of 1
 in that case.
+
+
+Controls whether or not to try to keep the window position/size while resizing
+the font size (assumes ‘NorthWest’ as reference point for the window gravity):
+
+  URxvt.font-size.keepwin: true
+
+Defaults to false if resource is omitted or cannot be treated as a boolean.
 =cut
 
 use strict;
@@ -122,6 +130,12 @@ sub on_start
 my ($self) = @_;
 
 $self->{step} = $self->x_resource("%.step") || 1;
+$self->{keepwin} = $self->x_resource_boolean("%.keepwin") || 0;
+if ($self->{keepwin}) {
+($self->{x}, $self->{y}, $self->{cw}, $self->{dx}, $self->{dy}) = (
+$self->XTranslateCoordinates($self->parent, $self->DefaultRootWindow, 0, 0),
+$self->width(), $self->height());
+}
 
 foreach my $type (qw(font boldFont italicFont boldItalicFont)) {
 $self->{$type} = $self->x_resource($type) || "undef";
@@ -203,11 +217,13 @@ sub fonts_change_size
 push @newfonts, $newfont;
 }
 my $newres = join(",", @newfonts);
+window_keep($term, 1);
 font_apply_new($term, $newres, "font", $save);
 
 handle_type($term, "boldFont",   $delta, $newbasedelta, $newbasesize, $save);
 handle_type($term, "italicFont", $delta, $newbasedelta, $newbasesize, $save);
 handle_type($term, "boldItalicFont", $delta, $newbasedelta, $newbasesize, $save);
+window_keep($term, 2);
 }
 
 if ($save > 

Re: [gentoo-user] Re: How to set size to windows in Openbox in local config [SOLVED]

2017-04-13 Thread Miroslav Rovis
ERRATA: I wrote...

On 170413-21:19+0200, Miroslav Rovis wrote:
... 

[... I wrote]:
> Only ERRATA may follow in the topic, as far as I am concerned.

But I forgot floyd has got a "patch to keep the window position while
resizing the font" and offered it:

https://marc.info/?l=gentoo-user=149205691530349=2

And I, in my reply, accepted to try and apply it.

So, it depends on him if this topic is over or not.

It's very related, so probably best not to do any new subject for it.

-- 
Miroslav Rovis
Zagreb, Croatia
https://www.CroatiaFidelis.hr


signature.asc
Description: Digital signature