# HG changeset patch # User Steve Losh # Date 1693410563 14400 # Node ID ebaf215e5d89da68f075997034f90f634820acb5 # Parent 5b6e2d2bff48400953d6494ad971abbd5b3ef9fa# Parent 00f78c8838d009e5646dc7f9a0fa4e85f40a6365 Merge diff -r 5b6e2d2bff48 -r ebaf215e5d89 bin/clhs --- a/bin/clhs Wed Aug 30 11:48:48 2023 -0400 +++ b/bin/clhs Wed Aug 30 11:49:23 2023 -0400 @@ -2,4 +2,4 @@ set -euo pipefail -~/src/dotfiles/lisp/bin/clhs --url "file:///home/sjl/Dropbox/HyperSpec/HyperSpec/" --open "w3m" "$@" +~/src/dotfiles/lisp/bin/clhs --open "w3m" "$@" diff -r 5b6e2d2bff48 -r ebaf215e5d89 bin/packfor --- a/bin/packfor Wed Aug 30 11:48:48 2023 -0400 +++ b/bin/packfor Wed Aug 30 11:49:23 2023 -0400 @@ -2,5 +2,5 @@ set -euo pipefail -cp ~/Dropbox/tasks/pack-archive ~/Dropbox/tasks/pack.txt -nvim ~/Dropbox/tasks/pack.txt +cp ~/Sync/tasks/pack-archive ~/Sync/tasks/pack.txt +nvim ~/Sync/tasks/pack.txt diff -r 5b6e2d2bff48 -r ebaf215e5d89 bin/t --- a/bin/t Wed Aug 30 11:48:48 2023 -0400 +++ b/bin/t Wed Aug 30 11:49:23 2023 -0400 @@ -2,4 +2,4 @@ set -euo pipefail -python3 ~/src/t/t.py --task-dir ~/Dropbox/tasks/ --list tasks.txt "$@" +python3 ~/src/t/t.py --task-dir ~/Sync/tasks/ --list tasks.txt "$@" diff -r 5b6e2d2bff48 -r ebaf215e5d89 fish/config.fish --- a/fish/config.fish Wed Aug 30 11:48:48 2023 -0400 +++ b/fish/config.fish Wed Aug 30 11:49:23 2023 -0400 @@ -8,7 +8,7 @@ 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 el; cd ~/Dropbox/life; nvim .; end function em; nvim ~/.mutt/muttrc; end -function es; cd ~/src/stumpwm; nvim ~/.stumpwmrc; end +function es; pushd ~/src/stumpwm; e ~/.stumpwmrc; popd; end function ev; nvim ~/.vimrc; end function eff; nvim ~/.config/fish/functions; end function efh; nvim ~/.local/share/fish/fish_history; end # I have visited https://github.com/fish-shell/fish-shell/issues/862 nine thousand times and I'm fucking sick of opening a web browser to figure out where the fuck fish keeps its equivalent of ~/.bash_history diff -r 5b6e2d2bff48 -r ebaf215e5d89 fish/functions/ez.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/ez.fish Wed Aug 30 11:49:23 2023 -0400 @@ -0,0 +1,8 @@ +function ez -d "Edit Zettelkasten" + pushd ~/src/zk + hg pull -u + e . + hg ci -m 'Update' + hg push + popd +end diff -r 5b6e2d2bff48 -r ebaf215e5d89 lisp/clhs.lisp --- a/lisp/clhs.lisp Wed Aug 30 11:48:48 2023 -0400 +++ b/lisp/clhs.lisp Wed Aug 30 11:49:23 2023 -0400 @@ -12,8 +12,8 @@ ;;;; Config ------------------------------------------------------------------- -(defparameter *default-hyperspec-url* "http://www.lispworks.com/documentation/HyperSpec/") -;; (defparameter *default-hyperspec-url* "file:///home/sjl/Dropbox/HyperSpec/HyperSpec/") +;; (defparameter *default-hyperspec-url* "http://www.lispworks.com/documentation/HyperSpec/") +(defparameter *default-hyperspec-url* "file:///home/sjl/Sync/docs/hyperspec/HyperSpec/") (defparameter *default-open-command* "open") (defparameter *open* *default-open-command*) (defparameter *url* *default-hyperspec-url*) diff -r 5b6e2d2bff48 -r ebaf215e5d89 lisp/weather.lisp --- a/lisp/weather.lisp Wed Aug 30 11:48:48 2023 -0400 +++ b/lisp/weather.lisp Wed Aug 30 11:49:23 2023 -0400 @@ -179,7 +179,7 @@ (adopt:print-help-and-exit *ui*) (progn (load-config) - (run (or (first arguments) "14607") + (run (or (first arguments) "48105") :hours (gethash 'hours options)))) (error (e) (adopt:print-error-and-exit e)))))) diff -r 5b6e2d2bff48 -r ebaf215e5d89 stumpwmrc --- a/stumpwmrc Wed Aug 30 11:48:48 2023 -0400 +++ b/stumpwmrc Wed Aug 30 11:49:23 2023 -0400 @@ -241,7 +241,7 @@ (local-time:find-timezone-by-location-name "US/Eastern")) (defparameter *budget/start* - (local-time:encode-timestamp 0 0 0 0 27 8 2023 :timezone *tz/eastern*)) + (local-time:encode-timestamp 0 0 0 0 29 8 2023 :timezone *tz/eastern*)) (defun budget/per-day () (first (losh:read-all-from-file "/home/sjl/Sync/budget/per-day"))) @@ -913,12 +913,15 @@ "%)"))) ;; temp, cpu, mem, time, tray - (list "(TEMP %S) (CPU %C) (MEM %M) %d %T"))) + #+no (list "(TEMP %S) (CPU %C) (MEM %M) %d %T") + (list "(CPU %C) (MEM %M) %d %T") + )) (setf *mode-line-timeout* 10) (setf *mode-line-background-color* "#111111") - (ensure-mode-line)) + (ensure-mode-line) + ) (configure-modeline) diff -r 5b6e2d2bff48 -r ebaf215e5d89 vim/ftdetect/snakemake.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/ftdetect/snakemake.vim Wed Aug 30 11:49:23 2023 -0400 @@ -0,0 +1,9 @@ +" Vim ftdetect file +" Language: Snakemake (extended from python.vim) +" Maintainer: Jay Hesselberth (jay.hesselberth@gmail.com) +" Last Change: 2020 Oct 6 +" +" Usage +" +" copy to $HOME/.vim/ftdetect directory +au BufNewFile,BufRead Snakefile,*.smk set filetype=snakemake diff -r 5b6e2d2bff48 -r ebaf215e5d89 vim/ftplugin/snakemake/folding.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/ftplugin/snakemake/folding.vim Wed Aug 30 11:49:23 2023 -0400 @@ -0,0 +1,61 @@ +setlocal foldmethod=expr +setlocal foldexpr=GetSnakemakeFold(v:lnum) + +function! GetSnakemakeFold(lnum) + " fold preamble + if a:lnum == 1 + return '>1' + endif + + let thisline = getline(a:lnum) + + " blank lines end folds + if thisline =~? '\v^\s*$' + return '-1' + " start fold on top level rules or python objects + elseif thisline =~? '\v^(rule|def|checkpoint|class)' + return ">1" + elseif thisline =~? '\v^\S' + if PreviousLineIndented(a:lnum) && NextRuleIndented(a:lnum) + return ">1" + endif + endif + + return "=" + +endfunction + +function! NextRuleIndented(lnum) + let numlines = line('$') + let current = a:lnum + 1 + + while current <= numlines + let thisline = getline(current) + if thisline =~? '\v^(rule|def|checkpoint|class)' + return 0 + elseif thisline =~? '\v^\s+(rule|checkpoint)' + return 1 + endif + + let current += 1 + endwhile + + return 0 +endfunction + +function! PreviousLineIndented(lnum) + let current = a:lnum - 1 + + while current >= 1 + let thisline = getline(current) + if thisline =~? '\v^\S' + return 0 + elseif thisline =~? '\v^\s+\S' + return 1 + endif + + let current -= 1 + endwhile + + return 0 +endfunction diff -r 5b6e2d2bff48 -r ebaf215e5d89 vim/ftplugin/snakemake/sections.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/ftplugin/snakemake/sections.vim Wed Aug 30 11:49:23 2023 -0400 @@ -0,0 +1,43 @@ +function! s:NextSection(type, backwards, visual) + if a:visual + normal! gv + endif + + if a:type == 1 + let pattern = '\v(^rule|^checkpoint|^def|%^)' + elseif a:type == 2 + let pattern = '\v\n\zs\n^(rule|checkpoint|def)' + endif + + if a:backwards + let dir = '?' + else + let dir = '/' + endif + + execute 'silent normal! ' . dir . pattern . dir . "\r" +endfunction + +noremap