From 385a34e2f05d0825a61d8dc6ae59f5255abe27e6 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Wed, 19 Apr 2017 13:47:14 -0400 Subject: [PATCH] Add reminder alias to tako --- tako/config.tako | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tako/config.tako b/tako/config.tako index 874698c..1160934 100644 --- a/tako/config.tako +++ b/tako/config.tako @@ -42,6 +42,15 @@ def _workon(args, stdin=None): def _sympy(args, stdin=None): source @($HOME + '/.config/tako/sympy.tako') +def _reminder(args, stdin=None): + time, text = args + command = 'notify-send {} {}'.format(time, repr(text)) + filename = $(mktemp) + with open(filename, 'w') as f: f.write(command) + at -M @(time) -f @(filename) all> /dev/null + atq + rm @(filename) + $TAKO_SETTINGS.aliases.update({ 'startx': 'ssh-agent startx ; vlock', 'ls': 'ls --color=auto', @@ -54,6 +63,7 @@ $TAKO_SETTINGS.aliases.update({ 'octave': 'octave-cli', 'bc': 'bc -l', 'sympy': _sympy, + 'reminder': _reminder, }) if 'TERM' in ${...}: