Skip to content

Instantly share code, notes, and snippets.

@latavin243
Last active January 25, 2024 03:59
Show Gist options
  • Save latavin243/c4648e38eb0bfbf872cb9218e097d9da to your computer and use it in GitHub Desktop.
Save latavin243/c4648e38eb0bfbf872cb9218e097d9da to your computer and use it in GitHub Desktop.
Server environment, .zshrc with zplug, tmux config, etc. Follow the step.sh.
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
set -g display-panes-time 2000
set -g base-index 1 # start windows numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
set -g mouse on
set-option -g default-shell /usr/bin/zsh
# new window/pane with current path
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
export ZSH="$HOME/.oh-my-zsh"
export ZPLUG_HOME="$HOME/.zplug"
source $ZPLUG_HOME/init.zsh
ZSH_THEME="ys"
plugins=(
git
extract
z
sudo
tmux
)
zplug "zsh-users/zsh-autosuggestions"
zplug "zsh-users/zsh-syntax-highlighting", defer:2
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
zplug load --verbose
source $ZSH/oh-my-zsh.sh
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# prerequisites: zsh, git, tmux
# install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# install fzf
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
# edit .profile & .zshrc (copy from samples below), then source them
source .profile
source .zshrc
# install zplug
git clone https://github.com/zplug/zplug $ZPLUG_HOME
# install vim config (optional)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/latavin243/dot-vimrc/master/install.sh)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment