So, I have this script:
#!/bin/sh
#InputBox1Test
title=$(zenity --entry --text 'Type what you want your Notification Title to Say!' --title 'Notification')
text=$(zenity --entry --text 'Type what you want your Notification body to Say!' --title 'Notification')
DISPLAY=:0.0 notify-send "$title" "$text"
This script opens a zenity window, and walks you through generating a notification. I want to make it exit when you press cancel. How do I do that?
echo "$?"
and then test what zenity returns for each button plus escape key. Then later put in test of values you wish to trap and act upon.Escape
key andCtrl
+F4
key too but I'll write an answer for1
and0
.