generated from me/template-mit
Add icon and persistence to notification.
This commit is contained in:
1 parent
fae03c94d9
commit
21f02945bb
1 file changed
+5
-2
+5
-2
@@ -97,10 +97,13 @@ show_alert() {
|
|||||||
TITLE="Sunset Alarm"
|
TITLE="Sunset Alarm"
|
||||||
MESSAGE="Sunset is in ${MINUTES} minute(s)."
|
MESSAGE="Sunset is in ${MINUTES} minute(s)."
|
||||||
|
|
||||||
|
persistent="-t 0 --wait"
|
||||||
|
icon="-i weather-clear"
|
||||||
|
|
||||||
if command -v fyi >/dev/null 2>&1; then
|
if command -v fyi >/dev/null 2>&1; then
|
||||||
fyi "$TITLE" "$MESSAGE"
|
fyi $icon $persistent "$TITLE" "$MESSAGE"
|
||||||
elif command -v notify-send >/dev/null 2>&1; then
|
elif command -v notify-send >/dev/null 2>&1; then
|
||||||
notify-send "$TITLE" "$MESSAGE"
|
notify-send $icon $persistent "$TITLE" "$MESSAGE"
|
||||||
elif command -v wall >/dev/null 2>&1; then
|
elif command -v wall >/dev/null 2>&1; then
|
||||||
echo "${TITLE}: ${MESSAGE}" | wall
|
echo "${TITLE}: ${MESSAGE}" | wall
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user