blob: 77fc0f633ec451faa0afa38d059452df77b093c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
|