--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/k-dammit Tue Mar 17 18:07:18 2020 -0400
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+while true; do
+ inotifywait -q -e create --exclude '.*tmp.*' /dev/input
+ sleep 0.25
+ DISPLAY=:0.0 /home/sjl/src/dotfiles/bin/k
+done
--- a/bin/keysettings Tue Mar 17 18:07:11 2020 -0400
+++ b/bin/keysettings Tue Mar 17 18:07:18 2020 -0400
@@ -6,3 +6,4 @@
xmodmap ~/.Xmodmap
xset r rate 220 55
+# date > /home/sjl/.keys-mapped
--- a/fish/config.fish Tue Mar 17 18:07:11 2020 -0400
+++ b/fish/config.fish Tue Mar 17 18:07:18 2020 -0400
@@ -7,7 +7,7 @@
function eh; nvim ~/.hgrc; end
function ei; hg -R ~/src/inventory/ pull -u; and nvim ~/src/inventory/inventory.markdown; and hg -R ~/src/inventory/ ci -m 'Update inventory'; and hg -R ~/src/inventory/ push; end
function em; nvim ~/.mutt/muttrc; end
-function es; nvim ~/.stumpwmrc; end
+function es; cd ~/src/stumpwm; nvim ~/.stumpwmrc; end
function ev; nvim ~/.vimrc; end
function eff; nvim ~/.config/fish/functions; end
function essh; nvim ~/.ssh/config; end
--- a/lispwords Tue Mar 17 18:07:11 2020 -0400
+++ b/lispwords Tue Mar 17 18:07:18 2020 -0400
@@ -16,6 +16,7 @@
(1 multiple-value-call) ; maybe not...
(1 restart-case)
(1 handler-bind)
+(0 tagbody)
; my own weird things
(1 make-array)
--- a/stumpwmrc Tue Mar 17 18:07:11 2020 -0400
+++ b/stumpwmrc Tue Mar 17 18:07:18 2020 -0400
@@ -122,6 +122,25 @@
(throw 'error "Real required.")))))
+(defun window-match-p (query window)
+ (destructuring-bind (query-type query) query
+ (let ((value (ecase query-type
+ (:title (window-title window))
+ (:class (window-class window)))))
+ (etypecase query
+ (string (string= query value))
+ (function (ppcre:scan query value))))))
+
+(defun all-windows ()
+ (mapcan #'screen-windows *screen-list*))
+
+(defun find-window (query)
+ (find-if (lambda (w) (window-match-p query w)) (all-windows)))
+
+(defun find-windows (query)
+ (remove-if-not (lambda (w) (window-match-p query w)) (all-windows)))
+
+
;;;; Posture ------------------------------------------------------------------
(defparameter *posture-thread* nil)
(defparameter *posture-should-stop* nil)
@@ -310,7 +329,7 @@
(,extern ("--auto"))
(,extern ("--primary"))
;; (,laptop ("--auto"))
- ;; (,laptop ("--left-of" ,extern))
+ ;; (,laptop ("--right-of" ,extern))
)
do (uiop:run-program `("xrandr" "--output" ,output ,@commands))))
@@ -420,6 +439,11 @@
(defcommand gcontrol () ()
(run-or-raise "gcontrol" '(:class "Gnome-control-center")))
+(defcommand zoom () ()
+ (let ((window (find-window `(:title ,(ppcre:create-scanner "^Zoom Meeting ID: .*")))))
+ (when window
+ (focus-window window t))))
+
;;;; Timers -------------------------------------------------------------------
(defparameter *pop-timer-minutes* nil)
@@ -487,6 +511,7 @@
("H-b" "browser")
("H-B" "exec firefox")
("H-o" "spotify")
+ ("H-z" "zoom")
("H-q" "exec lock-screen")
("H-y" "screenshot")
("H-g" "gcontrol")
@@ -677,3 +702,5 @@
(defvar *dunst*
(run-shell-command "/usr/bin/dunst -conf ~/.dunstrc"))
+
+;;;; Scratch ------------------------------------------------------------------
--- a/xsessionrc Tue Mar 17 18:07:11 2020 -0400
+++ b/xsessionrc Tue Mar 17 18:07:18 2020 -0400
@@ -16,6 +16,8 @@
# xinput set-prop $TRACKPAD $CLICK 0, 1
/home/sjl/src/dotfiles/bin/keysettings
+/home/sjl/src/dotfiles/bin/k-dammit &
+
xcape -t 200 -e 'Control_L=Escape;Shift_L=Shift_L|9;Shift_R=Shift_R|0'
xautolock -time 30 -locker /home/sjl/src/dotfiles/bin/lock-screen &