Sorry, it wasn’t the “clear all notifications” button that I was originally looking for - I just wanted to remove all notifications from the screen with a shortcut:
for i in $(seq $(notify-send -p " " -t 1) -1 0); do qdbus org.kde.plasmashell /org/freedesktop/Notifications org.freedesktop.Notifications.CloseNotification $i; done
now this script is suboptimal - it creates a new notification to get currently highest id and then removes all notifications with smaller ids - there could be maybe only two or three, but it may iterate through hundreds.
If anyone knows any way to get the actual list of current notifications (on the screen, not in the plasmoid) please let me know.