mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 10:15:20 +01:00
[GH-ISSUE #534] XDG menu #1583
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#1583
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ClaireNeveu on GitHub (Apr 6, 2024).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/534
Originally assigned to: @ClaireNeveu on GitHub.
Is your feature request related to a problem? Please describe.
The Launcher module is great for frequently accessed programs but right now ironbar doesn't provide a solution to infrequently used programs that you don't want cluttering the bar all the time. You mentioned in https://github.com/JakeStanger/ironbar/issues/194 that you don't really want to embed a rofi-like menu (like KDE does) but would you be open to a customizable XDG menu sort of like XFCE?
Describe the solution you'd like
The interface would be something like:
Describe alternatives you've considered
I've thought about building something with the custom modules but you can't dynamically decide which GTK elements are present.
Additional context
I'd be willing to contribute the module to ironbar if the idea is acceptable.
@JakeStanger commented on GitHub (Apr 6, 2024):
I think this is acceptable because it's fairly light and stays within the confines of the bar. My main concern with a rofi-style launcher is that quickly becomes its own project, with its own set of modules and own logic and own window etc etc. A simple menu can just grab the data it needs and render and leave it at that.
What is the idea of the
xdg_menuoption. Would it just display thebefore/afteroptions with that off? I also thinkstartandendwould be preferable to keep in line with the existing config terms.If you're willing to take this on yourself, go for it!
Yet ;)
(I still think this is a good native module regardless)
@ClaireNeveu commented on GitHub (Apr 6, 2024):
Exactly. I figure some people might just want a menu with various options in it.
@ClaireNeveu commented on GitHub (Apr 6, 2024):
FWIW I think KDE provides a good model for a restrained launcher where the text entry is basically just a search of the existing menu. A launcher doesn't have to evolve into a full extensible anyrun style thing (and those two things can co-exist).
@JakeStanger commented on GitHub (Apr 10, 2024):
I think there is possible utility in that, but it's potentially limited. Why use a menu like that over anyrun and the likes? What does it bring to the table that a runner doesn't, and how do we keep the scope under control?
I'm not against it, but as it would take quite a bit more work (to both develop and support), I think it needs to be properly thought out, planned and justified.
@ClaireNeveu commented on GitHub (May 7, 2024):
As an update: I have a very rough POC at https://github.com/ClaireNeveu/ironbar/tree/menu-widget. Been slowly picking away at it over the last month and after more polish and cleanup I'll put it up for review.
@JakeStanger commented on GitHub (May 10, 2024):
Thanks for the update, I've had a very brief scan of the code and it's looking good so far.
@ClaireNeveu commented on GitHub (May 18, 2024):
@JakeStanger I'm planning to implement a Grab so I can close and reset the menu when someone clicks outside of it. Since ironbar uses a single centralized popup I'll need to edit it at that level. Is it ok with you for all popups to close when clicked outside of or will I need to build an API to pass events to the individual modules to decide their behavior?
@JakeStanger commented on GitHub (May 18, 2024):
Good question. It's something I've been considering in the back of my mind for a while.
The current close-on-mouse-leave solution is good enough in most cases, but imperfect, and also likely not everybody's preference. It would therefore be nice to have a close-on-click behaviour as an option, but I wouldn't want it to replace the current behaviour.
If it were an option, I'd probably define it at the bar level. I guess it wouldn't be much work from there to add it to
CommonConfigto allow for overriding per-widget, or let a widget natively decide its close behaviour. I'd want to keep things as consistent as possible though.What is the reason for wanting to to be close-on-click? Is it just because the current mouse-leave behaviour makes for bad UX with this style menu?
@ClaireNeveu commented on GitHub (May 18, 2024):
@JakeStanger Mainly that it's bad UX and bad accessibility for a menu.
@JakeStanger commented on GitHub (May 18, 2024):
Cool, I think that's a good enough reason :)
I may be over-engineering this so feel free to suggest an alternative, but here's the scenario in my head:
CommonConfigprovides an option to override that override, so it's never hard-coded.The last point, I think is probably a stretch goal of sorts and isn't needed, but would round things out. I assume there'll be someone somewhere who'd want the option?
How does that sound? If you want me to take some/all of that on let me know too, as I appreciate the scope is growing a bit here.
@ClaireNeveu commented on GitHub (May 18, 2024):
That sounds good. I think I'll deliver the initial menu without that change and then circle back to add it just to keep the scope down.
I'm quite close to finished now I just need to work out how to set the vertical alignment on menus based on the bar & widget position.
@JakeStanger commented on GitHub (May 18, 2024):
Perfect, sounds great.
You can use
info.bar_position, and that has anorientationmethod on it if you haven't found that yet btw.@ClaireNeveu commented on GitHub (May 18, 2024):
Here's the current menu, btw. I did find
info.bar_positionbut in order to work correctly we also need to know if the module is instart,center, orend.If you have a vertical bar with the menu in
startthen you want all the menus to line up at the top but if it's inendthen you want them to line up on the bottom. Any other behavior will cause the main menu to jump around if you open a sub-menu with more items.@JakeStanger commented on GitHub (May 18, 2024):
Ah okay that makes sense.
info.locationshould cover that (left/right equate to start/end, I just never updated the names)Looking good too!