ed5b606670fb default tip

More
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 29 Jan 2026 13:29:06 -0500
parents 48d8f42bf780
children (none)
branches/tags default tip
files XCompose bash_profile fish/config.fish remote/bash_profile remote/bin/fastq-grep stumpwm/external-screens.lisp stumpwm/igv.lisp stumpwm/key-mapping.lisp stumpwm/local-share-stumpwm/3440/thirds.dump stumpwm/package.lisp stumpwm/stumpconfig.asd stumpwm/terminal-fonts.lisp vim/vimrc-minimal

Changes

--- a/XCompose	Wed Dec 10 11:07:06 2025 -0500
+++ b/XCompose	Thu Jan 29 13:29:06 2026 -0500
@@ -100,4 +100,3 @@
 
 
 
-
--- a/bash_profile	Wed Dec 10 11:07:06 2025 -0500
+++ b/bash_profile	Thu Jan 29 13:29:06 2026 -0500
@@ -106,7 +106,7 @@
 export LESS_TERMCAP_md=$(printf '\e[01;38;5;74m')  # begin bold
 export LESS_TERMCAP_me=$(printf '\e[0m')           # end mode
 export LESS_TERMCAP_se=$(printf '\e[0m')           # end standout-mode
-export LESS_TERMCAP_so=$(printf '\e[38;5;246m')    # begin standout-mode - info box
+export LESS_TERMCAP_so=$(printf '\e[38;5;16m\e[48;5;11m')    # begin standout-mode - info box
 export LESS_TERMCAP_ue=$(printf '\e[0m')           # end underline
 export LESS_TERMCAP_us=$(printf '\e[04;38;5;146m') # begin underline
 export PAGER='less -iX'
--- a/fish/config.fish	Wed Dec 10 11:07:06 2025 -0500
+++ b/fish/config.fish	Thu Jan 29 13:29:06 2026 -0500
@@ -141,8 +141,8 @@
 set -g -x LESS_TERMCAP_mb (printf '\e[01;31m')       # begin blinking
 set -g -x LESS_TERMCAP_md (printf '\e[01;38;5;74m')  # begin bold
 set -g -x LESS_TERMCAP_me (printf '\e[0m')           # end mode
+set -g -x LESS_TERMCAP_so (printf '\e[38;5;16m\e[48;5;11m')    # begin standout-mode - info box
 set -g -x LESS_TERMCAP_se (printf '\e[0m')           # end standout-mode
-set -g -x LESS_TERMCAP_so (printf '\e[38;5;246m')    # begin standout-mode - info box
 set -g -x LESS_TERMCAP_ue (printf '\e[0m')           # end underline
 set -g -x LESS_TERMCAP_us (printf '\e[04;38;5;146m') # begin underline
 
--- a/remote/bash_profile	Wed Dec 10 11:07:06 2025 -0500
+++ b/remote/bash_profile	Thu Jan 29 13:29:06 2026 -0500
@@ -99,7 +99,7 @@
 export LESS_TERMCAP_md=$(printf '\e[01;38;5;74m')  # begin bold
 export LESS_TERMCAP_me=$(printf '\e[0m')           # end mode
 export LESS_TERMCAP_se=$(printf '\e[0m')           # end standout-mode
-export LESS_TERMCAP_so=$(printf '\e[38;5;246m')    # begin standout-mode - info box
+export LESS_TERMCAP_so=$(printf '\e[38;5;16m\e[48;5;11m')    # begin standout-mode - info box
 export LESS_TERMCAP_ue=$(printf '\e[0m')           # end underline
 export LESS_TERMCAP_us=$(printf '\e[04;38;5;146m') # begin underline
 export PAGER='less -iX'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/remote/bin/fastq-grep	Thu Jan 29 13:29:06 2026 -0500
@@ -0,0 +1,1 @@
+../../bin/fastq-grep
\ No newline at end of file
--- a/stumpwm/external-screens.lisp	Wed Dec 10 11:07:06 2025 -0500
+++ b/stumpwm/external-screens.lisp	Thu Jan 29 13:29:06 2026 -0500
@@ -1,5 +1,87 @@
 (in-package :stumpwm-user)
 
