# HG changeset patch # User Steve Losh # Date 1584469704 25200 # Node ID 98624cb702b75a798953e490b392984405ea3309 # Parent 0fc8cb89809b0a84c1d2b9e028589dea354f3a4e More diff -r 0fc8cb89809b -r 98624cb702b7 bin/k-dammit --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/k-dammit Tue Mar 17 11:28:24 2020 -0700 @@ -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 diff -r 0fc8cb89809b -r 98624cb702b7 bin/keysettings --- a/bin/keysettings Fri Feb 21 14:15:09 2020 -0500 +++ b/bin/keysettings Tue Mar 17 11:28:24 2020 -0700 @@ -6,3 +6,4 @@ xmodmap ~/.Xmodmap xset r rate 220 55 +# date > /home/sjl/.keys-mapped diff -r 0fc8cb89809b -r 98624cb702b7 fish/config.fish --- a/fish/config.fish Fri Feb 21 14:15:09 2020 -0500 +++ b/fish/config.fish Tue Mar 17 11:28:24 2020 -0700 @@ -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 diff -r 0fc8cb89809b -r 98624cb702b7 lispwords --- a/lispwords Fri Feb 21 14:15:09 2020 -0500 +++ b/lispwords Tue Mar 17 11:28:24 2020 -0700 @@ -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) diff -r 0fc8cb89809b -r 98624cb702b7 stumpwmrc --- a/stumpwmrc Fri Feb 21 14:15:09 2020 -0500 +++ b/stumpwmrc Tue Mar 17 11:28:24 2020 -0700 @@ -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 ------------------------------------------------------------------ diff -r 0fc8cb89809b -r 98624cb702b7 xsessionrc --- a/xsessionrc Fri Feb 21 14:15:09 2020 -0500 +++ b/xsessionrc Tue Mar 17 11:28:24 2020 -0700 @@ -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 &