Re: FVWM: emulating mouse button 2 on HP touchpad

2023-05-13 Thread E Frank Ball
On Sat, May 13, 2023 at 11:44:36PM +0200, Lucio Chiappetti wrote:
 > 
 > In particular (independently of fvwm ?) I am used to do quick
 > copy-and-paste of text selecting it with mouse button 1 (MB1) and pasting
 > with mouse button 2 (MB2). Or shift-MB1 and shift-MB2 in my favourite
 > editor (The Hessling Editor), due to a peculiarity of the editor.
 > 
 > Now I've got a new HP Probook laptop which has a touchpad without buttons.
 > Apparently tapping near the bottom left and bottom right corners of the
 > touchpad works as MB1 and MB3 ... but there is no MB2.
 > 
 > I wonder whether there is a solution (either fvwm-specific or X11-generic)
 > to achieve a decent emulation of the paste function.

 to paste.

   E. Frank Ball III




FVWM: emulating mouse button 2 on HP touchpad

2023-05-13 Thread Lucio Chiappetti
I am since ages a keen fvwm user (2.6.8 bundled with ubuntu), mostly on a 
desktop PC, with a personal configuration described in 
http://sax.iasf-milano.inaf.it/~lucio/WWW/Opinions/window.html.


In particular (independently of fvwm ?) I am used to do quick 
copy-and-paste of text selecting it with mouse button 1 (MB1) and pasting 
with mouse button 2 (MB2). Or shift-MB1 and shift-MB2 in my favourite 
editor (The Hessling Editor), due to a peculiarity of the editor.


Now I've got a new HP Probook laptop which has a touchpad without buttons. 
Apparently tapping near the bottom left and bottom right corners of the 
touchpad works as MB1 and MB3 ... but there is no MB2.


I wonder whether there is a solution (either fvwm-specific or X11-generic) 
to achieve a decent emulation of the paste function.


I found a sequence like this

xkbset m ; xkbset exp 5 -m ; xmodmap -e "keycode 105 = Pointer_Button2"

can temporarily assign the MB2-click (for paste) to my right-control key 
(I never use such key). The reason it has to be temporary is that xkbset 
m., enabling the mousekeys, disables the numeric keypad (but I make a lot 
of use of the numeric keypad - with Num Lock off - for specific functions 
in my editor configuration ... actually I quite insisted on having an 
"English International" keyboard to have the num keypad)


I also found mention of a command like "xdotool click 2". Would it make 
sense to assign it with PointerKey in .fvwmrc ?


Or are there simpler or better solutions "
Thanks


--
A middle rank researcher at end career is not rich but is in the top 5%
of the Italian income tax taxpayers. Does it not sound strange ?



Re: FVWM: Oddity with Mouse 2 using fvwm 2.6 & 2.7 on Suse Tumbleweed

2023-05-13 Thread mark_at_yahoo

Update #1:
Many apologies for having sent the original of this message as a
reply to the wrong thread. In the future I should probably move to
the forums where it's harder to make this kind of noob mistake.

Update #2:
I now see that what I'm requesting in "tl;dnr" below isn't supported.
Instead, explicit entries of the form  "Style application-name
IconOverride, Icon desired-icon.png" *are* required for each
application. But if I'm once again wrong, any corrections/workarounds
would be welcome. I also see that you (Thomas) have been answering
this same question for close to 20 years:
http://www.fvwm.org/fvwm-ml/11051.html
https://www.fvwm.org/fvwm-ml/9863.html. My condolences and apologies
for adding to your workload.

Update #3:
Within the above limitations I think I have things under control. I
can add explicit "IconOverride" for the problematic apps and leave
everything else default. I'm still getting a crash if Fvwm is
restarted when any app is iconified, but I've always had strange
behavior (no crash though) doing that, and I need to straighten out
some Nvidia driver issues with the current install. I'll see if that
helps, and possibly build 2.7.0 to see where a null pixmap is being
sent to the X server.

Original, mis-posted message:

tl;dnr ... many thanks to all, but I'm still struggling with the
syntax. Can anyone provide me with a config line which does:

   "For all windows, search the current IconPath for a file
.png and use it if found."

and, optionally:

"... and if not found, use the application-provided icon, or if
none, no icon at all"

but I'd be happy with anything (except a crash ;) ) in the
"not-found" case.

(I've had some partial success with "Style ** Icon terminal.png" but
I don't want that on all windows, nor to have to add explicit "Style
FooApp Icon foo_app.png" lines for everything I use.)


On 5/11/23 12:20 PM, Klaus Ethgen wrote:
> It might be that the application brings its own icons. Search for
> _NET_WM_ICON in the xprop output.

Yes, that's what's happening. `xprop` even provides a low-res
colored-ascii-block rendition of the icon.

Thanks for clearing up this mystery.


> I myself do not use the icons as I use a custom iconize function to
> replace the icons with a small snapshot of the content. This sets the
> following styles: `WindowStyle IconOverride, Icon
> $[FVWM_USERDIR]/icon.tmp.$[w.id].png, StaysOnBottom`

That's really cool (and something that, somehow, xterms do on my
system), but I'd actually prefer a static icon (as long as it's of my
own choosing).


> So, the IconOverride here is the key.

Again as per the "tl;dnr" above, any help appreciated.


On Thu, 11 May 2023 14:38:59 -0700, Thomas Adam wrote:

> Setting ImagePath here is a little counter-intuitive.  It's a
> global command that should be set at the top of your file. See:

Thanks for the full documentation. Makes perfect sense, and I'd
already made the change at Klaus's suggestion.


> Hmm.  No.  Unless you set IconOverride, the preference is to the
> application-provided icon.

Again, thanks for clearing up what's been a mystery to me for years.
Even before my current spate of problems I've never understood why I
get one style of icon for my terminal windows (mate-terminal, KDE
konsole, etc) but a different one after a "FvwmCommand restart" (and
seemingly sometimes at random, without).


> > Q: How can I list the compiled-in default "+" ImagePath, maybe
> >with some command in an FvwmConsole?
>
> You can't easily.

Sad, but understandable since I'm probably the first person who's
needed it in the 30 year history of Fvwm.


> Try the fvwm2 version from git.

I think the crash is only happening due to my current problems, and
only happens if I forget to un-iconify all windows before doing
"restart". (That didn't crash on my previous openSUSE versions, but
also didn't work correctly.)

If that's the case I'll probably punt and get back to what I'm
supposed to be working on instead of fighting these install teething
pains. But, yes, my next step was to build 2.x and/or 3.x from source
(openSUSE Tumbleweed doesn't provide 3.x despite being a rolling
release which claims to track the latest from all projects). If nothing
else, I was going to compile the source to add some debug output to
print ImagePath.