# HG changeset patch # User Steve Losh # Date 1763655893 18000 # Node ID 7cb0e1e6a21716c212fbd15f15e5c762d0c15730 # Parent a65fd2691c94587fd568ace3cdc759ee134a35b6 More diff -r a65fd2691c94 -r 7cb0e1e6a217 bash_profile --- a/bash_profile Mon Nov 03 14:55:17 2025 -0500 +++ b/bash_profile Thu Nov 20 11:24:53 2025 -0500 @@ -101,6 +101,7 @@ prepend_to_path "$HOME/bin" export PATH +export LESSKEYIN="$HOME/.lesskey" # set up keybindings export LESS_TERMCAP_mb=$(printf '\e[01;31m') # begin blinking export LESS_TERMCAP_md=$(printf '\e[01;38;5;74m') # begin bold export LESS_TERMCAP_me=$(printf '\e[0m') # end mode diff -r a65fd2691c94 -r 7cb0e1e6a217 bin/bootstrap.sh --- a/bin/bootstrap.sh Mon Nov 03 14:55:17 2025 -0500 +++ b/bin/bootstrap.sh Thu Nov 20 11:24:53 2025 -0500 @@ -29,6 +29,7 @@ test -d ~/src/dotfiles || hg clone https://hg.stevelosh.com/dotfiles ~/src/dotfiles +ensure_link "src/dotfiles/XCompose" ".XCompose" ensure_link "src/dotfiles/Xmodmap" ".Xmodmap" ensure_link "src/dotfiles/abclrc" ".abclrc" ensure_link "src/dotfiles/agignore" ".agignore" @@ -47,6 +48,7 @@ ensure_link "src/dotfiles/gnuplot" ".gnuplot" ensure_link "src/dotfiles/hgignore" ".hgignore" ensure_link "src/dotfiles/htoprc" ".config/htop/htoprc" +ensure_link "src/dotfiles/lesskey" ".lesskey" ensure_link "src/dotfiles/lisprc" ".lisprc" ensure_link "src/dotfiles/lispwords" ".lispwords" ensure_link "src/dotfiles/mpd.conf" ".config/mpd/mpd.conf" @@ -67,7 +69,6 @@ ensure_link "src/dotfiles/w3m-keymap" ".w3m/keymap" ensure_link "src/dotfiles/xbindkeysrc" ".xbindkeysrc" ensure_link "src/dotfiles/xsessionrc" ".xsessionrc" -ensure_link "src/dotfiles/XCompose" ".XCompose" echo done diff -r a65fd2691c94 -r 7cb0e1e6a217 bin/collapse --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/collapse Thu Nov 20 11:24:53 2025 -0500 @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -euo pipefail + +sed -e 's/ */ /g' diff -r a65fd2691c94 -r 7cb0e1e6a217 bin/pass-precopy --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/pass-precopy Thu Nov 20 11:24:53 2025 -0500 @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# Edit pass to add this above the copying code: +# +# if command -v pass-precopy >/dev/null; then +# echo -n "$1" | "$BASE64" | pass-precopy +# fi + +stumpish -e add-clipboard-history-ignore-base64 diff -r a65fd2691c94 -r 7cb0e1e6a217 fish/config.fish --- a/fish/config.fish Mon Nov 03 14:55:17 2025 -0500 +++ b/fish/config.fish Thu Nov 20 11:24:53 2025 -0500 @@ -80,6 +80,7 @@ function please_fish_just_bind_the_keys bind \cn accept-autosuggestion bind \cw backward-kill-word + bind \cx\ce edit_command_buffer end function fish_user_keybindings please_fish_just_bind_the_keys @@ -111,13 +112,14 @@ prepend_to_path "/usr/local/go/bin" prepend_to_path "/usr/local/sbin" prepend_to_path "/usr/games" +prepend_to_path "/opt/singularity/bin" +prepend_to_path "$HOME/.go/bin" +prepend_to_path "$HOME/bin/jdk-21.0.2/bin" prepend_to_path "$HOME/.local/bin" prepend_to_path "$HOME/src/dotfiles/lisp/bin" prepend_to_path "$HOME/src/dotfiles/bin" prepend_to_path "$HOME/src/hg" prepend_to_path "$HOME/bin" -prepend_to_path "$HOME/.go/bin" -prepend_to_path "$HOME/bin/jdk-21.0.2/bin" set BROWSER open @@ -132,6 +134,9 @@ set -g -x GPG_TTY (tty) +# Less Keybindings +set -g -x LESSKEYIN "$HOME/.lesskey" + # Less Colors for Man Pages 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 diff -r a65fd2691c94 -r 7cb0e1e6a217 lesskey --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lesskey Thu Nov 20 11:24:53 2025 -0500 @@ -0,0 +1,3 @@ +#command +\e[20~ toggle-option ^pS +\e[21~ toggle-option ^pR diff -r a65fd2691c94 -r 7cb0e1e6a217 lisp/combos.lisp --- a/lisp/combos.lisp Mon Nov 03 14:55:17 2025 -0500 +++ b/lisp/combos.lisp Thu Nov 20 11:24:53 2025 -0500 @@ -18,6 +18,7 @@ (defvar *first* t) + ;;;; Functionality ------------------------------------------------------------ (defun print-record (fields) (if *first* @@ -180,19 +181,21 @@ :contents (list *option/help* *option/version* - (adopt:make-group 'input-options - :title "Input Options" - :options (list *option/input-sep* - *option/input-sep-nul* - *option/trim* - *option/no-trim*)) (adopt:make-group 'output-options :title "Output Options" :options (list *option/mode/permutations* *option/mode/combinations* *option/mode/derangements* *option/mode/product* - *option/n* + *option/n*)) + (adopt:make-group 'input-options + :title "Input Options" + :options (list *option/trim* + *option/no-trim*)) + (adopt:make-group 'separators + :title "File Separator Options" + :options (list *option/input-sep* + *option/input-sep-nul* *option/output-sep/field* *option/output-sep/field-nul* *option/output-sep/record* @@ -203,7 +206,7 @@ (adopt::quit-on-ctrl-c () (multiple-value-bind (arguments options) (adopt:parse-options-or-exit *ui*) (when (gethash 'help options) - (adopt:print-help-and-exit *ui*)) + (adopt:print-help-and-exit *ui* :option-width 23)) (let ((*mode* (gethash 'mode options)) (*n* (gethash 'n options)) (*output-sep-field* (gethash 'output-sep/field options)) diff -r a65fd2691c94 -r 7cb0e1e6a217 remote/bash_profile --- a/remote/bash_profile Mon Nov 03 14:55:17 2025 -0500 +++ b/remote/bash_profile Thu Nov 20 11:24:53 2025 -0500 @@ -94,6 +94,7 @@ prepend_to_path "$HOME/bin" export PATH +export LESSKEYIN="$HOME/.lesskey" # set up keybindings export LESS_TERMCAP_mb=$(printf '\e[01;31m') # begin blinking export LESS_TERMCAP_md=$(printf '\e[01;38;5;74m') # begin bold export LESS_TERMCAP_me=$(printf '\e[0m') # end mode diff -r a65fd2691c94 -r 7cb0e1e6a217 remote/bootstrap.sh --- a/remote/bootstrap.sh Mon Nov 03 14:55:17 2025 -0500 +++ b/remote/bootstrap.sh Thu Nov 20 11:24:53 2025 -0500 @@ -34,6 +34,7 @@ ensure_link "src/dotfiles/gitignore" ".gitignore" ensure_link "src/dotfiles/htoprc" ".config/htop/htoprc" ensure_link "src/dotfiles/hushlogin" ".hushlogin" +ensure_link "src/dotfiles/lesskey" ".lesskey" ensure_link "src/dotfiles/st" ".terminfo/s/st" ensure_link "src/dotfiles/st-256color" ".terminfo/s/st-256color" ensure_link "src/dotfiles/vim-colors" ".vim/colors" diff -r a65fd2691c94 -r 7cb0e1e6a217 remote/lesskey --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/remote/lesskey Thu Nov 20 11:24:53 2025 -0500 @@ -0,0 +1,1 @@ +../lesskey \ No newline at end of file diff -r a65fd2691c94 -r 7cb0e1e6a217 stumpwm/key-mapping.lisp --- a/stumpwm/key-mapping.lisp Mon Nov 03 14:55:17 2025 -0500 +++ b/stumpwm/key-mapping.lisp Thu Nov 20 11:24:53 2025 -0500 @@ -132,7 +132,7 @@ ("H-W" "kill") ("H-BackSpace" "remove") ("S-H-BackSpace" "kill-and-remove") - ("H-Delete" "gkill")) + ("H-Delete" "gkill-and-repack")) (define-top-keys ;; naming ("H-'" "title") diff -r a65fd2691c94 -r 7cb0e1e6a217 stumpwm/miscellaneous.lisp --- a/stumpwm/miscellaneous.lisp Mon Nov 03 14:55:17 2025 -0500 +++ b/stumpwm/miscellaneous.lisp Thu Nov 20 11:24:53 2025 -0500 @@ -114,3 +114,44 @@ (defcommand grename-cwd () () (when-let ((cwd (dwim-cwd))) (grename (pathname-name (pathname cwd))))) + +(defcommand grenumber (new-number &optional (screen (current-screen))) ((:number "Number: ")) + "Change the current group's number to the specified number. + + If another group is using the number, then the groups swap numbers. Defaults + to current screen. + + " + ;; from https://pastebin.com/nSpqbjef + (let* ((this-group (current-group screen)) + (current-number (group-number this-group)) + (other-group (find-if (lambda (grp) (= (group-number grp) new-number)) + (screen-groups screen)))) + ;; If another group has the new number, change it to the number of the + ;; current group. + (when other-group + (setf (group-number other-group) current-number)) + ;; Now, set the current group to the new number. + (setf (group-number this-group) new-number))) + +(defcommand repack-group-numbers () () + "Ensure that used group numbers do not have gaps." + (loop :for i :from 1 + :for group in (sort (copy-seq (screen-groups (current-screen))) + #'< + :key #'group-number) + :when (/= i (group-number group)) + :do (setf (group-number group) i))) + +(defcommand gkill-and-repack () () + (gkill) + (repack-group-numbers)) + +#; Scratch -------------------------------------------------------------------- + +(eq (screen-groups (current-screen)) + (screen-groups (current-screen))) + +(sort (copy-seq (screen-groups (current-screen))) + #'< + :key #'group-number) diff -r a65fd2691c94 -r 7cb0e1e6a217 stumpwm/passwords.lisp --- a/stumpwm/passwords.lisp Mon Nov 03 14:55:17 2025 -0500 +++ b/stumpwm/passwords.lisp Thu Nov 20 11:24:53 2025 -0500 @@ -20,4 +20,5 @@ (run-shell-command "genpass | pbc") (message "Generated a fresh password and copied it to the clipboard.")) - +(stumpwm:defcommand add-clipboard-history-ignore-base64 (string) (:string) + (clipboard-history:add-clipboard-history-ignore (base64:base64-decode string))) diff -r a65fd2691c94 -r 7cb0e1e6a217 stumpwm/stumpconfig.asd --- a/stumpwm/stumpconfig.asd Mon Nov 03 14:55:17 2025 -0500 +++ b/stumpwm/stumpconfig.asd Thu Nov 20 11:24:53 2025 -0500 @@ -2,15 +2,16 @@ :description "My StumpWM configuration." :author "Steve Losh " - :depends-on (:losh - :split-sequence - :alexandria - :parse-number - :str + :depends-on (:alexandria + :base64 + :bordeaux-threads :cl-ppcre - :bordeaux-threads :jarl :local-time + :losh + :parse-number + :split-sequence + :str :usocket :uuid)