Here’s how to set up a macOS terminal timer that uses notifications:
-
Enable
atrun
:sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist
If you’re on macOS Mojave or higher, you’ll also need to give
atrun
and Terminal full disk access. To do so:-
Open System Preferences > Security & Privacy > Privacy > Full Disk Access and click the lock to make changes.
-
Click the + button to open the file dialog and use Command + Shift + G to go to
/usr/libexec/atrun
and open it. -
Repeat the process for
/Applications/Utilities/Terminal.app
.
-
-
Install
reattach-to-user-namespace
:- Homebrew:
brew install reattach-to-user-namespace
- MacPorts:
sudo port install tmux-pasteboard
- Homebrew:
-
Add to
~/.profile
:after() ( count=$1; shift unit=$1; shift title=`echo $* | sed 's/"/\\\"/g'` at now + $count $unit <<-EOF reattach-to-user-namespace osascript -e ' display notification with title "$title" sound name ""' EOF )
-
Enjoy:
$ after 1 minute cookies are ready!