b038c1a8cdd8

More
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Tue, 13 Sep 2022 13:24:00 -0400
parents 169f00eabdc6
children 746ca2de7503
branches/tags (none)
files .hgsub .hgsubstate bash_profile ffignore remote/bash_profile remote/bootstrap.sh remote/tmux.conf stumpwmrc vim/custom-dictionary.utf-8.add vim/vimrc weechat/script.conf

Changes

--- a/.hgsub	Thu Aug 11 16:31:41 2022 -0400
+++ b/.hgsub	Tue Sep 13 13:24:00 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 Aug 11 16:31:41 2022 -0400
+++ b/.hgsubstate	Tue Sep 13 13:24:00 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 Aug 11 16:31:41 2022 -0400
+++ b/bash_profile	Tue Sep 13 13:24:00 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 Aug 11 16:31:41 2022 -0400
+++ b/ffignore	Tue Sep 13 13:24:00 2022 -0400
@@ -1,4 +1,6 @@
 syntax:literal
+venv
+.venv
 .DS_Store
 cookbook
 banner.txt
--- a/remote/bash_profile	Thu Aug 11 16:31:41 2022 -0400
+++ b/remote/bash_profile	Tue Sep 13 13:24:00 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/remote/bootstrap.sh	Thu Aug 11 16:31:41 2022 -0400
+++ b/remote/bootstrap.sh	Tue Sep 13 13:24:00 2022 -0400
@@ -10,7 +10,7 @@
         true
     elif test -e "$dst"; then
         echo File "$dst" already exists and is not a symbolic link.
-        exit 1
+        # exit 1
     elif test ! -e "$src"; then
         echo File "$src" does not exist.
         exit 1
@@ -30,5 +30,4 @@
 ensure_link "src/dotfiles/dircolors"     ".dircolors"
 ensure_link "src/dotfiles/ffignore"      ".ffignore"
 ensure_link "src/dotfiles/config.fish"   ".config/fish/config.fish"
-ensure_link "src/dotfiles/tmux.conf"     ".tmux.conf"
 ensure_link "src/dotfiles/hushlogin"     ".hushlogin"
--- a/remote/tmux.conf	Thu Aug 11 16:31:41 2022 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-../tmux/tmux.conf
\ No newline at end of file
--- a/stumpwmrc	Thu Aug 11 16:31:41 2022 -0400
+++ b/stumpwmrc	Tue Sep 13 13:24:00 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)))
 
@@ -777,7 +782,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")
--- a/vim/custom-dictionary.utf-8.add	Thu Aug 11 16:31:41 2022 -0400
+++ b/vim/custom-dictionary.utf-8.add	Tue Sep 13 13:24:00 2022 -0400
@@ -317,3 +317,7 @@
 async
 valkyrie
 Greatshield
+sudoers
+Virtualbox
+libvirt
+qemu
--- a/vim/vimrc	Thu Aug 11 16:31:41 2022 -0400
+++ b/vim/vimrc	Tue Sep 13 13:24:00 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...
@@ -1711,10 +1712,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
@@ -2048,10 +2047,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 {{{
@@ -2124,6 +2123,7 @@
 let NERDChristmasTree = 1
 let NERDTreeChDirMode = 2
 let NERDTreeMapJumpFirstChild = 'gK'
+let g:NERDTreeMinimalMenu = 1
 
 " }}}
 " Paredit {{{
@@ -2545,7 +2545,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 Aug 11 16:31:41 2022 -0400
+++ b/weechat/script.conf	Tue Sep 13 13:24:00 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"