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?
(Solved) F11 in Gtkdialog GUI?
(Solved) F11 in Gtkdialog GUI?
Last edited by ITSMERSH on Mon 19 Nov 2018, 00:00, edited 1 time in total.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Requires wmctrl:
Code: Select all
#!/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
Thank you MochiMoppel.
You're an expert for real!
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!
You're an expert for real!
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!
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
It works?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!
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
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)).
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)).