所以我想做一个日历,它可以用作每天的记事本,就像一个提醒。我想知道是否有一种方法,当用户单击日期时,程序会打开一个 --entry 文本窗口并询问所需的提醒。然后当再次选择同一日期时,提醒仍然存在。谢谢,这是我的代码
#!/bin/bash
function Ddate()
{
zenity --info \
--title "Date and Time" \
--text "Today is $(date)"
}
function Dcalendar()
{
zenity --calendar \
--title "Calendar"
}
function DReminder()
{
--title "Reminder" \
--entry-text "Birthday/Events..."
}
function DDelete()
{
zenity --entry-text "Enter Path" > \
--title "DELETE"
}
while true;
do
choice="$(zenity --height 275 --width 450 \
--list \
--title="Menu" \
--column="Function" --column="Description" \
Date 'Display the actual date and time.' \
Calendar 'Display an interactive calendar.' \
Delete 'Let you delete a file.' \
Exit 'To quit this script.')"
case $choice in
Date) Ddate;;
Calendar) Dcalendar;;
Delete) Ddelete;;
Exit) break;;
esac
done