v1cont / yad

Yet Another Dialog
GNU General Public License v3.0
682 stars 58 forks source link

Add functionality to menu option on tray notification icon? #192

Open trymeouteh opened 2 years ago

trymeouteh commented 2 years ago

How does one add functionality to the menu buttons in yad? This is my simple script below but I would like to execute some code when I right click the tray icon and click the "Quit" menu option.

#!/bin/bash

echo "Launch App"
yad --notification --text="My Tray Icon" --menu="Quit" --command="" --no-middle
v1cont commented 2 years ago

hi

you need to describe menu in a special form. see NOTIFICATION section in man page for details

in your case --menu="Quit!quit" will works

Tue, 09 Aug 2022 17:17:11 -0700 trymeouteh @.***> написав:

How does one add functionality to the menu buttons in yad? This is my simple script below but I would like to execute some code when I right click the tray icon and click the "Quit" menu option.

#!/bin/bash

echo "Launch App"
yad --notification --text="My Tray Icon" --menu="Quit" --command="" --no-middle

-- wbr Victor Ananjevsky @.***>