summaryrefslogtreecommitdiff
path: root/home/xyz/.local/bin
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2022-07-18 04:26:14 -0700
committerxyz <gky44px1999@gmail.com>2022-07-18 04:26:14 -0700
commitd1ad37f9a8de8defa01d54465135f51268db5fcf (patch)
tree11889d4b62e051832963a4f09a395c3702676816 /home/xyz/.local/bin
parent09ced488e393933caa2c75050dfeaff93e537355 (diff)
alarm now transfer arguments to notify-send
Diffstat (limited to 'home/xyz/.local/bin')
-rwxr-xr-xhome/xyz/.local/bin/alarm4
1 files changed, 3 insertions, 1 deletions
diff --git a/home/xyz/.local/bin/alarm b/home/xyz/.local/bin/alarm
index cdc96ed4..06c506b0 100755
--- a/home/xyz/.local/bin/alarm
+++ b/home/xyz/.local/bin/alarm
@@ -1,6 +1,8 @@
#!/bin/sh
-printf 'notify-send -u critical "%s"; bell' "${2:-alarm}" | at now + "${1:-0}" minutes && [ "$1" ] && [ "$1" -ne 0 ] && notify-send "Successfully Scheduled"
+min="$1"
+[ "$1" ] && shift
+printf "notify-send -u critical %s; bell" "$(/bin/printf '%q ' "${@:-alarm}")" | at now + "${min:-0}" minutes && [ "$min" ] && [ "$min" -ne 0 ] && notify-send "Successfully Scheduled"
# at used to not like string like 'Boiling Water!', don't know why now it works, if see similar issue, use folllowing codes
#at now + "$1" minutes << EOF && notify-send 'Successfully Scheduled'