1e626e20d5e6

Merge
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Tue, 20 Sep 2022 12:56:45 -0400
parents 746ca2de7503 (diff) d8677652f94b (current diff)
children de3fbded24a1 c106ae0760f8
branches/tags (none)
files remote/bootstrap.sh vim/custom-dictionary.utf-8.add vim/vimrc weechat/script.conf

Changes

--- a/.hgsub	Thu Sep 15 23:23:16 2022 -0400
+++ b/.hgsub	Tue Sep 20 12:56:45 2022 -0400
@@ -16,7 +16,6 @@
 vim/bundle/html5                 = [git]https://github.com/othree/html5.vim
 vim/bundle/javascript            = [git]https://github.com/pangloss/vim-javascript
 vim/bundle/markdown              = [git]https://github.com/sjl/vim-markdown
-vim/bundle/miniyank              = [git]https://github.com/bfredl/nvim-miniyank
 vim/bundle/neoformat             = [git]https://github.com/sbdchd/neoformat
 vim/bundle/nerdtree              = [git]https://github.com/scrooloose/nerdtree
 vim/bundle/paredit               = [git]https://github.com/kovisoft/paredit
--- a/.hgsubstate	Thu Sep 15 23:23:16 2022 -0400
+++ b/.hgsubstate	Tue Sep 20 12:56:45 2022 -0400
@@ -2,7 +2,7 @@
 1fc4a9fbead7e0acc4c828b346f3be2658ec3df9 mercurial/templates
 b6a8b49e2173ba5a1b34d00e68e0ed8addac3ebd vim/bundle/abolish
 a16a9b63eb85cc0960a7f25c54647ac1f99f3360 vim/bundle/ack
-e7f8786668bb9b7ac3b68198437e11f9c5c465b6 vim/bundle/badwolf
+599e1bb1aee98e563132553cf8b7bc32cb402b75 vim/bundle/badwolf
 24f6d94dd03ba0fdc703265fe281f70cf2b45ba6 vim/bundle/boxdraw
 b542a7bc4d9bc5da8fb12e110fe7975131fb57a4 vim/bundle/clam
 8295187ea1210138c0b171d8e3ec3569936f4c1a vim/bundle/commentary
@@ -16,9 +16,8 @@
 fccd580f5f11d576169ee347907c9fbd77af410a vim/bundle/html5
 dd84369d731bcb8feee0901cbb9b63a2b219bf28 vim/bundle/javascript
 e2d7fcd682a461a3951e8b5067cc8a0083e75e35 vim/bundle/markdown
-1362fdc7c32855794659cafe6e65d3239843d9df vim/bundle/miniyank
 964c66fa22500ae7375114342d212d7fe15da341 vim/bundle/neoformat
-d6032c876c6d6932ab7f07e262a16c9a85a31d5b vim/bundle/nerdtree
+9310f91476a94ee9c2f3a587171893743a343e26 vim/bundle/nerdtree
 c76e0987ec45c84103b408691ec0506e7b99cb30 vim/bundle/paredit
 1a436f7d875b4ec630da081b041c73264235c7e7 vim/bundle/pgsql
 d241974f40e8d206f9970e51fb0069951862ba35 vim/bundle/python-mode
@@ -34,7 +33,7 @@
 aa1f120ad3a29c27cc41d581cda3751c59343cce vim/bundle/surround
 19c3d966440b6cfe8d74251881a48e961ddb8648 vim/bundle/swig
 f6f2d6618a321f5b0065586a7bc934325fec81ab vim/bundle/targets
-dcefd64ba251ffc3d497f8758036735c8f6cc824 vim/bundle/vim-go
+e9d7ff3eb4a369f0cb2069c8f77ae68796bca308 vim/bundle/vim-go
 5d5c71044880443035e07009497962feacb56b20 vim/bundle/vimtex
 54feb567738398ab65d783e096bc84938e7620a0 vim/bundle/vlime
 6876fe38b33732cb124d415ffc4156f16da5e118 vim/bundle/windowswap
--- a/bash_profile	Thu Sep 15 23:23:16 2022 -0400
+++ b/bash_profile	Tue Sep 20 12:56:45 2022 -0400
@@ -1,5 +1,9 @@
 #!/usr/bin/env bash
 
+if test -e /etc/profile; then
+    source /etc/profile
+fi
+
 shopt -s expand_aliases
 shopt -s histappend
 
--- a/ffignore	Thu Sep 15 23:23:16 2022 -0400
+++ b/ffignore	Tue Sep 20 12:56:45 2022 -0400
@@ -1,4 +1,6 @@
 syntax:literal
