26d3b19a0893
Quever Est
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Sat, 01 Sep 2018 00:26:54 +0000 |
parents | b0a3022c9a1d |
children | 2750e52c0785 9990bd90c76d |
branches/tags | (none) |
files | bin/say stumpwmrc |
Changes
--- /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 "$@"
--- 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")