At present I'm able to collapse the Geany window to the systray icon via a left mouse click upon the systray icon itself. Which on my system is located at the bottom of the screen in a tint2 panel running within MX Linux 23 FluxBox edition, a Debian based system.
I'd like to be able to collapse the window to the systray with a keyboard shortcut from within the active window. And/or from an icon or menu entry somewhere in the window. And/or, as I've seen implemented in other apps (most recently DeadBeef audio player), to have a toggle in preferences to allow closing the window to collapse it to the systray icon—instead of exiting the program. One then typically exits or "quits" the running instance via a menu entry upon right clicking the systray icon.
In the mean time, I'd welcome any presently applicable workaround suggestions folks might have.
The icon location within the tray is variable so using a click recorder app to invoke a replay of a click at its location via a shortcut triggered script or whatever would likely produce inconsistent results.
Might there be some way to fool the icon into thinking it's received a left click? Like to send a signal to trigger its function regardless of its precise location on screen?
1. the gtk status icon is a notification, it doesn't control anything, and it was deprecated back in 3.14 and Geany needs 3.24 2. the panel/systray icons are part of the window manager functionality, not under the control of the application, and controls like "iconify" are usually added to the window border by that. 3. the most a GTK application can do is _ask_ that the window be iconified, its up to the window manager to do it
Whilst anything can be coded if the WM supports it, there are lots of Linux WMs and Windows and Macos and Geany is not likely to include anything that needs specific code for each of those.
![image](https://github.com/geany/geany-plugins/assets/12547757/adf06794-8bb7-4a7c-82...)
I'm referring to the Geany icon to the lower right beside the volume icon in the systray/notification area. The one enabled in the pictured Geany plugin settings. Not to the other Geany icon further left along the bottom panel amongst other running window icons.
I'm referring to the Geany icon to the lower right beside the volume icon in the systray/notification area. The one enabled in the pictured Geany plugin settings. Not to the other Geany icon further left along the bottom panel amongst other running window icons.
Ok, thats clearer.
Lets go back to your OP.
collapse the Geany window to the systray icon via a left mouse click upon the systray icon
Depends what you mean by "collapse", the usual meaning is what the `-` on the title bar does, called iconifying. And the window icon (the left ones in your image) can usually be clicked to cycle iconify/deiconify, exactly the same effect as the status icon. But iconifying leaves the Geany window in the control of the window manager (WM). Technically what the plugin does is "hide" the Geany window, which removes it from the WM control, removes its window icon, won't show in window lists, is totally lost to all the normal system controls (not sure what happens on Wayland based systems). Personally I don't see what the point of replicating the WM functions in the status icon is, but anyway "somebody" could add a keybinding for that function.
And/or, as I've seen implemented in other apps (most recently DeadBeef audio player), to have a toggle in preferences to allow closing the window to collapse it to the systray icon—instead of exiting the program. One then typically exits or "quits" the running instance via a menu entry upon right clicking the systray icon.
The X in the title bar is usually handled by the WM, Geany does not generate those controls, the WM sends Geany a signal to quit. Many WMs then wait a while, and if the application hasn't quit it pops up a "Application not responding, do you want me to kill it?" type dialog. Clearly that is not compatible with iconifying but continuing the application. For systems where the X in the toolbar can be used as iconify the WM may require client side controls giving the application the ability to intercept and change the signal. But there are many different WMs and they work in many different ways, so its unlikely that a suitable implementation that will suit them all can be found, but of course if "somebody" found a way that worked on all WMs they could make a PR.
Yes, I think "hide" is the more proper/specific term. Thank you.
A "close to tray" option has been implemented in numerous existing apps that offer a systray/notification area status indicator icon. It's apparently done in a window manager agnostic fashion. I.e. I get the same toggle-able option with such apps regardless of whether I'm displaying them via xfce, fluxbox, enlightenment, &c. This isn't some new idea I've come up with, I've been coming across implementations of it for years in other apps.
As mentioned, I just recently saw (and used) such in the DeadBeef audio player. Here's a screenshot, taken just moments ago, of the same option being offered in the Audacious audio player as well: ![image](https://github.com/geany/geany-plugins/assets/12547757/80b06d76-2589-4513-9a...) (next to the mouse pointer)
Then "somebody" can copy the portable code from there, and make a PR also being sure its also handled/removed on Windows/macos.
github-comments@lists.geany.org