diff options
| -rw-r--r-- | emacs/.authinfo.gpg | 21 | ||||
| -rw-r--r-- | i3/.config/i3/config | 1 | ||||
| -rw-r--r-- | procmail/.procmailrc | 4 | ||||
| -rwxr-xr-x | scripts/bin/fix_screens_at_work.sh | 27 | ||||
| -rwxr-xr-x | scripts/pny | 22 | ||||
| -rw-r--r-- | zsh/.zshrc | 71 |
6 files changed, 112 insertions, 34 deletions
diff --git a/emacs/.authinfo.gpg b/emacs/.authinfo.gpg new file mode 100644 index 0000000..92721db --- /dev/null +++ b/emacs/.authinfo.gpg | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | -----BEGIN PGP MESSAGE----- | ||
| 2 | |||
| 3 | hQIMA5dnaCz2b+2zARAAuqSVqiMhE0RbRalQYNLvdrTTVn7W3kV/yPVOrYyf8iMm | ||
| 4 | eib3UX98wVnfmxLkG0ChtmsGHw69owcnPVKpUMeSztVay1z+BRcQRWkQ3ZgSXrZp | ||
| 5 | 5o+l76uGYXs11YgWICCNxl6BaNGePosQQ1UpzFxeyC7PLoyVf7r7PYO9Rgcb9AAV | ||
| 6 | k1O/2nEhLyamZZIOJCA8dS1YdsJFOtWba8eMMD90OEIwXU8geyTLfWRKbnOF+ktD | ||
| 7 | t9of+Uf4+ZtgcbujsPwSTD0hGhPy3QoAP7dB8i6q6vaCP7Mue0cuegXySlurbRJ9 | ||
| 8 | S832d7FR7j4TFJ9klOm6qf0ImrVzHqnivlq+pihCu0g20DhCHVM58/wyOlLNM0Ze | ||
| 9 | YTMbaYpvmwGFG0zQkx4N6pncaaOTca0DuaJP1Xjvq7iujVpQ7QdAxy8bNV4YwiGU | ||
| 10 | zC0ZLTqlqM46WEShjzigkUicUzyacPBC3lKunTVnWJ+3yhtphM5dw9s3dSBYFdJU | ||
| 11 | tOlHe3XZt7VRpEsIWhFRw2Z7nLrm9QGAK1Vzt199KD5lxnaZMKi1l7LuxwTVJMAy | ||
| 12 | w2B4FtI5gBt5N3+XC+Tn2FIbKoWIDU42wGEG/DcpISuFVJTARLDrzsGsb+ufzcoo | ||
| 13 | Ul5cnvbpzqdiISRGtrRw7WatC2nPim4SVPLD7THNEm+n5OXCimP/YeCxQvkUC5HS | ||
| 14 | wFoB/u214XilaEHNufyNMdWxnLlO/FrArVFFQHI/4MqUqZlFO38jhKO7r0ThN5QG | ||
| 15 | pKYhftJ5ZYB8dKx6msv5sbkEPLO9RA29+5RjRSh+KbaAwgiWsCvIRbOr9hdIPnfY | ||
| 16 | AkZuYOeGbXPcREftF6Xyb0h94rxLtplOiN/oM/VjLrk/cHvhqlWubsu6U2JGbCA9 | ||
| 17 | dn5F/t7mvsLv5LtaLurTHwS4s1HYHbqOea02nr+HU4LvYZ8HEWxq0MYDqyK8F9ok | ||
| 18 | HEvARG+VWjudBf82GxNTmdRrtkj8y1RpPFL2dQlolx/lDIgaATAAXAsp6HfzikPz | ||
| 19 | cMh/nz4qjmqQuaqRE0hjA/4R1pqm0f63xt3/2PG6m2RWAAgHOWVOek0OQuM= | ||
| 20 | =jyRe | ||
| 21 | -----END PGP MESSAGE----- | ||
diff --git a/i3/.config/i3/config b/i3/.config/i3/config index c10f74f..f01b121 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config | |||
| @@ -175,4 +175,5 @@ exec run-once synclient HorizTwoFingerScroll=1 | |||
| 175 | exec run-once xfce4-power-manager | 175 | exec run-once xfce4-power-manager |
| 176 | exec run-once blueman-applet | 176 | exec run-once blueman-applet |
| 177 | exec run-once feh --bg-scale "/home/jason/Sync/wallpaper/wallhaven-3601.jpg" | 177 | exec run-once feh --bg-scale "/home/jason/Sync/wallpaper/wallhaven-3601.jpg" |
| 178 | exec run-once xset dpms 300 600 900 | ||
| 178 | # exec run-once run_vmtoolsd | 179 | # exec run-once run_vmtoolsd |
diff --git a/procmail/.procmailrc b/procmail/.procmailrc index 99a57fb..d0b4fd4 100644 --- a/procmail/.procmailrc +++ b/procmail/.procmailrc | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | MAILDIR="$HOME/Maildir" | 1 | MAILDIR="$HOME/Mail" |
| 2 | DEFAULT="$MAILDIR/jason/" | 2 | DEFAULT="$MAILDIR/incoming/" |
| 3 | LOGFILE="$MAILDIR/procmail.log" | 3 | LOGFILE="$MAILDIR/procmail.log" |
| 4 | VERBOSE=on | 4 | VERBOSE=on |
| 5 | 5 | ||
diff --git a/scripts/bin/fix_screens_at_work.sh b/scripts/bin/fix_screens_at_work.sh index a4f20a6..b2f5c35 100755 --- a/scripts/bin/fix_screens_at_work.sh +++ b/scripts/bin/fix_screens_at_work.sh | |||
| @@ -1,11 +1,20 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | 2 | ||
| 3 | #xrandr --setprovideroutputsource 1 0 | 3 | # #xrandr --setprovideroutputsource 1 0 |
| 4 | #xrandr --output DP-2 --mode 1920x1200 | 4 | # #xrandr --output DP-2 --mode 1920x1200 |
| 5 | xrandr --output DP-4 --right-of DP-2 --auto --primary #--mode 2560x1440 | 5 | # xrandr --output DP-4 --right-of DP-2 --auto --primary #--mode 2560x1440 |
| 6 | xrandr --output DVI-I-1-1 --below DP-4 --auto | 6 | # xrandr --output DVI-I-1-1 --below DP-4 --auto |
| 7 | 7 | ||
| 8 | # For some reason, occasionally this needs to be executed twice | 8 | # # For some reason, occasionally this needs to be executed twice |
| 9 | xmodmap ~/.Xmodmap-pckeyboard_fix | 9 | # xmodmap ~/.Xmodmap-pckeyboard_fix |
| 10 | sleep 1 | 10 | # sleep 1 |
| 11 | xmodmap ~/.Xmodmap-pckeyboard_fix | 11 | # xmodmap ~/.Xmodmap-pckeyboard_fix |
| 12 | |||
| 13 | # With USB monitor | ||
| 14 | xrandr --output DVI-I-2-1 --mode 1920x1080 --pos 2280x1440 --rotate normal --output eDP-1-1 --primary --mode 1920x1080 --pos 0x144 --rotate normal --output HDMI-0 --off --output DP-3 --off --output DP-2 --off --output DP-1 --off --output DP-0 --mode 2560x1440 --pos 1920x0 --rotate normal | ||
| 15 | |||
| 16 | # Without usb monitor | ||
| 17 | #xrandr --output eDP-1-1 --primary --mode 1920x1080 --pos 0x256 --rotate normal --output HDMI-0 --off --output DP-3 --off --output DP-2 --off --output DP-1 --off --output DP-0 --mode 2560x1440 --pos 1920x0 --rotate normal | ||
| 18 | |||
| 19 | feh --bg-scale ~/Sync/wallpaper/wallhaven-3601.jpg | ||
| 20 | xmodmap ~/.Xmodmap | ||
diff --git a/scripts/pny b/scripts/pny new file mode 100755 index 0000000..f8da92c --- /dev/null +++ b/scripts/pny | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | if [[ $1 == "mount" ]]; then | ||
| 4 | DEVICE=`dmesg | tail | grep 'Attached SCSI' | sed -n 's/.*: \[\(sd[a-z]\)\] Attac.*/\1/p'` | ||
| 5 | |||
| 6 | if [[ $DEVICE == "" ]]; then | ||
| 7 | echo "Error finding device" | ||
| 8 | exit 1 | ||
| 9 | fi | ||
| 10 | |||
| 11 | echo "Mounting /dev/${DEVICE}1" | ||
| 12 | |||
| 13 | sudo cryptsetup luksOpen /dev/${DEVICE}1 usbkey | ||
| 14 | sudo mount -o user,exec /dev/mapper/usbkey /home/jason/sdb | ||
| 15 | elif [[ $1 == "unmount" ]]; then | ||
| 16 | echo "Unmounting /dev/mapper/usbkey" | ||
| 17 | |||
| 18 | sudo umount /dev/mapper/usbkey | ||
| 19 | sudo cryptsetup luksClose /dev/mapper/usbkey | ||
| 20 | else | ||
| 21 | echo "mount or unmount?" | ||
| 22 | fi | ||
| @@ -53,24 +53,28 @@ plugins=(git git-extras docker fabric gpg-agent pep8 pip pyenv pylint python vag | |||
| 53 | ZSH=~/.oh-my-zsh | 53 | ZSH=~/.oh-my-zsh |
| 54 | 54 | ||
| 55 | source $ZSH/oh-my-zsh.sh | 55 | source $ZSH/oh-my-zsh.sh |
| 56 | export LANG=en_US.UTF-8 | ||
| 57 | export MANPATH="/usr/local/man:$MANPATH" | ||
| 56 | 58 | ||
| 57 | # maybe this stuff should go in .profile. Emacs seems to read from that | 59 | # PATH setup |
| 58 | export RUST_SRC_PATH="$HOME/Code/rust-lang/src" | ||
| 59 | if [ -f $HOME/.cargo/env ]; then | ||
| 60 | source $HOME/.cargo/env | ||
| 61 | fi | ||
| 62 | |||
| 63 | export GOROOT=/usr/local/go/ | ||
| 64 | export GOPATH=$HOME/Code/go | ||
| 65 | |||
| 66 | export PATH="$HOME/bin:$HOME/.cargo/bin:/usr/local/go/bin/:$PATH" | 60 | export PATH="$HOME/bin:$HOME/.cargo/bin:/usr/local/go/bin/:$PATH" |
| 67 | if [ -f /usr/local/go/bin/go ]; then | 61 | if [ -f /usr/local/go/bin/go ]; then |
| 68 | export PATH="$PATH:$GOROOT/bin:$(go env GOPATH)/bin" | 62 | export PATH="$PATH:$GOROOT/bin:$(go env GOPATH)/bin" |
| 69 | fi | 63 | fi |
| 70 | 64 | ||
| 71 | export MANPATH="/usr/local/man:$MANPATH" | 65 | # Rust |
| 66 | if [ -f $HOME/.cargo/env ]; then | ||
| 67 | source $HOME/.cargo/env | ||
| 68 | fi | ||
| 72 | 69 | ||
| 73 | export LANG=en_US.UTF-8 | 70 | # maybe this stuff should go in .profile. Emacs seems to read from that |
| 71 | if [ -x $HOME/.cargo/bin/rustup ]; then | ||
| 72 | export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src" | ||
| 73 | fi | ||
| 74 | |||
| 75 | # Golang | ||
| 76 | #export GOROOT=/usr/local/go/ | ||
| 77 | #export GOPATH=$HOME/Code/go | ||
| 74 | 78 | ||
| 75 | # Preferred editor for local and remote sessions | 79 | # Preferred editor for local and remote sessions |
| 76 | # if [[ -n $SSH_CONNECTION ]]; then | 80 | # if [[ -n $SSH_CONNECTION ]]; then |
| @@ -79,7 +83,8 @@ export LANG=en_US.UTF-8 | |||
| 79 | # export EDITOR='mvim' | 83 | # export EDITOR='mvim' |
| 80 | # fi | 84 | # fi |
| 81 | #export EDITOR='/Applications/Emacs\ 25.app/Contents/MacOS/bin/emacsclient' | 85 | #export EDITOR='/Applications/Emacs\ 25.app/Contents/MacOS/bin/emacsclient' |
| 82 | export EDITOR='emacsclient' | 86 | export _TERM_EMACS='emacsclient -nw -a "emacs -nw"' |
| 87 | export EDITOR=$_TERM_EMACS | ||
| 83 | 88 | ||
| 84 | # Compilation flags | 89 | # Compilation flags |
| 85 | # export ARCHFLAGS="-arch x86_64" | 90 | # export ARCHFLAGS="-arch x86_64" |
| @@ -89,34 +94,35 @@ export VAGRANT_DOTFILE_PATH=~/.vagrant.d/projects | |||
| 89 | #export SSL_CERT_FILE=/usr/local/opt/curl-ca-bundle/share/ca-bundle.crt | 94 | #export SSL_CERT_FILE=/usr/local/opt/curl-ca-bundle/share/ca-bundle.crt |
| 90 | 95 | ||
| 91 | # Aliases | 96 | # Aliases |
| 92 | alias fixfileperm='find /music -type f -exec chmod 0644 {} \;' | 97 | #alias fixfileperm='find /music -type f -exec chmod 0644 {} \;' |
| 93 | alias cleanbranches='git branch --merged | grep -v "\*" | xargs -n 1 git branch -d; git branch -r --merged master | grep -iv "master" | sed "s/origin\///" | xargs -n 1 git push --delete origin' | 98 | alias cleanbranches='git branch --merged | grep -v "\*" | xargs -n 1 git branch -d; git branch -r --merged master | grep -iv "master" | sed "s/origin\///" | xargs -n 1 git push --delete origin' |
| 94 | alias ducks='du -cks * |sort -rn |head -11' | 99 | alias ducks='du -cks * |sort -rn |head -11' |
| 100 | alias dc='docker-compose' | ||
| 101 | alias define='sdcv' | ||
| 102 | alias emacs=$_TERM_EMACS | ||
| 103 | alias java18='/usr/local/java/jdk1.8.0_191/bin/java' | ||
| 104 | alias javac18='/usr/local/java/jdk1.8.0_191/bin/javac' | ||
| 95 | 105 | ||
| 106 | # Python | ||
| 96 | if [ -f /usr/local/bin/virtualenvwrapper.sh ]; then | 107 | if [ -f /usr/local/bin/virtualenvwrapper.sh ]; then |
| 97 | source /usr/local/bin/virtualenvwrapper.sh | 108 | source /usr/local/bin/virtualenvwrapper.sh |
| 98 | elif [ -f /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh ]; then | 109 | elif [ -f /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh ]; then |
| 99 | source /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh | 110 | source /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh |
| 100 | fi | 111 | fi |
| 101 | 112 | ||
| 102 | 113 | # direnv | |
| 103 | |||
| 104 | # emacsclient is a script located in ~/bin | ||
| 105 | # alias emacs='emacsclient' | ||
| 106 | |||
| 107 | alias dc='docker-compose' | ||
| 108 | alias define='sdcv' | ||
| 109 | |||
| 110 | DIRENV=`whereis -b direnv | awk {'print $2'}` | 114 | DIRENV=`whereis -b direnv | awk {'print $2'}` |
| 111 | if [[ -f $DIRENV && -x $DIRENV ]]; then | 115 | if [[ -f $DIRENV && -x $DIRENV ]]; then |
| 112 | eval "$(direnv hook zsh)" | 116 | eval "$(direnv hook zsh)" |
| 113 | fi | 117 | fi |
| 114 | 118 | ||
| 119 | # GPG ssh key | ||
| 115 | export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" | 120 | export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" |
| 116 | 121 | ||
| 117 | export GPG_TTY=$(tty) | 122 | export GPG_TTY=$(tty) |
| 118 | export COMPOSE_HTTP_TIMEOUT=600 | 123 | |
| 119 | export DOCKER_CLIENT_TIMEOUT=120 | 124 | #export COMPOSE_HTTP_TIMEOUT=600 |
| 125 | #export DOCKER_CLIENT_TIMEOUT=120 | ||
| 120 | 126 | ||
| 121 | show_virtual_env() { | 127 | show_virtual_env() { |
| 122 | if [ -n "$VIRTUAL_ENV" ]; then | 128 | if [ -n "$VIRTUAL_ENV" ]; then |
| @@ -127,3 +133,22 @@ show_virtual_env() { | |||
| 127 | #PS1='$(show_virtual_env)'$PS1 | 133 | #PS1='$(show_virtual_env)'$PS1 |
| 128 | 134 | ||
| 129 | [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh | 135 | [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh |
| 136 | |||
| 137 | dg() { | ||
| 138 | // credit: doug tolton | ||
| 139 | dg_res=$(ls -1p \ | ||
| 140 | | gawk -v target=$1 '$0 ~ target') | ||
| 141 | dg_res_count=$(echo $dg_res \ | ||
| 142 | | gawk 'length($0) > 0' \ | ||
| 143 | | wc -l) | ||
| 144 | |||
| 145 | if [[ "$dg_res_count" -eq 1 ]] | ||
| 146 | then | ||
| 147 | cd $(echo $dg_res) | ||
| 148 | elif [[ "$dg_res_count" -eq 0 ]]; then | ||
| 149 | echo "NO MATCHES" | ||
| 150 | else | ||
| 151 | echo $dg_res | ||
| 152 | echo "MATCHES: "$dg_res_count | ||
| 153 | fi | ||
| 154 | } | ||