Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clickable menu #1436

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Qingwu-Li
Copy link

Hello fellow geeks,
I tring to implemented a built-in clickable menu feature,
Tested with wayland,

@Qingwu-Li Qingwu-Li marked this pull request as ready for review January 22, 2025 07:35
@Qingwu-Li Qingwu-Li force-pushed the add-clickable-menu branch 2 times, most recently from fbc180d to bbf6888 Compare January 23, 2025 02:37
@bynect
Copy link
Member

bynect commented Jan 23, 2025

hello. I like your idea and I also wanted to implement the buttons.

I tried your branch and noticed some problems with the text alignment

img-1737672610

I think the best way would be to either specify a maximum amount of buttons allowed (then dmenu is used for extra action) or to wrap the buttons to a newline. squeezing all actions in a single line is impossible when there are a lot after all

@Qingwu-Li Qingwu-Li force-pushed the add-clickable-menu branch 3 times, most recently from 181254a to bd090c7 Compare February 7, 2025 06:18
Implement menu structure and related functions,
preparing for clickable menu feature.
Add new menus array to preserve current actions.

Signed-off-by: LI Qingwu <[email protected]>
Introduce built-in menu settings in dunstrc.
Add corresponding settings in settings.h.
Update settings_data.h with new menu-related options.
Preparing for built-in clickable menu.

Signed-off-by: LI Qingwu <[email protected]>
Add menu button drawing function.
Update layout calculations for menu height.
Integrate menu rendering into notification display.

Signed-off-by: LI Qingwu <[email protected]>
Add function to handle built-in menu clicks.
Trigger action invocation on menu button click.

Signed-off-by: LI Qingwu <[email protected]>
Add menu_free_array call in notification_invalidate_actions,
ensure proper cleanup of menu resources when invalidating actions

Signed-off-by: LI Qingwu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants