diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-10-29 19:36:24 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-10-29 19:36:24 -0300 |
commit | 9793d32d10becaceeb52169a280a747b773c0b45 (patch) | |
tree | 750bf75d016bab2fc27e0ae45d1e0c6be16f4a09 | |
parent | d8cb07b0e53e6757c42d7ad5adcfee2cef5826cc (diff) | |
download | utils-x11-9793d32d10becaceeb52169a280a747b773c0b45.tar.gz utils-x11-9793d32d10becaceeb52169a280a747b773c0b45.tar.bz2 |
-rwxr-xr-x | notifier | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/notifier b/notifier new file mode 100755 index 0000000..77fc0f6 --- /dev/null +++ b/notifier @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Notifier: a simple tool that notifies once a command finished. +# Runs a task, compute it's duration and notify upon completion. +# + +# Dispatch +time "$@" + +# Opportunistic UX depending on the available environment +if which awesome-client &> /dev/null; then + echo "naughty.notify({title = \"Action completed:\", text =\"${@}\", timeout = 2})" | awesome-client +# This one is more intrusive +#elif which sm &> /dev/null; then +# sm -f '#ffffff' -b '#1c1c1c' "Action completed: ${@}" +fi |