aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--emacs/.authinfo.gpg21
-rw-r--r--i3/.config/i3/config1
-rw-r--r--procmail/.procmailrc4
-rwxr-xr-xscripts/bin/fix_screens_at_work.sh27
-rwxr-xr-xscripts/pny22
-rw-r--r--zsh/.zshrc71
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
3hQIMA5dnaCz2b+2zARAAuqSVqiMhE0RbRalQYNLvdrTTVn7W3kV/yPVOrYyf8iMm
4eib3UX98wVnfmxLkG0ChtmsGHw69owcnPVKpUMeSztVay1z+BRcQRWkQ3ZgSXrZp
55o+l76uGYXs11YgWICCNxl6BaNGePosQQ1UpzFxeyC7PLoyVf7r7PYO9Rgcb9AAV
6k1O/2nEhLyamZZIOJCA8dS1YdsJFOtWba8eMMD90OEIwXU8geyTLfWRKbnOF+ktD
7t9of+Uf4+ZtgcbujsPwSTD0hGhPy3QoAP7dB8i6q6vaCP7Mue0cuegXySlurbRJ9
8S832d7FR7j4TFJ9klOm6qf0ImrVzHqnivlq+pihCu0g20DhCHVM58/wyOlLNM0Ze
9YTMbaYpvmwGFG0zQkx4N6pncaaOTca0DuaJP1Xjvq7iujVpQ7QdAxy8bNV4YwiGU
10zC0ZLTqlqM46WEShjzigkUicUzyacPBC3lKunTVnWJ+3yhtphM5dw9s3dSBYFdJU
11tOlHe3XZt7VRpEsIWhFRw2Z7nLrm9QGAK1Vzt199KD5lxnaZMKi1l7LuxwTVJMAy
12w2B4FtI5gBt5N3+XC+Tn2FIbKoWIDU42wGEG/DcpISuFVJTARLDrzsGsb+ufzcoo
13Ul5cnvbpzqdiISRGtrRw7WatC2nPim4SVPLD7THNEm+n5OXCimP/YeCxQvkUC5HS
14wFoB/u214XilaEHNufyNMdWxnLlO/FrArVFFQHI/4MqUqZlFO38jhKO7r0ThN5QG
15pKYhftJ5ZYB8dKx6msv5sbkEPLO9RA29+5RjRSh+KbaAwgiWsCvIRbOr9hdIPnfY
16AkZuYOeGbXPcREftF6Xyb0h94rxLtplOiN/oM/VjLrk/cHvhqlWubsu6U2JGbCA9
17dn5F/t7mvsLv5LtaLurTHwS4s1HYHbqOea02nr+HU4LvYZ8HEWxq0MYDqyK8F9ok
18HEvARG+VWjudBf82GxNTmdRrtkj8y1RpPFL2dQlolx/lDIgaATAAXAsp6HfzikPz
19cMh/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
175exec run-once xfce4-power-manager 175exec run-once xfce4-power-manager
176exec run-once blueman-applet 176exec run-once blueman-applet
177exec run-once feh --bg-scale "/home/jason/Sync/wallpaper/wallhaven-3601.jpg" 177exec run-once feh --bg-scale "/home/jason/Sync/wallpaper/wallhaven-3601.jpg"
178exec 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 @@
1MAILDIR="$HOME/Maildir" 1MAILDIR="$HOME/Mail"
2DEFAULT="$MAILDIR/jason/" 2DEFAULT="$MAILDIR/incoming/"
3LOGFILE="$MAILDIR/procmail.log" 3LOGFILE="$MAILDIR/procmail.log"
4VERBOSE=on 4VERBOSE=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
5xrandr --output DP-4 --right-of DP-2 --auto --primary #--mode 2560x1440 5# xrandr --output DP-4 --right-of DP-2 --auto --primary #--mode 2560x1440
6xrandr --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
9xmodmap ~/.Xmodmap-pckeyboard_fix 9# xmodmap ~/.Xmodmap-pckeyboard_fix
10sleep 1 10# sleep 1
11xmodmap ~/.Xmodmap-pckeyboard_fix 11# xmodmap ~/.Xmodmap-pckeyboard_fix
12
13# With USB monitor
14xrandr --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
19feh --bg-scale ~/Sync/wallpaper/wallhaven-3601.jpg
20xmodmap ~/.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
3if [[ $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
15elif [[ $1 == "unmount" ]]; then
16 echo "Unmounting /dev/mapper/usbkey"
17
18 sudo umount /dev/mapper/usbkey
19 sudo cryptsetup luksClose /dev/mapper/usbkey
20else
21 echo "mount or unmount?"
22fi
diff --git a/zsh/.zshrc b/zsh/.zshrc
index f0d1f10..ec8b151 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -53,24 +53,28 @@ plugins=(git git-extras docker fabric gpg-agent pep8 pip pyenv pylint python vag
53ZSH=~/.oh-my-zsh 53ZSH=~/.oh-my-zsh
54 54
55source $ZSH/oh-my-zsh.sh 55source $ZSH/oh-my-zsh.sh
56export LANG=en_US.UTF-8
57export MANPATH="/usr/local/man:$MANPATH"
56 58
57# maybe this stuff should go in .profile. Emacs seems to read from that 59# PATH setup
58export RUST_SRC_PATH="$HOME/Code/rust-lang/src"
59if [ -f $HOME/.cargo/env ]; then
60 source $HOME/.cargo/env
61fi
62
63export GOROOT=/usr/local/go/
64export GOPATH=$HOME/Code/go
65
66export PATH="$HOME/bin:$HOME/.cargo/bin:/usr/local/go/bin/:$PATH" 60export PATH="$HOME/bin:$HOME/.cargo/bin:/usr/local/go/bin/:$PATH"
67if [ -f /usr/local/go/bin/go ]; then 61if [ -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"
69fi 63fi
70 64
71export MANPATH="/usr/local/man:$MANPATH" 65# Rust
66if [ -f $HOME/.cargo/env ]; then
67 source $HOME/.cargo/env
68fi
72 69
73export LANG=en_US.UTF-8 70# maybe this stuff should go in .profile. Emacs seems to read from that
71if [ -x $HOME/.cargo/bin/rustup ]; then
72 export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
73fi
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'
82export EDITOR='emacsclient' 86export _TERM_EMACS='emacsclient -nw -a "emacs -nw"'
87export 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
92alias fixfileperm='find /music -type f -exec chmod 0644 {} \;' 97#alias fixfileperm='find /music -type f -exec chmod 0644 {} \;'
93alias 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' 98alias 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'
94alias ducks='du -cks * |sort -rn |head -11' 99alias ducks='du -cks * |sort -rn |head -11'
100alias dc='docker-compose'
101alias define='sdcv'
102alias emacs=$_TERM_EMACS
103alias java18='/usr/local/java/jdk1.8.0_191/bin/java'
104alias javac18='/usr/local/java/jdk1.8.0_191/bin/javac'
95 105
106# Python
96if [ -f /usr/local/bin/virtualenvwrapper.sh ]; then 107if [ -f /usr/local/bin/virtualenvwrapper.sh ]; then
97 source /usr/local/bin/virtualenvwrapper.sh 108 source /usr/local/bin/virtualenvwrapper.sh
98elif [ -f /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh ]; then 109elif [ -f /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh ]; then
99 source /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh 110 source /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh
100fi 111fi
101 112
102 113# direnv
103
104# emacsclient is a script located in ~/bin
105# alias emacs='emacsclient'
106
107alias dc='docker-compose'
108alias define='sdcv'
109
110DIRENV=`whereis -b direnv | awk {'print $2'}` 114DIRENV=`whereis -b direnv | awk {'print $2'}`
111if [[ -f $DIRENV && -x $DIRENV ]]; then 115if [[ -f $DIRENV && -x $DIRENV ]]; then
112 eval "$(direnv hook zsh)" 116 eval "$(direnv hook zsh)"
113fi 117fi
114 118
119# GPG ssh key
115export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" 120export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
116 121
117export GPG_TTY=$(tty) 122export GPG_TTY=$(tty)
118export COMPOSE_HTTP_TIMEOUT=600 123
119export DOCKER_CLIENT_TIMEOUT=120 124#export COMPOSE_HTTP_TIMEOUT=600
125#export DOCKER_CLIENT_TIMEOUT=120
120 126
121show_virtual_env() { 127show_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
137dg() {
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}