From f8ea9750b5940166db494f95dde6f42e3d75beaf Mon Sep 17 00:00:00 2001 From: Paul Wako Date: Sun, 22 Mar 2020 20:26:38 -0400 Subject: [PATCH] zsh -> bash --- .gitmodules | 24 ----------------------- Makefile | 10 ++++------ bash_profile | 5 ----- zshrc => bashrc | 52 +++++++++++++++++++------------------------------ oh-my-zsh | 1 - zprofile | 3 --- 6 files changed, 24 insertions(+), 71 deletions(-) delete mode 100644 bash_profile rename zshrc => bashrc (62%) delete mode 160000 oh-my-zsh delete mode 100644 zprofile diff --git a/.gitmodules b/.gitmodules index 135e35d..7ef6ee6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,27 +1,3 @@ -[submodule "vim/pack/plugins/opt/vim-gotham"] - path = vim/pack/plugins/opt/vim-gotham - url = https://github.com/whatyouhide/vim-gotham.git -[submodule "vim/pack/plugins/start/vim-unimpaired"] - path = vim/pack/plugins/start/vim-unimpaired - url = https://github.com/tpope/vim-unimpaired -[submodule "vim/pack/plugins/start/supertab"] - path = vim/pack/plugins/start/supertab - url = https://github.com/ervandew/supertab.git -[submodule "vim/pack/plugins/start/syntastic"] - path = vim/pack/plugins/start/syntastic - url = https://github.com/vim-syntastic/syntastic.git [submodule "dircolors-solarized"] path = dircolors-solarized url = https://github.com/seebi/dircolors-solarized -[submodule "oh-my-zsh"] - path = oh-my-zsh - url = https://github.com/robbyrussell/oh-my-zsh.git -[submodule "vim/pack/plugins/start/vim-codequery"] - path = vim/pack/plugins/start/vim-codequery - url = https://github.com/devjoe/vim-codequery.git -[submodule "vim/pack/plugins/start/unite.vim"] - path = vim/pack/plugins/start/unite.vim - url = https://github.com/Shougo/unite.vim.git -[submodule "vim/pack/plugins/start/denite.nvim"] - path = vim/pack/plugins/start/denite.nvim - url = https://github.com/Shougo/denite.nvim.git diff --git a/Makefile b/Makefile index 0e2f1f7..8379bcc 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ LN_FLAGS = -sfnv MKDIR_FLAGS = -pv -home_symlinks = aliases Xresources xbindkeysrc xinitrc offlineimaprc urlview msmtprc mutt zprofile zshrc vimrc vim Xmodmap oh-my-zsh bash_profile tmux.conf gitconfig +home_symlinks = aliases Xresources xbindkeysrc xinitrc offlineimaprc urlview msmtprc mutt vimrc vim Xmodmap tmux.conf gitconfig bashrc config_copy = @@ -10,13 +10,11 @@ config_symlinks = termite dircolors-solarized i3 gnupg_symlinks = gpg-agent.conf -local_install: aliases Xresources xbindkeysrc xinitrc offlineimaprc urlview msmtprc mutt zprofile zshrc vimrc vim termite dircolors-solarized oh-my-zsh i3 gitconfig gpg-agent.conf +local_install: aliases Xresources xbindkeysrc xinitrc offlineimaprc urlview msmtprc mutt vimrc vim termite dircolors-solarized i3 gitconfig gpg-agent.conf bashrc -mac_local_install: zprofile zshrc vimrc vim dircolors-solarized oh-my-zsh gpg-agent.conf tmux.conf +mac_local_install: vimrc vim dircolors-solarized gpg-agent.conf tmux.conf bashrc -remote_install: vim vimrc dircolors-solarized zshrc aliases oh-my-zsh zprofile tmux.conf - -noroot_install: bash_profile +remote_install: vim vimrc dircolors-solarized aliases tmux.conf ctrl_install: Xmodmap diff --git a/bash_profile b/bash_profile deleted file mode 100644 index b2863a5..0000000 --- a/bash_profile +++ /dev/null @@ -1,5 +0,0 @@ -export SHELL=/bin/zsh -if [[ "$SSH_CONNECTION" != "" && "$MY_SSH_CONNECTION" != "yes" ]]; then - /bin/zsh -fi -exec /bin/zsh -l diff --git a/zshrc b/bashrc similarity index 62% rename from zshrc rename to bashrc index 8ef9b33..747dda7 100644 --- a/zshrc +++ b/bashrc @@ -1,50 +1,36 @@ -#source $HOME/.aliases +# History +HISTCONTROL=ignoreboth +shopt -s histappend +HISTSIZE=10000 +HISTFILESIZE=20000 +shopt -s checkwinsize -# Set TERM for proper tmux colors +# PS1 +PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' + +# Generic exports if [[ -z $TMUX ]]; then + export GOPATH=$HOME/go + export PATH=$GOPATH/bin:$PATH + export PATH=$HOME/.local/bin:$PATH export TERM='xterm-256color' else export TERM='screen-256color' fi -# Custom binaries -if [[ -z $TMUX ]]; then - export PATH=$HOME/.local/bin:$PATH - 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 -fi - -# ZSH -export ZSH=$HOME/.oh-my-zsh -ZSH_THEME='steeef' -plugins=(git history-substring-search docker docker-compose) -source $ZSH/oh-my-zsh.sh - -## Keybindings -bindkey '^K' history-beginning-search-backward -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 -fi - # GPG/SSH ## Void: Install pcsclite, pcsc-ccid, gnupg2-scdaemon +## Debian: Install pcscd scdaemon ## Yubico openpgp: https://support.yubico.com/support/solutions/articles/15000006420-using-your-yubikey-with-openpgp # Run if ALL variables are not set if [ -z "$SSH_CONNECTION" ] && [ -z "$SSH_CLIENT" ] && [ -z "$SSH_TTY" ]; then + # Check for macOS pkcs key if [[ "$OSTYPE" == 'darwin'* ]]; then eval `ssh-agent` ssh-add -t 48h -s $OPENSC_LIBS/opensc-pkcs11.so fi + # Run if not macOS or if macOS failed to load pkcs11 key if [[ "$OSTYPE" != 'darwin'* || ("$?" != '0' && "$OSTYPE" == 'darwin'*) ]]; then unset SSH_AGENT_PID if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then @@ -55,8 +41,9 @@ if [ -z "$SSH_CONNECTION" ] && [ -z "$SSH_CLIENT" ] && [ -z "$SSH_TTY" ]; then fi fi -# Also do this to prevent incorrect path ordering in tmux: -# https://apple.stackexchange.com/questions/248813/tmux-always-modify-my-zsh-path +# OS specific settings +## macOS: do this to prevent incorrect path ordering in tmux: +## https://apple.stackexchange.com/questions/248813/tmux-always-modify-my-zsh-path if [[ "$OSTYPE" == 'darwin'* ]]; then export CLICOLOR=YES export GEM_HOME=/Users/paul.walko/.gem @@ -68,6 +55,7 @@ if [[ "$OSTYPE" == 'darwin'* ]]; then export PATH=/usr/local/opt/ncurses/bin:$PATH fi elif [[ "$OSTYPE" == 'linux-gnu' ]]; then + alias ls="ls --color=auto" eval `dircolors ~/.config/dircolors-solarized/dircolors.256dark` fi diff --git a/oh-my-zsh b/oh-my-zsh deleted file mode 160000 index 489be24..0000000 --- a/oh-my-zsh +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 489be2452a6410a2c7837910c4cd3c0ed47a7481 diff --git a/zprofile b/zprofile deleted file mode 100644 index 35c6f1e..0000000 --- a/zprofile +++ /dev/null @@ -1,3 +0,0 @@ -xbindkeys &> /dev/null - -systemctl --user is-active --quiet offlineimap || (pass dumb &> /dev/null && systemctl --user start offlineimap)