Add ding, notify & pomo bin-scripts

This commit is contained in:
Henrik Lissner 2017-08-06 17:34:33 +02:00
parent 9e4dc09971
commit e05677be48
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 19 additions and 0 deletions

6
bin/ding Executable file
View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
DEFAULT="$HOME/.dotfiles/sounds/${1:-Titan.ogg}"
case $OSTYPE in
darwin*) afplay "$DEFAULT" ;;
linux*) paplay "$DEFAULT" ;;
esac

9
bin/notify Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
case $OSTYPE in
darwin*)
terminal-notifier -title "$1" -message "$2"
;;
linux*)
DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send "$1" "$2" -t 0
;;
esac

4
bin/pomo Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# A minimalistic pomodoro timer.
# e.g. pomo 25 "Hello!"
sleep $((${1:-25} * 60)) && notify "($(date +%H:%M)) ${2:-Break time!}" && ding &