From 4e00211c0295eaa11b3d0e981a75b3c1d89aaec7 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 26 Sep 2023 08:26:55 -0400 Subject: [PATCH 1/2] Reminder notifications now play a sound before they happen, so should be harder to miss. --- i38.sh | 2 +- scripts/reminder.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/i38.sh b/i38.sh index 4a20602..2f7a8db 100755 --- a/i38.sh +++ b/i38.sh @@ -619,7 +619,7 @@ if [[ -x "/usr/libexec/notification-daemon" ]]; then echo 'exec_always --no-startup-id /usr/libexec/notification-daemon -r' fi if command -v remind &> /dev/null && command -v notify-send &> /dev/null ; then - echo "exec_always --no-startup-id $(command -v remind) -z '-k:notify-send %s &' ${HOME}/.reminders < /dev/null > /dev/null 2>&1" + echo "exec_always --no-startup-id $(command -v remind) -z '-k:${HOME}/.config/i3/scripts/reminder.sh %s &' ${HOME}/.reminders < /dev/null > /dev/null 2>&1" fi if [[ $dex -eq 0 ]]; then echo '# Start XDG autostart .desktop files using dex. See also' diff --git a/scripts/reminder.sh b/scripts/reminder.sh index 3b1e382..930f32e 100755 --- a/scripts/reminder.sh +++ b/scripts/reminder.sh @@ -145,6 +145,12 @@ if ! command -v remind &> /dev/null ; then exit 1 fi +if [[ $# -ne 0 ]]; then + sox -ndqV0 synth .1 tri 600 norm -9 pad .05 repeat + notify-send "$*" + exit 0 +fi + while : ; do action=$(yad --title "I38 - Reminders" --form \ --button="_Add Reminder!gtk-ok":0 \ From 563e0277aaebe5198587e2b68ef7111ac6ba6573 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 26 Sep 2023 08:33:15 -0400 Subject: [PATCH 2/2] View reminder wil now tell you if there are no reminders. --- scripts/reminder.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/reminder.sh b/scripts/reminder.sh index 930f32e..41d7889 100755 --- a/scripts/reminder.sh +++ b/scripts/reminder.sh @@ -94,8 +94,12 @@ add_weekly_reminder() { } view_reminders() { -mapfile -t lines < ~/.reminders - + if ! [[ -r ~/.reminders ]]; then + error "No reminders found." + return + fi + + mapfile -t lines < ~/.reminders # Create an empty array to store cleaned-up reminders yadMenu=()