+venv
+.venv
 .DS_Store
 cookbook
 banner.txt
--- a/remote/bash_profile	Thu Sep 15 23:23:16 2022 -0400
+++ b/remote/bash_profile	Tue Sep 20 12:56:45 2022 -0400
@@ -1,1 +1,103 @@
-../bash_profile
\ No newline at end of file
+#!/usr/bin/env bash
+
+# Similar to my normal bash_profile, but stripped down for running on servers.
+
+if test -e /etc/profile; then
+    source /etc/profile
+fi
+
+shopt -s expand_aliases
+shopt -s histappend
+
+# Save multiline commands as a single history entry.
+shopt -s cmdhist
+
+HISTFILESIZE=100000
+HISTSIZE=100000
+HISTCONTROL=ignoreboth
+
+# Flush commands to history immediately instead of waiting for logout.
+PROMPT_COMMAND='history -a'
+
+if test -e ~/.dircolors; then
+    eval "$(dircolors -b ~/.dircolors)"
+fi
+
+D=$'\e[37m'
+RED=$'\e[31m'
+GREEN=$'\e[32m'
+ORANGE=$'\e[33m'
+BLUE=$'\e[34m'
+PINK=$'\e[35m'
+# CYAN=$'\e[36m'
+
+function last_return_value() {
+    x="$?"
+    if test "$x" -ne 0; then
+        echo -n "${RED}[$x] ${D}"
+    fi
+}
+
+function histgrep {
+    history | grep "$@" | tac | f 2-
+}
+
+if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
+  HOST_COLOR="$BLUE"
+else
+  HOST_COLOR="$ORANGE"
+fi
+
+export PS1='\n${PINK}\u ${D}at ${HOST_COLOR}\h ${D}in ${GREEN}\w${D} $(last_return_value)$ '
+
+alias ..="cd .."
+alias ...="cd ../.."
+alias ....="cd ../../.."
+alias .....="cd ../../../.."
+alias ......="cd ../../../../.."
+
+alias js='cd ~/scratch'
+
+alias :q=exit
+alias :qa=exit
+alias :wqa=exit
+
+if command -v ag >/dev/null; then
+    AG_BIN="$(command -v ag)"
+    function ag() {
+        if test -f '.agignore' && grep -q 'pragma: skipvcs' '.agignore'; then
+            $AG_BIN --search-files -U "$@"
+        else
+            $AG_BIN --search-files "$@"
+        fi
+    }
+fi
+
+function prepend_to_path {
+    if test -d "$1"; then
+        PATH="$1":"$PATH"
+    fi
+}
+
+prepend_to_path "$HOME/src/dotfiles/lisp/bin"
+prepend_to_path "$HOME/src/dotfiles/bin"
+prepend_to_path "$HOME/bin"
+export PATH
+
+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
+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_ue=$(printf '\e[0m')           # end underline
+export LESS_TERMCAP_us=$(printf '\e[04;38;5;146m') # begin underline
+export PAGER='less -iX'
+
+function psg() {
+    ps auxww | grep --color=always "$@" | grep -v grep | collapse | cuts -f 2,11-
+}
+
+GPG_TTY=$(tty)
+export GPG_TTY
+
+export EDITOR=vim
--- a/stumpwmrc	Thu Sep 15 23:23:16 2022 -0400
+++ b/stumpwmrc	Tue Sep 20 12:56:45 2022 -0400
@@ -262,6 +262,11 @@
 (defun budget/current ()
   (- (budget/in) (budget/out)))
 
