Reputation: 97
How does one add a bash command to a menu button in a yad notification. This is my code so far and when you right click on the tray icon, it will show a "Quit" option which when clicked on, does nothing. How does one add functionality to the quit button?
#!/bin/bash
echo "Launch App"
yad --notification --text="My Tray Icon" --menu="Quit" --command="" --no-middle
Upvotes: 0
Views: 1079
Reputation: 585
Unfortunately the documentation for yad doesn't have great explanations, complete examples, or a quick start or theory-of-operation section.
But from the user manual, it specifies "STRING must be in form name1[!action1[!icon1]]|name2[!action2[!icon2]]."
From this I guessed that this should work, and it does:
#!/bin/bash
echo "Launch App"
yad --notification --text="My Tray Icon" --menu="Quit!quit" --command="" --no-middle
Upvotes: 1