From a1c5e4138f2b72c7ac8aef7a970e940c62d4d5c4 Mon Sep 17 00:00:00 2001 From: xyz Date: Mon, 23 May 2022 23:03:26 -0700 Subject: alarm use multiple && --- home/xyz/.local/bin/alarm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'home') 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' -- cgit v1.2.3-70-g09d2