# HG changeset patch # User Steve Losh # Date 1604678493 18000 # Node ID 48b460573f0dae28c1c39ea09c41720ed817ea53 # Parent 34084ee62b4a96f51c45ccc4ebf949d6ddd489ff# Parent a025b0d30da44a796a6bd69a9441c4a9eb154cc4 Merge diff -r 34084ee62b4a -r 48b460573f0d fish/config.fish --- a/fish/config.fish Fri Nov 06 11:01:07 2020 -0500 +++ b/fish/config.fish Fri Nov 06 11:01:33 2020 -0500 @@ -40,8 +40,8 @@ # }}} # Abbreviations {{{ -abbr ai="sudo apt install" -abbr sc="sudo systemctl" +abbr --add ai "sudo apt install" +abbr --add sc "sudo systemctl" # }}} # Completions {{{ diff -r 34084ee62b4a -r 48b460573f0d stumpwmrc --- a/stumpwmrc Fri Nov 06 11:01:07 2020 -0500 +++ b/stumpwmrc Fri Nov 06 11:01:33 2020 -0500 @@ -250,10 +250,17 @@ (defun brightness () (aref *brightness-values* *brightness-index*)) +(defun set-brightness (value) + (run-shell-command + (hostcase + ((:mobius :alephnull) (format nil "xbacklight -set ~D" value)) + ((:papyrifera) (format nil "xrandr --output eDP --brightness ~D" (/ value 100.0))) + (t (message "Not sure how to set brightness on this machine."))))) + (defun rotate-brightness (delta) (setf *brightness-index* (mod+ *brightness-index* delta (length *brightness-values*))) - (run-shell-command (format nil "xbacklight -set ~D" (brightness)))) + (set-brightness (brightness))) (defcommand rotate-brightness-up () () (rotate-brightness 1)) @@ -359,7 +366,7 @@ (defcommand sleep-machine () () (hostcase - ((:alephnull :mobius) + ((:alephnull :mobius :papyrifera) (run-shell-command "exec lock-screen") (run-shell-command "systemctl suspend")) (t (message "Not sleeping this machine for safety..")))) @@ -686,7 +693,7 @@ " ") (hostcase - ((:mobius :alephnull) + ((:mobius :alephnull :papyrifera) '("(B " (:eval (princ-to-string (battery))) ")" diff -r 34084ee62b4a -r 48b460573f0d vim/vimrc --- a/vim/vimrc Fri Nov 06 11:01:07 2020 -0500 +++ b/vim/vimrc Fri Nov 06 11:01:33 2020 -0500 @@ -1501,10 +1501,9 @@ au FileType go inoremap " this language is incredible - au FileType go iabbrev ernil if err != nil {return nil, errjA - au FileType go iabbrev erstr if err != nil {return "", errjA - au FileType go iabbrev ererr if err != nil {return errjA - au FileType go iabbrev erpan if err != nil {panic(err)jA + au FileType go iabbrev enil if err != nil + au FileType go iabbrev rete return err + au FileType go iabbrev retne return nil, err au FileType gohtmltmpl setlocal shiftwidth=4 augroup END @@ -1806,7 +1805,7 @@ au FileType pgsql nnoremap e :call NeoReplSendParagraph() au FileType pgsql nnoremap f :call NeoReplSendEntireFile() au FileType pgsql nnoremap c :call NeoReplSendRaw(" ") - + au FileType pgsql nnoremap q :call NeoReplSendRaw("q") augroup END " }}} diff -r 34084ee62b4a -r 48b460573f0d xsessionrc --- a/xsessionrc Fri Nov 06 11:01:07 2020 -0500 +++ b/xsessionrc Fri Nov 06 11:01:33 2020 -0500 @@ -24,5 +24,4 @@ # /usr/bin/dunst -config $HOME/.dunstrc & # exec gpg-agent --daemon --enable-ssh-support /usr/local/bin/stumpwm -exec /usr/local/bin/stumpwm - +exec /usr/local/bin/stumpwm > .stump-xsession-log.out 2> .stump-xsession-log.err