summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2022-05-23 23:03:26 -0700
committerxyz <gky44px1999@gmail.com>2022-05-23 23:03:26 -0700
commita1c5e4138f2b72c7ac8aef7a970e940c62d4d5c4 (patch)
treef2886ff10323548adcc63db405a8dd11ab8bcfbd /home
parentf976f85c263b89ab015e06b3011c8eb2bcbc011b (diff)
alarm use multiple &&
Diffstat (limited to 'home')
-rwxr-xr-xhome/xyz/.local/bin/alarm4
1 files changed, 1 insertions, 3 deletions
diff --git a/home/xyz/.local/bin/alarm b/home/xyz/.local/bin/alarm
index 50fe0176..cdc96ed4 100755
--- a/home/xyz/.local/bin/alarm
+++ b/home/xyz/.local/bin/alarm
@@ -1,8 +1,6 @@
#!/bin/sh
-if printf 'notify-send -u critical "%s"; bell' "${2:-alarm}" | at now + "${1:-0}" minutes; then
- [ "$1" ] && notify-send "Successfully Scheduled"
-fi
+printf 'notify-send -u critical "%s"; bell' "${2:-alarm}" | at now + "${1:-0}" minutes && [ "$1" ] && [ "$1" -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'