add macos stuff

master
Paul Walko 2019-11-26 14:18:41 -05:00
parent 9eae3e84d5
commit 61c27e32ce
4 changed files with 43 additions and 17 deletions

View File

@ -14,6 +14,8 @@ gnupg_symlinks = gpg-agent.conf
local_install: aliases Xresources xbindkeysrc xinitrc offlineimaprc urlview msmtprc zprofile zshrc vimrc vim termite dircolors-solarized oh-my-zsh i3 gitconfig config gpg-agent.conf
mac_local_install: zprofile zshrc vimrc vim dircolors-solarized oh-my-zsh gpg-agent.conf tmux.conf
remote_install: vim vimrc dircolors-solarized zshrc aliases oh-my-zsh zprofile tmux.conf
noroot_install: bash_profile

6
vimrc
View File

@ -46,9 +46,9 @@ nnoremap <leader>l :CodeQuery Call<CR>
nnoremap <leader>r :CodeQuery Caller<CR>
nnoremap <leader>e :CodeQuery Callee<CR>
"" Set tabs to 4 spaces
set tabstop=4
set shiftwidth=4
"" Set tabs to 2 spaces
set tabstop=2
set shiftwidth=2
set expandtab
"" Stupid backspace setting

View File

@ -1 +1,3 @@
xbindkeys &> /dev/null
export PATH="$HOME/.cargo/bin:$PATH"

50
zshrc
View File

@ -1,10 +1,10 @@
source $HOME/.aliases
#source $HOME/.aliases
# Set TERM for proper tmux colors
if [[ -z $TMUX ]]; then
export TERM='xterm-256color'
export TERM='xterm-256color'
else
export TERM='screen-256color'
export TERM='screen-256color'
fi
# Customl binaries
@ -13,11 +13,10 @@ export PATH=$HOME/.cargo/bin:$PATH
export GOPATH=$HOME/go
export PATH=$HOME/.local/share/flatpak/exports/bin:$PATH
export PATH=$HOME/.local/minecraft-launcher:$PATH
# ZSH
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="steeef"
plugins=(git history-substring-search)
ZSH_THEME='steeef'
plugins=(git history-substring-search docker docker-compose)
source $ZSH/oh-my-zsh.sh
## Keybindings
@ -26,28 +25,51 @@ bindkey '^J' history-beginning-search-forward
bindkey '^w' backward-kill-word
bindkey '\e[2~' insert-last-word
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" = "rhel" ]; then
bindkey '\e[1~' beginning-of-line
bindkey '\e[4~' end-of-line
fi
. /etc/os-release
if [ "$ID" = 'rhel' ]; then
bindkey '\e[1~' beginning-of-line
bindkey '\e[4~' end-of-line
fi
fi
# GPG/SSH
## Void: Install pcsclite, pcsc-ccid, gnupg2-scdaemon
## Yubico openpgp: https://support.yubico.com/support/solutions/articles/15000006420-using-your-yubikey-with-openpgp
# Run if NOT ssh session
if [ -z "$SSH_CLIENT" ] || [ -z "$SSH_TTY" ]; then
CONTINUE=true
if [[ "$OSTYPE" == 'darwin'* ]]; then
eval `ssh-agent`
ssh-add -t 48h -s $OPENSC_LIBS/opensc-pkcs11.so
CONTINUE=false
fi
if [[ "$CONTINUE" == true ]]; then
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null
fi
fi
if [[ "$OSTYPE" == 'darwin'* ]]; then
export CLICOLOR=YES
export PATH=/usr/local/opt/python/libexec/bin:$PATH
export PATH=/usr/local/opt/ncurses/bin:$PATH
export PATH=$PATH:$HOME/.linkerd2/bin
export OPENSC_LIBS=/usr/local/lib
source $HOME/.cargo/env
# ssh-agent config
eval `ssh-agent`
ssh-add -t 48h -s $OPENSC_LIBS/opensc-pkcs11.so
if [ "$?" -ne 0 ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
elif [[ "$OSTYPE" == 'linux-gnu' ]]; then
eval `dircolors ~/.config/dircolors-solarized/dircolors.256dark`
fi
# VIM
## Reduce delay swithing between normal & insert mode
export KEYTIMEOUT=1
# Fancy tui dircolors
eval `dircolors ~/.config/dircolors-solarized/dircolors.256dark`