adb18a61e30f

More
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 16 Jul 2026 11:08:03 -0400
parents 581345d6b360
children c76aecc93001
branches/tags (none)
files bin/keysettings remote/bash_profile stumpwm/key-mapping.lisp stumpwm/tasks.lisp

Changes

--- a/bin/keysettings	Mon Jun 29 12:50:56 2026 -0400
+++ b/bin/keysettings	Thu Jul 16 11:08:03 2026 -0400
@@ -4,6 +4,6 @@
 xbindkeys
 
 xmodmap ~/.Xmodmap
-xset r rate 220 55
+xset r rate 200 60
 
 # date > /home/sjl/.keys-mapped
--- a/remote/bash_profile	Mon Jun 29 12:50:56 2026 -0400
+++ b/remote/bash_profile	Thu Jul 16 11:08:03 2026 -0400
@@ -40,7 +40,7 @@
 }
 
 function histgrep {
-    history | grep "$@" | tac | f 2-
+    history | grep "$@" | sed -Ee 's/^ *[0-9]+ *//'
 }
 
 function mcd {
--- a/stumpwm/key-mapping.lisp	Mon Jun 29 12:50:56 2026 -0400
+++ b/stumpwm/key-mapping.lisp	Thu Jul 16 11:08:03 2026 -0400
@@ -31,7 +31,6 @@
   ("H-SunPageUp" "st-font-up")
   ("H-SunPageDown" "st-font-down")
   ("H-z" "fullscreen")
-  ("H-Z" "end-zoom")
   ("H-F4" "switch-yubikeys")
   ("H-\\" "pass-personal")
   ("H-|" "generate-password")
@@ -40,7 +39,6 @@
   ("H-b" "browser")
   ("H-O" "spotify")
   ("H-o" "files")
-  ("H-t" "zoom-meeting")
   ("F26"   "prev")
   ("S-F26" "next")
   ("H-q" "exec lock-screen")
@@ -83,7 +81,6 @@
   ("H-8" "gselect 8")
   ("H-9" "gselect 9")
 
-
   ("H-!" "gmove 1")
   ("H-@" "gmove 2")
   ("H-#" "gmove 3")
@@ -145,6 +142,10 @@
   ("H-F8" "screen-external")
   ("H-x" "xrandr"))
 
+(define-top-keys ;; tasks
+  ("H--" "tasks-finish")
+  ("H-:" "tasks-new"))
+
 (define-top-keys ;; layout
   ("s-H-o" "only")
   ("s-H-n" "restore-from-file notes")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stumpwm/tasks.lisp	Thu Jul 16 11:08:03 2026 -0400
@@ -0,0 +1,33 @@
+(in-package :stumpwm-user)
+
+(defun parse-task-line (line)
+  (ppcre:register-groups-bind (id task) ("^([a-f0-9]+) - (.*)$" line)
+    (cons id task)))
+
+
+(defun tasks/new% (task)
+  (sh `("t" ,task) :wait nil))
+
+(defun tasks/list% ()
+  (mapcar #'parse-task-line (sh '("t") :result-type 'list)))
+
+(defun tasks/finish% (id)
+  (sh `("t" "-f" ,id) :wait nil))
+
+(defun tasks/menu% (prompt)
+  (second (select-from-menu
+            (current-screen)
+            (mapcar (juxt #'cdr #'car) (tasks/list%))
+            prompt)))
+
+
+(defcommand tasks-new (task) ((:string "Task: "))
+  (tasks/new% task))
+
+(defcommand tasks-list () ()
+  (message (format nil "~{~A~^~%~}"
+                   (mapcar #'cdr (tasks/list%)))))
+
+(defcommand tasks-finish () ()
+  (when-let ((id (tasks/menu% "Finish task: ")))
+    (tasks/finish% id)))