# HG changeset patch # User Steve Losh # Date 1535761614 0 # Node ID 26d3b19a08938930b576cedb18bc6fca706be6c5 # Parent b0a3022c9a1d55df6a1c4eecdb7fdb7d991f2c19 Quever Est diff -r b0a3022c9a1d -r 26d3b19a0893 bin/say --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/say Sat Sep 01 00:26:54 2018 +0000 @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +spd-say --volume -70 --pitch 40 --voice-type female3 --rate -10 "$@" diff -r b0a3022c9a1d -r 26d3b19a0893 stumpwmrc --- a/stumpwmrc Fri Aug 31 18:12:37 2018 +0000 +++ b/stumpwmrc Sat Sep 01 00:26:54 2018 +0000 @@ -81,6 +81,11 @@ `(case *host* ,@clauses)) +(defun speak (text) + (message text) + (run-shell-command (format nil "~~/src/dotfiles/bin/say '~A'" text))) + + ;;;; Regroup ------------------------------------------------------------------ (defparameter *class-groups* '(("jetbrains-idea-ce" . "ij")) @@ -224,6 +229,24 @@ (t "firefox")))) +;;;; EQ Timers ---------------------------------------------------------------- +(defcommand pop-timer (minutes seconds) + ((:number "Minutes: ") + (:number "Seconds: ")) + (message "Setting pop timer for ~D:~2,'0D." minutes seconds) + (let* ((total-time (+ (* minutes 60) seconds)) + (initial-time (- total-time 60))) + (sb-thread:make-thread + (lambda () + (if (plusp initial-time) + (progn (sleep initial-time) + (speak "Pop in one minute.") + (sleep 60)) + (sleep total-time)) + (speak "Pop!")) + :name "Pop Timer"))) + + ;;;; Key Mapping -------------------------------------------------------------- (defmacro define-top-keys (&body keyforms) `(progn ,@(loop :for form :in keyforms @@ -289,6 +312,9 @@ ("H-F2" "exec amixer -q sset Master 5%-") ("H-F3" "exec amixer -q sset Master 5%+")) +(define-top-keys ;; timers + ("s-F9" "pop-timer 6 40")) + (define-top-keys ;; stump ("H-F9" "exec systemctl suspend") ("H-F10" "exec keysettings")