diff options
-rwxr-xr-x | journal-reminder | 29 | ||||
-rwxr-xr-x | journal-reminder.ros | 36 | ||||
-rwxr-xr-x | start-emacs | 4 | ||||
-rwxr-xr-x | start-redshift | 12 | ||||
-rwxr-xr-x | stop-emacs | 3 | ||||
-rwxr-xr-x | stop-redshift | 3 |
6 files changed, 0 insertions, 87 deletions
diff --git a/journal-reminder b/journal-reminder deleted file mode 100755 index 82e188f..0000000 --- a/journal-reminder +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env racket -#|-*- mode:scheme *-*|# -#lang racket/base - -(require (only-in racket/cmdline command-line)) - -(define +journal-dir+ "/home/ben/Dropbox/org/journal") - -(define (pad-zero n) (if (< n 10) (format "0~a" n) n)) - -(define (today) - (let* [(date (seconds->date (current-seconds))) - (year (date-year date)) - (month (date-month date)) - (day (date-day date))] - (format "~a~a~a" - (date-year date) - (pad-zero month) - (pad-zero day)))) - -(define (journal-file d) - (format "~a/~a" +journal-dir+ d)) - -(define (journaled-today? d) - (if (file-exists? (journal-file d)) #t #f)) - -(if (not (journaled-today? (today))) - "You still need to journal!" - null) diff --git a/journal-reminder.ros b/journal-reminder.ros deleted file mode 100755 index 500be53..0000000 --- a/journal-reminder.ros +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -#|-*- mode:lisp -*-|# -#| -exec ros -Q -- $0 "$@" -|# - -(defpackage :me.bsima.journal-reminder (:use :cl)) -(in-package :me.bsima.journal-reminder) - -(defparameter *journal-dir* "/home/ben/Dropbox/org/journal") - -(defun today-string () - (multiple-value-bind (second minute hour day month year) - (get-decoded-time) - (declare (ignore second minute hour)) - (format nil "~d~d~d" year month day))) - -(defun mk-journal-file (journal-dir date) - (format nil "~a/~a" journal-dir date)) - -(defun journaled-today? () - (let ((journal-file (mk-journal-file *journal-dir* (today-string)))) - (if (probe-file journal-file) - T - nil))) - -(defun journal-reminder (&rest argv) - (declare (ignorable argv)) - ;; If journal-dir argumen is supplied, use it - (let ((*journal-dir* (or (first argv) *journal-dir*))) - (if (journaled-today?) - nil - (format t "You still need to journal!~%")))) - -(defun main (&rest argv) - (apply #'journal-reminder argv)) diff --git a/start-emacs b/start-emacs deleted file mode 100755 index 439a63f..0000000 --- a/start-emacs +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh - -source ~/.nix-profile/etc/profile.d/nix.sh -emacs --daemon
\ No newline at end of file diff --git a/start-redshift b/start-redshift deleted file mode 100755 index 81b985d..0000000 --- a/start-redshift +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env sh - -set -o errexit -set -o nounset -#set -o xtrace - -REQ=$(curl -sS freegeoip.net/json/) -LAT=$(echo $REQ | jq ".latitude") -LON=$(echo $REQ | jq ."longitude") - -# start redshift as a background task -redshift -l $LAT:$LON & diff --git a/stop-emacs b/stop-emacs deleted file mode 100755 index f681d56..0000000 --- a/stop-emacs +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -emacsclient --eval "(progn (setq kill-emacs-hook 'nil) (kill-emacs))"
\ No newline at end of file diff --git a/stop-redshift b/stop-redshift deleted file mode 100755 index 1d68b88..0000000 --- a/stop-redshift +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -pkill redshift
\ No newline at end of file |