+(defun parse-xrandr-display-line (line)
+  (str:words (str:replace-all " +[(]normal.+[)].*" "" line :regex t)
+             :limit 2))
+
+(defun xrandr% ()
+  (reverse
+    (iterate
+      (with modes = (list))
+      ;; reverse to avoid final extra collect
+      (for line :in (reverse (sh '("xrandr") :result-type 'list)))
+      (when (str:starts-with-p "Screen " line)
+        (next-iteration))
+      (if (str:starts-with-p " " line)
+        (push (str:trim line) modes)
+        (progn (collect (list (parse-xrandr-display-line line) modes))
+               (setf modes nil))))))
+
+
+(defun xrandr/auto (display)
+  (sh `("xrandr" "--output" ,display "--auto") :wait nil))
+
+(defun xrandr/primary (display)
+  (sh `("xrandr" "--output" ,display "--primary") :wait nil))
+
+(defun xrandr/off (display)
+  (sh `("xrandr" "--output" ,display "--off") :wait nil))
+
+(defun xrandr/mode (display mode)
+  (sh `("xrandr" "--output" ,display "--mode" ,mode) :wait nil))
+
+(defun xrandr/dir (display dir other-display)
+  (sh `("xrandr" "--output" ,display
+        ,(ecase dir
+           (:left "--left-of")
+           (:right "--right-of")
+           (:same-as "--same-as"))
+        ,other-display)
+      :wait nil))
+
+(defun xrandr/menu-display (&aux (entries (xrandr%)))
+  (second (select-from-menu
+            (current-screen)
+            (mapcar (lambda (entry)
+                      (destructuring-bind ((display state) modes) entry
+                        (list (format nil "~A (~D modes) ~A"
+                                      display (length modes) state)
+                              entry)))
+                    entries)
+            "xrandr display:")))
+
+(defun xrandr/menu-action (entry)
+  (destructuring-bind ((display state) modes) entry
+    (declare (ignore state))
+    (second (select-from-menu
+              (current-screen)
+              (list* '("auto" :auto)
+                     '("primary" :primary)
+                     '("off" :off)
+                     '("left of" :left)
+                     '("right of" :right)
+                     '("same as" :same-as)
+                     (loop :for mode in modes
+                           :collect (list mode (first (str:words mode)))))
+              (format nil "xrandr / ~A:" display)))))
+
+(defcommand xrandr () ()
+  (when-let ((display-entry (xrandr/menu-display)))
+    (destructuring-bind ((display state) modes) display-entry
+      (declare (ignore state modes))
+      (when-let ((action (xrandr/menu-action display-entry)))
+        (cond
+          ((eql action :off) (xrandr/off display))
+          ((eql action :auto) (xrandr/auto display))
+          ((eql action :primary) (xrandr/primary display))
+          ((member action '(:left :right :same-as))
+           (when-let ((other-display-entry (xrandr/menu-display)))
+             (destructuring-bind ((other-display state) modes) other-display-entry
+               (declare (ignore state modes))
+               (xrandr/dir display action other-display))))
+          (t (xrandr/mode display action)))))))
+
+
 (defcommand screen-laptop () ()
   (only)
   (hostcase
--- a/stumpwm/igv.lisp	Wed Dec 10 11:07:06 2025 -0500
+++ b/stumpwm/igv.lisp	Thu Jan 29 13:29:06 2026 -0500
@@ -84,10 +84,12 @@
   (group% :selected))
 
 (defcommand igv/clear-read-selections () ()
-  (clear-read-selections%))
+  (clear-read-selections%)
+  (group% nil))
 
 (defcommand igv/select-reads () ()
   (select-reads%)
+  (sleep 0.1)
   (group% :selected))
 
 (defcommand igv/goto () ()
@@ -104,8 +106,12 @@
 
 (defcommand igv/goto-read () ()
   (clear-read-selections%)
-  (goto%)
-  (select-reads%))
+  (sleep 0.1)
+  (select-reads%)
+  (sleep 0.1)
+  (group% :selected)
+  (sleep 0.1)
+  (goto%))
 
 (defcommand igv/init () ()
   (send-igv-batch-file "/home/sjl/bin/igv.batch"))
--- a/stumpwm/key-mapping.lisp	Wed Dec 10 11:07:06 2025 -0500
+++ b/stumpwm/key-mapping.lisp	Thu Jan 29 13:29:06 2026 -0500
@@ -30,8 +30,6 @@
   ("H-SunPageDown" "st-font-down")
   ("H-z" "fullscreen")
   ("H-Z" "end-zoom")
-  ("S-H-F1" "bht")
-  ("C-S-F1" "bht")
   ("H-F4" "switch-yubikeys")
   ("H-\\" "pass-personal")
   ("H-|" "generate-password")
@@ -83,16 +81,6 @@
   ("H-8" "gselect 8")
   ("H-9" "gselect 9")
 
-  ("KP_Insert"    "vgroups")
-  ("KP_End"       "gselect 1")
-  ("KP_Down"      "gselect 2")
-  ("KP_Page_Down" "gselect 3")
-  ("KP_Left"      "gselect 4")
-  ("KP_Begin"     "gselect 5")
-  ("KP_Right"     "gselect 6")
-  ("KP_Home"      "gselect 7")
-  ("KP_Up"        "gselect 8")
-  ("KP_Page_Up"   "gselect 9")
 
   ("H-!" "gmove 1")
   ("H-@" "gmove 2")
@@ -152,7 +140,8 @@
   ("H-F5" "rotate-brightness-down")
   ("H-F6" "rotate-brightness-up")
   ("H-F7" "screen-laptop")
-  ("H-F8" "screen-external"))
+  ("H-F8" "screen-external")
+  ("H-x" "xrandr"))
 
 (define-top-keys ;; layout
   ("s-H-o" "only")
@@ -184,6 +173,20 @@
   ("H-F11" "toggle-current-mode-line")
   ("H-F12" "refresh-heads"))
 
+(define-top-keys ;; sinc numpad
+  ("KP_Insert"    "vgroups")
+  ("KP_End"       "gselect 1") ; 1
+  ("KP_Down"      "gselect 2") ; 2
+  ("KP_Page_Down" "gselect 3") ; 3
+  ("KP_Left"      "gselect 4") ; 4
+
+  ("KP_Begin"     "gselect 5") ; 5
+  ("KP_Right"     "gselect 6") ; 6
+  ("KP_Home"      "igv/minimera") ; 7
+  ("KP_Up"        "igv/clear-read-selections") ; 8
+  ("KP_Page_Up"   "igv/select-reads") ; 9
+  )
+
 (defvar *keymap/igv* (make-sparse-keymap))
 
 (define-key *keymap/igv* (kbd "s") "igv/supplementary-on")
@@ -247,7 +250,8 @@
   )
 
 (define-top-keys ;; Single-key keyboard
-  ("S-C-F1" "igv"))
+  ("S-C-F1" "bht")
+  ("S-H-F1" "bht"))
 
 
 (define-remapped-keys
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stumpwm/local-share-stumpwm/3440/thirds.dump	Thu Jan 29 13:29:06 2026 -0500
@@ -0,0 +1,1 @@
+../um-dev.dump
\ No newline at end of file
--- a/stumpwm/package.lisp	Wed Dec 10 11:07:06 2025 -0500
+++ b/stumpwm/package.lisp	Thu Jan 29 13:29:06 2026 -0500
@@ -1,5 +1,7 @@
 (in-package :stumpwm-user)
 
 (shadow :window)
+(shadow :next)
 
 (use-package :losh)
+(use-package :iterate)
--- a/stumpwm/stumpconfig.asd	Wed Dec 10 11:07:06 2025 -0500
+++ b/stumpwm/stumpconfig.asd	Thu Jan 29 13:29:06 2026 -0500
@@ -9,6 +9,7 @@
                :jarl
                :local-time
                :losh
+               :iterate
                :parse-number
                :split-sequence
                :str
--- a/stumpwm/terminal-fonts.lisp	Wed Dec 10 11:07:06 2025 -0500
+++ b/stumpwm/terminal-fonts.lisp	Thu Jan 29 13:29:06 2026 -0500
@@ -33,4 +33,8 @@
     ((:integer "Size: "))
   (setf *terminal-font-size* size))
 
+(defcommand terminal-font-size-set (size)
+    ((:integer "Size: "))
+  (setf *terminal-font-size* size))
 
+
--- a/vim/vimrc-minimal	Wed Dec 10 11:07:06 2025 -0500
+++ b/vim/vimrc-minimal	Thu Jan 29 13:29:06 2026 -0500
@@ -30,9 +30,9 @@
 set undoreload=10000
 set list
 set listchars=tab:▸\ ,eol:¬,extends:❯,precedes:❮
+set showbreak=↪
 set lazyredraw
 set matchtime=3
-set showbreak=↪
 set splitbelow
 set splitright
 set autowrite