add macos stuff
parent
9eae3e84d5
commit
61c27e32ce
2
Makefile
2
Makefile
|
@ -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
|
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
|
remote_install: vim vimrc dircolors-solarized zshrc aliases oh-my-zsh zprofile tmux.conf
|
||||||
|
|
||||||
noroot_install: bash_profile
|
noroot_install: bash_profile
|
||||||
|
|
6
vimrc
6
vimrc
|
@ -46,9 +46,9 @@ nnoremap <leader>l :CodeQuery Call<CR>
|
||||||
nnoremap <leader>r :CodeQuery Caller<CR>
|
nnoremap <leader>r :CodeQuery Caller<CR>
|
||||||
nnoremap <leader>e :CodeQuery Callee<CR>
|
nnoremap <leader>e :CodeQuery Callee<CR>
|
||||||
|
|
||||||
"" Set tabs to 4 spaces
|
"" Set tabs to 2 spaces
|
||||||
set tabstop=4
|
set tabstop=2
|
||||||
set shiftwidth=4
|
set shiftwidth=2
|
||||||
set expandtab
|
set expandtab
|
||||||
|
|
||||||
"" Stupid backspace setting
|
"" Stupid backspace setting
|
||||||
|
|
2
zprofile
2
zprofile
|
@ -1 +1,3 @@
|
||||||
xbindkeys &> /dev/null
|
xbindkeys &> /dev/null
|
||||||
|
|
||||||
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
|
|
38
zshrc
38
zshrc
|
@ -1,4 +1,4 @@
|
||||||
source $HOME/.aliases
|
#source $HOME/.aliases
|
||||||
|
|
||||||
# Set TERM for proper tmux colors
|
# Set TERM for proper tmux colors
|
||||||
if [[ -z $TMUX ]]; then
|
if [[ -z $TMUX ]]; then
|
||||||
|
@ -13,11 +13,10 @@ export PATH=$HOME/.cargo/bin:$PATH
|
||||||
export GOPATH=$HOME/go
|
export GOPATH=$HOME/go
|
||||||
export PATH=$HOME/.local/share/flatpak/exports/bin:$PATH
|
export PATH=$HOME/.local/share/flatpak/exports/bin:$PATH
|
||||||
export PATH=$HOME/.local/minecraft-launcher:$PATH
|
export PATH=$HOME/.local/minecraft-launcher:$PATH
|
||||||
|
|
||||||
# ZSH
|
# ZSH
|
||||||
export ZSH=$HOME/.oh-my-zsh
|
export ZSH=$HOME/.oh-my-zsh
|
||||||
ZSH_THEME="steeef"
|
ZSH_THEME='steeef'
|
||||||
plugins=(git history-substring-search)
|
plugins=(git history-substring-search docker docker-compose)
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
## Keybindings
|
## Keybindings
|
||||||
|
@ -27,7 +26,7 @@ bindkey '^w' backward-kill-word
|
||||||
bindkey '\e[2~' insert-last-word
|
bindkey '\e[2~' insert-last-word
|
||||||
if [ -f /etc/os-release ]; then
|
if [ -f /etc/os-release ]; then
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
if [ "$ID" = "rhel" ]; then
|
if [ "$ID" = 'rhel' ]; then
|
||||||
bindkey '\e[1~' beginning-of-line
|
bindkey '\e[1~' beginning-of-line
|
||||||
bindkey '\e[4~' end-of-line
|
bindkey '\e[4~' end-of-line
|
||||||
fi
|
fi
|
||||||
|
@ -36,18 +35,41 @@ fi
|
||||||
# GPG/SSH
|
# GPG/SSH
|
||||||
## Void: Install pcsclite, pcsc-ccid, gnupg2-scdaemon
|
## Void: Install pcsclite, pcsc-ccid, gnupg2-scdaemon
|
||||||
## Yubico openpgp: https://support.yubico.com/support/solutions/articles/15000006420-using-your-yubikey-with-openpgp
|
## 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
|
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
|
unset SSH_AGENT_PID
|
||||||
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
||||||
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||||
fi
|
fi
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
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
|
fi
|
||||||
|
|
||||||
# VIM
|
# VIM
|
||||||
## Reduce delay swithing between normal & insert mode
|
## Reduce delay swithing between normal & insert mode
|
||||||
export KEYTIMEOUT=1
|
export KEYTIMEOUT=1
|
||||||
|
|
||||||
# Fancy tui dircolors
|
|
||||||
eval `dircolors ~/.config/dircolors-solarized/dircolors.256dark`
|
|
||||||
|
|
Loading…
Reference in New Issue