I want a script to send a notification that asks something and i want the notification to have a button.
notify-send doesn't seem to support this or i can't see the function.
I'm using Plasma.
- 151
3 Answers
Something like in a bash file?...
#! /bin/sh
kdialog --msgbox 'Test Message' Details
Take a look at https://develop.kde.org/deploy/kdialog/ for more options and examples.
- 704
It looks like dunstify, part of the dunst notification daemon, may do what you want:
dunstify -A yes.ACCEPT -A no,DECLINE "A message"
Dunst is available on Ubuntu, but apparently doesn't integrate very well with Plasma on KDE or Unity. You should still be able to use it though if it integrates well enough for your needs and you manage to install it.
I came acrosss dunstify on the Arch Wiki when searching for an answer to a similar problem but haven't managed to get it working. You might have more luck.
- 210
In my system(ubuntu 20.04 gnome shell 3.36.9) following works.
#/usr/bin/env bash
gdialog --msgbox 'Hi'
gdialog is wrapper of zenity in gnome shell environment. For detailed use, run zenity --help
zenity --info --text='Hi' equals above gdialog command
Please refer https://help.gnome.org/users/zenity/3.32/
- 11
- 4