-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathd-remind
More file actions
executable file
·27 lines (22 loc) · 863 Bytes
/
d-remind
File metadata and controls
executable file
·27 lines (22 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
source d-var.conf
menuopts=("now + 5 minutes" "now + 10 minutes" "now + 15 minutes" "now + 25 minutes" "now + 2 hour" "19:45 today" "16:30 tomorrow" "4pm + 1 days" "10am Jul 31")
remindopt=(
"Short break Over!"
"Long break done!"
"Drink Water!"
"Stop wasting time & Read something"
"Learn the market"
)
info_remind=" Time - Date ? Like Eg -- hh:mm Jul 10"
# notify-send -t 4000 "${info_remind}"
# define variable for time and text
time="${1:-$(printf '%s\n' "${menuopts[@]}" | $L_MENU -i -p ' ')}" && \
text="$(printf "%s\n" "${remindopts[@]}" | $L_MENU -p ' ')"
# check if both arg given
if [[ "$time" ]]; then
echo "notify-send -u critical ' 🔔 Reminder 💡' '$text'" | at "$time"
notify-send "Schedules: " "$(atq)" -t 3000
else
notify-send "Please set the time and clock" -t 2000
fi