diff --git a/bin/ding b/bin/ding new file mode 100755 index 00000000..3bdf6b20 --- /dev/null +++ b/bin/ding @@ -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 diff --git a/bin/notify b/bin/notify new file mode 100755 index 00000000..6d43802e --- /dev/null +++ b/bin/notify @@ -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 diff --git a/bin/pomo b/bin/pomo new file mode 100755 index 00000000..999f5b16 --- /dev/null +++ b/bin/pomo @@ -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 & \ No newline at end of file