+(defcommand budget-dump () ()
+  (message
+    (sh '("sh" "-c" "tail -n 5 /home/sjl/Dropbox/budget/hosts/*/records")
+        :result-type 'string)))
+
 (defcommand budget () ()
   (message "$~D" (budget/current)))
 
@@ -436,7 +441,10 @@
   (show-window-properties))
 
 (defcommand rain () ()
-  (message (run-shell-command "weather -H 36" t)))
+  (_ '("/home/sjl/src/dotfiles/lisp/bin/weather" "-H" "36")
+    (losh:sh _ :result-type 'list)
+    (mapcar (lambda (line) (ppcre:regex-replace " 1[0-9]:00 " line "^6\\&^*")) _)
+    (message "~{~A~^~%~}" _)))
 
 (defcommand mark (thing) ((:string "Mark: "))
   (run-shell-command (format nil "mark ~A" thing)))
@@ -777,7 +785,6 @@
      ;; interest of not having a random collection of bookmarks grow over time,
      ;; I'll just add a mapping to compensate for my stupid brain.
      ("C-d" . "C-w")
-     ("C-w" . "C-BackSpace")
      ;; todo debug why this breaks a really fast C-a-k roll
      ;; ("C-a" . "Home")
      ;; ("C-e" . "End")
@@ -928,3 +935,11 @@
 #;;; Scratch ------------------------------------------------------------------
 (message (format nil "~S" (remove #\newline (run-shell-command "acpi" t))))
 
+
+(defparameter *s*
+  (losh:sh '("/home/sjl/src/dotfiles/lisp/bin/weather" "-H" "36") :result-type 'list))
+
+(loop :for line :in *s* :collect
+      (ppcre:regex-replace " 1[0-9]:00 " line "^2\\&^*"))
+
+(message "^8foo")
--- a/vim/custom-dictionary.utf-8.add	Thu Sep 15 23:23:16 2022 -0400
+++ b/vim/custom-dictionary.utf-8.add	Tue Sep 20 12:56:45 2022 -0400
@@ -317,6 +317,10 @@
 async
 valkyrie
 Greatshield
+sudoers
+Virtualbox
+libvirt
+qemu
 superclasses
 metaclasses
 Metaobject
--- a/vim/vimrc	Thu Sep 15 23:23:16 2022 -0400
+++ b/vim/vimrc	Tue Sep 20 12:56:45 2022 -0400
@@ -313,7 +313,8 @@
 inoremap <c-k><c-k> <esc>:help digraph-table<cr>
 
 " Wrap
-nnoremap <leader>W :set wrap!<cr>
+" mnemonic: less' -S command/option
+nnoremap <leader>S :set wrap!<cr>
 
 " Inserting blank lines
 " I never use the default behavior of <cr> and this saves me a keystroke...
@@ -1715,10 +1716,8 @@
 augroup ft_nginx
     au!
 
-    au BufRead,BufNewFile /etc/nginx/conf/*                      set ft=nginx
-    au BufRead,BufNewFile /etc/nginx/sites-available/*           set ft=nginx
-    au BufRead,BufNewFile /usr/local/etc/nginx/sites-available/* set ft=nginx
-    au BufRead,BufNewFile vhost.nginx                            set ft=nginx
+    au BufRead,BufNewFile nginx.conf                             set ft=nginx
+    au BufRead,BufNewFile *.nginx.conf                           set ft=nginx
 
     au FileType nginx setlocal foldmethod=marker foldmarker={,}
 augroup END
@@ -2052,10 +2051,10 @@
 " }}}
 " MiniYank {{{
 
-map p <Plug>(miniyank-autoput)
-map P <Plug>(miniyank-autoPut)
-nmap gp <Plug>(miniyank-cycle)
-nnoremap gP g-
+" map p <Plug>(miniyank-autoput)
+" map P <Plug>(miniyank-autoPut)
+" nmap gp <Plug>(miniyank-cycle)
+" nnoremap gP g-
 
 " }}}
 " NeoFormat {{{
@@ -2128,6 +2127,7 @@
 let NERDChristmasTree = 1
 let NERDTreeChDirMode = 2
 let NERDTreeMapJumpFirstChild = 'gK'
+let g:NERDTreeMinimalMenu = 1
 
 " }}}
 " Paredit {{{
@@ -2549,7 +2549,7 @@
 " Windowswap {{{
 
 let g:windowswap_map_keys = 0 "prevent default bindings
-nnoremap <silent> <leader>W :call WindowSwap#EasyWindowSwap()<CR>
+nnoremap <silent> <leader>ws :call WindowSwap#EasyWindowSwap()<CR>
 
 " }}}
 
--- a/weechat/script.conf	Thu Sep 15 23:23:16 2022 -0400
+++ b/weechat/script.conf	Tue Sep 20 12:56:45 2022 -0400
@@ -50,7 +50,7 @@
 [scripts]
 autoload = on
 cache_expire = 60
-download_enabled = off
+download_enabled = on
 download_timeout = 30
 hold = ""
 path = "%h/script"
--- a/xsessionrc	Thu Sep 15 23:23:16 2022 -0400
+++ b/xsessionrc	Tue Sep 20 12:56:45 2022 -0400
@@ -23,5 +23,9 @@
 
 # /usr/bin/dunst -config $HOME/.dunstrc &
 
+# Fix the fucking GTK scrolling bullshit
+# God bless you https://mmk2410.org/2018/02/15/scrolling-doesnt-work-in-gtk-3-apps-in-stumpwm/
+export GDK_CORE_DEVICE_EVENTS=1
+
 # exec gpg-agent --daemon --enable-ssh-support /usr/local/bin/stumpwm
 exec /usr/local/bin/stumpwm > .stump-xsession-log.out 2> .stump-xsession-log.err