Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 13 Dec 2018, 09:02
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
(Solved) F11 in Gtkdialog GUI?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
ITSMERSH


Joined: 02 May 2018
Posts: 581

PostPosted: Fri 16 Nov 2018, 01:53    Post subject:  (Solved) F11 in Gtkdialog GUI?  

Hi.

Using keyboard F11 usually makes a window sized full screen and revert.

I would like to add this to my program (GUI made with gtkdialog).

How to achieve? Is this possible?

_________________
RSH

Last edited by ITSMERSH on Sun 18 Nov 2018, 20:00; edited 1 time in total
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1713
Location: Japan

PostPosted: Fri 16 Nov 2018, 04:45    Post subject:  

Requires wmctrl:
Code:
#!/bin/bash
echo '<window>
<text label="F11 toggles fullscreen"></text>
<action signal="key-press-event">[ $KEY_SYM = F11 ] && wmctrl -r :ACTIVE: -b toggle,fullscreen</action>
</window>'|gtkdialog -s
Back to top
View user's profile Send private message 
ITSMERSH


Joined: 02 May 2018
Posts: 581

PostPosted: Fri 16 Nov 2018, 10:36    Post subject:  

Thank you MochiMoppel.

You're an expert for real! Very Happy

I have wmctrl installed in all my Puppies (32 & 64), since I'm using it for different stuff like a script waiting after booting until a specific window appears on the screen. Then switching the desktop to my favorite selection of programs and executing the creation of lots of symbolic links etc.pp.

The wmctrl is pretty cool and some more easy to use than xdotool which I have also installed in all my Puppies.

Edit:

Copied <action signal="key-press-event">[ $KEY_SYM = F11 ] && wmctrl -r :ACTIVE: -b toggle,fullscreen</action> and pasted into my script. Works immediately! Very Happy

_________________
RSH
Back to top
View user's profile Send private message 
ITSMERSH


Joined: 02 May 2018
Posts: 581

PostPosted: Sat 17 Nov 2018, 22:08    Post subject:  

Added <action signal="key-press-event">[ $KEY_SYM = F12 ] && wmctrl -r :ACTIVE: -b toggle,shaded</action> to roll up / roll down the window. Works also immediately!

Thanks again! Very Happy

_________________
RSH
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1713
Location: Japan

PostPosted: Sun 18 Nov 2018, 04:20    Post subject:  

ITSMERSH wrote:
Added <action signal="key-press-event">[ $KEY_SYM = F12 ] && wmctrl -r :ACTIVE: -b toggle,shaded</action> to roll up / roll down the window. Works also immediately!
Shocked It works?
1) If used as in my example "shaded" can't be toggled. Here shaded (and minimized) windows do not respond to signals and can not unshade themselves.

2) In most Puppies the F12 key is bound to the JWM menu and has priority over assignments in gtkdialog or any other application.
I tried in vain to argue against it a couple of times. Unfortunately this strange configuration is present in even the most recent Puppies Crying or Very sad
Back to top
View user's profile Send private message 
ITSMERSH


Joined: 02 May 2018
Posts: 581

PostPosted: Sun 18 Nov 2018, 09:37    Post subject:  

Yes, both keyboard shortcuts do work - as long as the window is the active one on top!

I have tried F10 first but this opens the Menu of my gtkdialog (gtkdialog 0.8.4) program.

Also, I have Openbox and LxPanel installed. I prever Openbox since the Days of Lucid 528 instead of JWM (never liked JWM really, though I found it easier to modify - at least the versions of the Woof Puppies (WoofCE did change a lot on JWM's Menus and how it is built)).

_________________
RSH
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0374s ][ Queries: 12 (0.0057s) ][ GZIP on ]