Giter Club home page Giter Club logo

Comments (5)

elextr avatar elextr commented on June 30, 2024
  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.

from geany-plugins.

kevjonesin avatar kevjonesin commented on June 30, 2024

image

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. The Geany icon to the lower right—that has the mouse pointer over it prompting a tooltip that says "Geany"—is Geany specific and provided via the "addons" plugin. A right click on it brings up a small menu of Geany specific functions and a left click toggles the Geany window in a manner that prevents it from showing in taskbar amongst other running windows when collapsed. And then allows it, the still running Geany session, to show on whatever workspace one's on when the icon is clicked again.
https://plugins.geany.org/addons.html
https://plugins.geany.org/addons.html#systray

from geany-plugins.

elextr avatar elextr commented on June 30, 2024

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.

from geany-plugins.

kevjonesin avatar kevjonesin commented on June 30, 2024

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
(next to the mouse pointer)

This allows one to hide the Audacious window (while leaving it still running with the systray icon still in place and interactive) by simply using whatever "close window" keyboard shortcut has been enabled in whatever desktop environment one happens to be using. Or, with such enabled, one can click on the running app's close icon in its open window's title bar and get the same result.

So, getting back to Geany …
I'm proposing, in some future release, adding the (well established elsewhere) "close to tray" sub-option to the existing status icon option already included in the Addons plugin's preferences which are accessed via Geany's Plugins Manager.

And I'm also proposing, for some future release, a slightly new spin on such by speculating about allowing the same signal that left mouse clicking on the present implementation of the Geany systray icon sends to also be triggered by a user configurable keybinding offered alongside the existing Geany keybinding options. So that one could then use the keyboard to unhide as well as hide the window.

For the present, I'm wondering if anyone knows specifics about what signal is sent when left clicking on the current implementation of the Geany systray icon? And how one might emulate such via a script or something. Which I could then somehow set up to run via a keyboard shortcut. Using keybinding options native to my distro, rather than those configured within Geany.

from geany-plugins.

elextr avatar elextr commented on June 30, 2024

Then "somebody" can copy the portable code from there, and make a PR also being sure its also handled/removed on Windows/macos.

from geany-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.