diff options
Diffstat (limited to '.config')
-rw-r--r-- | .config/bash/rc.d/10_aliases.sh | 9 | ||||
-rw-r--r-- | .config/bash/rc.d/10_no_histexpand.sh | 4 | ||||
-rw-r--r-- | .config/dunst/dunstrc | 4 | ||||
-rw-r--r-- | .config/emacs/init.el | 36 | ||||
-rw-r--r-- | .config/git/config | 2 | ||||
-rw-r--r-- | .config/ssh/config | 11 | ||||
-rw-r--r-- | .config/wmii-hg/config.sh | 29 | ||||
-rwxr-xr-x | .config/wmii-hg/rbar_acpi | 3 | ||||
-rwxr-xr-x | .config/wmii-hg/rbar_clock | 2 | ||||
-rwxr-xr-x | .config/wmii-hg/rbar_wifi | 11 |
10 files changed, 76 insertions, 35 deletions
diff --git a/.config/bash/rc.d/10_aliases.sh b/.config/bash/rc.d/10_aliases.sh index 2e28a5d..c3766da 100644 --- a/.config/bash/rc.d/10_aliases.sh +++ b/.config/bash/rc.d/10_aliases.sh @@ -100,8 +100,12 @@ alias l='ls -CF' alias tree='tree --charset utf8' alias cd=pushd alias gitk='gitk --all --date-order' -alias userctl='systemctl --user' alias mv='mv -i' +alias bc='bc -q' + +alias userctl='systemctl --user' +alias journalctl='journalctl --no-hostname' # I know what host I'm on +alias datetimectl=timedatectl # I forget which it is ###################################################################### # These are actually functions :P # @@ -175,3 +179,6 @@ jarmain() { grep -E '(^[a-z]|public static void main\(java\.lang\.String\[\]\))' | grep -B1 '^ ' } +calc() { + bc <<<"$*" +} diff --git a/.config/bash/rc.d/10_no_histexpand.sh b/.config/bash/rc.d/10_no_histexpand.sh new file mode 100644 index 0000000..985b03d --- /dev/null +++ b/.config/bash/rc.d/10_no_histexpand.sh @@ -0,0 +1,4 @@ +#!/hint/bash + +# Turn off (csh-style) '!' history expansion +set +o histexpand diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index fc93a12..cf99d48 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -12,8 +12,8 @@ # %p progress value if set ([ 0%] to [100%]) or nothing # Message format - format = "<b>%s</b>\n%b" - allow_markup = yes + markup = full # full:render-html strip:strip-html no:plaintext + format = "%a: <b>%s</b>\n%b" ignore_newline = no # Message word-wrap/scroll word_wrap = yes # Split lines... diff --git a/.config/emacs/init.el b/.config/emacs/init.el index b7ee6df..200daad 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -2,19 +2,21 @@ ;; Hey, Emacs: -*- Indent-tabs-mode: nil -*- ;; Without (advice-add) it should work in older versions of Emacs 24. ;;;; Use XDG-ish locations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(setq xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) -(setq - package-user-dir (concat xdg-cache-home "emacs/elpa") - ido-save-directory-list-file (concat xdg-cache-home "emacs/ido.last.el") - el-get-dir (concat xdg-cache-home "emacs/el-get/") - eshell-directory-name (concat xdg-cache-home "emacs/eshell/") - wl-score-files-directory (concat xdg-cache-home "emacs/wl-score-files/") - elmo-msgdb-directory (concat xdg-cache-home "emacs/elmo-msgdb/") - elmo-cache-directory (concat xdg-cache-home "emacs/elmo-cache/") - auto-save-list-file-prefix (concat xdg-cache-home "emacs/auto-save-list/saves-") - tramp-persistency-file-name (concat xdg-cache-home "emacs/tramp-cache.el") - wl-init-file (concat user-emacs-directory "wl.el") - ) +(let ((xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) + (xdg-data-home (file-name-as-directory (or (getenv "XDG_DATA_HOME") "~/.local/share")))) + (setq + wl-init-file (concat user-emacs-directory "wl.el") + eshell-directory-name (concat xdg-data-home "emacs/eshell/") ;; actually should be split between config and data + ido-save-directory-list-file (concat xdg-data-home "emacs/ido.last.el") + + package-user-dir (concat xdg-cache-home "emacs/elpa") + el-get-dir (concat xdg-cache-home "emacs/el-get/") + wl-score-files-directory (concat xdg-cache-home "emacs/wl-score-files/") + elmo-msgdb-directory (concat xdg-cache-home "emacs/elmo-msgdb/") + elmo-cache-directory (concat xdg-cache-home "emacs/elmo-cache/") + auto-save-list-file-prefix (concat xdg-cache-home "emacs/auto-save-list/saves-") + tramp-persistency-file-name (concat xdg-cache-home "emacs/tramp-cache.el") + )) (setq custom-file (concat user-emacs-directory "custom.el")) (load custom-file 'noerror) @@ -71,6 +73,7 @@ (smart-tabs-mode 1) (apply 'smart-tabs-insinuate (mapcar 'car smart-tabs-insinuate-alist)))) +(use-package editorconfig) ;; Major modes (use-package bison-mode :mode (("\\.l\\'" . bison-mode) @@ -95,7 +98,7 @@ ;; '(lambda () ;; (c-set-offset 'cpp-macro 0) ;; ))) -(use-package php-mode :mode ("\\.php[s345t]?\\'" "/\\.php_cs\\(\\.dist\\)?\\'" "\\.phtml\\'" "/Amkfile\\'" "\\.amk\\'")) +(use-package cmake-mode :mode ("CMakeLists\\.txt\\'" "\\.cmake\\'")) (use-package glsl-mode :mode ("\\.vert\\'" "\\.frag\\'" "\\.geom\\'" "\\.glsl\\'")) (use-package go-mode :mode "\\.go\\'") (use-package graphviz-dot-mode :mode ("\\.dot\\'" "\\.gv\\'")) @@ -103,6 +106,7 @@ (use-package less-css-mode :mode "\\.less\\'") (use-package markdown-mode :mode ("\\.markdown\\'" "\\.md\\'" "\\.ronn\\'")) (use-package nginx-mode :mode ("nginx\\.conf\\'" "/nginx/.+\\.conf\\'")) +(use-package php-mode :mode ("\\.php[s345t]?\\'" "/\\.php_cs\\(\\.dist\\)?\\'" "\\.phtml\\'" "/Amkfile\\'" "\\.amk\\'")) (use-package scss-mode :mode "\\.scss\\'") (use-package yaml-mode :mode "\\.e?ya?ml\\'") @@ -179,6 +183,10 @@ sh-script.el is broken." (if xterm-mouse-mode (xterm-mouse-mode 1)) ))) +;; Make TRAMP obey ~/.ssh/config for ControlMaster. For some reason, +;; customize doesn't correctly set this. +(setq tramp-use-ssh-controlmaster-options nil) + ;; Use mailcrypt to encrypt/decrypt email (when (require 'mailcrypt nil t) (mc-setversion "gpg") diff --git a/.config/git/config b/.config/git/config index 2e85773..3404c0c 100644 --- a/.config/git/config +++ b/.config/git/config @@ -6,6 +6,6 @@ [push] default = matching [alias] - lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative + lg = log --graph --format='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative hist = log --format='%h %ci -%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset' --abbrev-commit graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f" diff --git a/.config/ssh/config b/.config/ssh/config index 9dbf510..0703fb2 100644 --- a/.config/ssh/config +++ b/.config/ssh/config @@ -3,6 +3,8 @@ Host * ControlMaster auto ControlPath ~/.r/%l/ssh-%r@%h:%p Compression yes + #ProxyCommand proxytunnel --proxy=lukeshu.com:8443 --proxyauth=frc4272:password --encrypt-proxy --dest=%h:%p + #ProxyCommand proxytunnel --proxy=lukeshu.com:8080 --proxyauth=frc4272:password --dest=%h:%p # Purdue ################################################### @@ -20,12 +22,13 @@ Host parabola.nu *.parabola.nu # Personal ################################################# -Host lukeshu.com +Host lukeshu.com *.lukeshu.com Port 1863 User lukeshu -Host ssl.lukeshu.com + +Host team4272.com + Port 1863 User lukeshu - ProxyCommand proxytunnel --proxy=lukeshu.com:8443 --proxyauth=frc4272:password --encrypt-proxy --dest=lukeshu.com:1863 Match host build64-par exec "nslookup %n.lan." HostName build64-par @@ -37,6 +40,6 @@ Host build64-par ForwardX11 yes ForwardX11Trusted yes -Host 192.168.*.1 10.* +Host 192.168.*.1 10.* 169.254.* roborio-*-frc.local StrictHostKeyChecking no UserKnownHostsFile /dev/null diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index 1b48cc4..e56166e 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -123,13 +123,17 @@ Event() { 2) ;; 3) { - case $(wmii9menu Delete Fullscreen ToggleFloat) in + case $(wmii9menu Delete Fullscreen ToggleFloat SendLeft SendRight) in Delete) echo kill >> $WMII_DIR/client/$client/ctl;; Fullscreen) echo Fullscreen on >> $WMII_DIR/client/$client/ctl;; ToggleFloat) echo send $client toggle >> $WMII_DIR/tag/sel/ctl;; + SendLeft) + echo send sel left >> $WMII_DIR/tag/sel/ctl;; + SendRight) + echo send sel right >> $WMII_DIR/tag/sel/ctl;; esac }& ;; 4) ;; @@ -263,6 +267,28 @@ Key() { sel=$(sed 1q $WMII_DIR/client/sel/ctl) tag=$(lstags | wimenu -h "${HIST}.tags" -n 50) || return echo "$tag" >> $WMII_DIR/client/$sel/tags;; + + ## Hardware keys + XF86RotateWindows) ## Toggle between 'normal' an 'right' + local old new + old="$(xrotate|cut -d $'\t' -f3|sort -u)" + case "$old" in + normal) new=right;; + *) new=normal;; + esac + xrotate "$new" + ;; + $MODKEY-XF86RotateWindows) ## Rotate in 90° steps + local old new + old="$(xrotate|cut -d $'\t' -f3|sort -u)" + case "$old" in + normal) new=right;; + right) new=inverted;; + inverted) new=left;; + left) new=normal;; + esac + xrotate "$new" + ;; esac } @@ -270,6 +296,7 @@ runcmd() ( PATH=$_PATH unset NOTIFY_SOCKET # systemd unset WMII_CONFPATH # wmii + unset WMII_ADDRESS # wmii unset _PATH WMII_NAMESPACE WMII_DIR # wmiirc exec 8>&- # xinit/systemd handshake exec systemd-run --user --scope -- sh -c "$*" diff --git a/.config/wmii-hg/rbar_acpi b/.config/wmii-hg/rbar_acpi index 24742f8..9c557e0 100755 --- a/.config/wmii-hg/rbar_acpi +++ b/.config/wmii-hg/rbar_acpi @@ -15,7 +15,8 @@ update() { -e 's/\s*remaining//g' \ -e 's/\s*until charged//g' \ -e 's/charging at zero rate - will never fully charge./∞/g' \ - -e 's/\s*ok,\s*//g' | + -e 's/\s*ok,\s*//g' \ + -e 's/\s+//g' | cat -n | while read -r n line; do printf "label %s\n" "$line" | write "${id}.${n}" done diff --git a/.config/wmii-hg/rbar_clock b/.config/wmii-hg/rbar_clock index e84d5c3..c66b21e 100755 --- a/.config/wmii-hg/rbar_clock +++ b/.config/wmii-hg/rbar_clock @@ -7,7 +7,7 @@ update() { while true; do { printf 'label ' - date +'%a, %F %T %Z(%:::z)' + date +'%a %F %T %Z(%:::z)' } | write "$id" sleep .5 done diff --git a/.config/wmii-hg/rbar_wifi b/.config/wmii-hg/rbar_wifi index d201152..e740777 100755 --- a/.config/wmii-hg/rbar_wifi +++ b/.config/wmii-hg/rbar_wifi @@ -1,14 +1,5 @@ #!/usr/bin/env bash -iwinfo() { - local interface=$1 - iwconfig "$interface" | - sed -r 's/ {2,}/\n/g' | - sed -e '/^\s*$/d' -e 's/:\s*/=/' \ - -e '1s/^/Interface=/' \ - -e '2s/^/MAC Protocol=/' -} - update() { local iface=wlp2s0 @@ -18,7 +9,7 @@ update() { while true; do IFS=$'\n' lines=($( - iwinfo "$iface" | sed -rn 's@^(ESSID|Link Quality)=@@p' + iwdata "$iface" | sed -rn 's@^(ESSID|Link Quality)=@@p' ifdata -pa "$iface" )) IFS='|' |