Skip to content

hanlsin/unixenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unixenv

This is a repository to setup a terminal environment easily on UNIX-like OS: such as Ubuntu, Mac, etc.

Choose your preferences

Quickstart

Mac

brew install git
git clone https://github.com/hanlsin/unixenv.git ~/.unixenv
brew install zsh
~/.unixenv/setup.sh
brew install vim
ln -s ~/.unixenv/unixenv_vimrc ~/.vimrc
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vi ~/.vimrc
# Please execute :PlugInstall in the vim
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install

Ubuntu

sudo apt install git
git clone https://github.com/hanlsin/unixenv.git ~/.unixenv
sudo apt install zsh
~/.unixenv/setup.sh
sudo apt install vim
ln -s ~/.unixenv/unixenv_vimrc ~/.vimrc
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vi ~/.vimrc
# Please execute :PlugInstall in the vim
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install

How to use?

Clone the repository

git clone https://github.com/hanlsin/unixenv.git ~/.unixenv

or clone this repository and set UNIXENV_HOME=<where_the_repository_path_is>.

Setup profiles

If your preferred shell (bash or zsh) was prepared, environment variables would be registered in the resource file automatically with the below command.

~/.unixenv/setup.sh

Create symbolic links

touch ~/.local_profile

There is a new env file to prevent uploading critical inforation on github accidently.

You can insert any aliases or variables in ~/.local_profile, and it will be safe from accidental uploading.

Use Zsh

Install Zsh

Mac

brew install zsh

Ubuntu

sudo apt install zsh

Install Oh My Zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

plugins

vi ~/.zshrc

Find plugins and input the below in the .zshrc file.

plugins=(
    git
    pipenv
    virtualenv
)

Setup personal envs

vi ~/.zshrc

Input the below in the .zshrc file.

[[ ! -f ~/.unixenv/.unixenv_profile ]] || ~/.unixenv/.unixenv_profile
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k

Find ZSH_THEME and input the below in the .zshrc file.

#ZSH_THEME="robbyrussell"
ZSH_THEME="powerlevel10k/powerlevel10k"

To customize prompt

ln -s ~/.unixenv/p10k.zsh ~/.p10k.zsh
# or
p10k configure

Input the below in the .zshrc file

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

Use Vim

Install Vim

Mac

brew install vim

Ubuntu

sudo apt install vim

Setup Vim configuration

Create a symbolic link for ~/.vimrc

ln -s ~/.unixenv/unixenv_vimrc ~/.vimrc

or, if already ~/.vimrc exists, add the below context into the file.

" call default_vimrc
if filereadable($UNIXENV_VIMRC_PATH . "/default_vimrc")
    so $UNIXENV_VIMRC_PATH/default_vimrc
endif

Prepare plugin managers

curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

for Vundle

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

Setup plugin managers

vi ~/.vimrc
:PlugInstall
:PluginInstall

Use fzf

git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install

Use Tmux

Zsh on Tmux

ln -s ~/.unixenv/tmux.zsh.conf ~/.tmux.conf

Bash on Tmux

ln -s ~/.unixenv/tmux.bash.conf ~/.tmux.conf
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Setup font

I recommend to install the Meslo Nerd Font font via

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published