Skip to content

Conversation

@ORDL-AMF
Copy link

@ORDL-AMF ORDL-AMF commented Mar 25, 2025

Title: Add MOUSE_CLEAR_CURRENT Action to Close Notification Under Cursor

Description:
Introduces a new mouse action, MOUSE_CLEAR_CURRENT, allowing users to close the notification under the mouse cursor with a left-click or desired by editing 'dunstrc' file. This removes the notification from history by id. This enhances user control over notifications.

Changes

  • src/settings.h: Added MOUSE_CLEAR_CURRENT to enum mouse_action.
  • src/settings_data.h: Added clear_current | MOUSE_CLEAR_CURRENT.
  • src/input.c: Implemented in input_handle_click to close the notification, remove it from history, and redraw.

Details

  • Closes notification with REASON_USER.
  • Uses a static dunst_status to reset fullscreen/pause/idle states.
  • Compatible with X11 and Wayland.
  • Triggers redraw via wake_up even if no notification is found.

Testing

  • Verified on X11 and Wayland simulators; works as intended.
  • No conflicts with existing functionality across 65 files.

Feedback welcome!

- Adds a new mouse action to clear the notification under the cursor.
- Closes the notification, removes it from history, and refreshes the display.
- Updates settings.h, settings_data.h, and input.c.
- Compatible with both X11 and Wayland backends.
@bynect
Copy link
Contributor

bynect commented Mar 25, 2025

hello. is the difference with close_current that the notification is erased from history? it might be good to add it to the description

@ORDL-AMF
Copy link
Author

hello. is the difference with close_current that the notification is erased from history? it might be good to add it to the description

Yes, it removes the selected notification from history.

@bynect
Copy link
Contributor

bynect commented Mar 30, 2025

please fix the build problems

@ORDL-AMF
Copy link
Author

ORDL-AMF commented Apr 4, 2025

Sorry, I'll have the updated version up this weekend!

@bynect
Copy link
Contributor

bynect commented May 5, 2025

any news?

@bynect
Copy link
Contributor

bynect commented Aug 4, 2025

superseded by #1491

@bynect bynect closed this Aug 4, 2025
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