Languages: [🇪🇸] Español - [🇺🇸] English
ZSH setup and productivity tools for development
Clone this repo on ~/.dotfiles
path:
git clone https://github.com/deinsoftware/dotfiles.git ~/.dotfiles
On .zshrc
file add.
# Utils
source ~/.dotfiles/utils/source
# Configs
export USE_PROMPT="p10k" # p10k | starship
export USE_MANAGER="zinit" # omz | zinit
# Prompt
if [ "$USE_PROMPT" = "p10k" ]; then
add_source ~/.dotfiles/configs/prompts/p10k
fi
# <source packages required to be load before the plugins>
# Manager
if [ "$USE_MANAGER" = "omz" ]; then
add_source ~/.dotfiles/configs/managers/omz
elif [ "$USE_MANAGER" = "zinit" ]; then
add_source ~/.dotfiles/configs/managers/zinit
fi
# Prompt
if [ "$USE_PROMPT" = "starship" ]; then
add_source ~/.dotfiles/configs/prompts/starship
fi
# Plugins
add_source ~/.dotfiles/configs/plugins/fzf
# <source packages required to be load after the plugins>
# Helpers
export PLAYGROUND_DIR="$HOME/Developer/dein/dev-playground"
export WINHOME=$(wslpath "$(wslvar USERPROFILE)")
export OPEN="wslview" #wsl2
export BROWSER="${OPEN}" #wsl2
export PATH="$HOME/.dotfiles/helpers/android/:$PATH"
export PATH="$HOME/.dotfiles/helpers/b64/:$PATH"
export PATH="$HOME/.dotfiles/helpers/code/:$PATH"
export PATH="$HOME/.dotfiles/helpers/md/:$PATH"
export PATH="$HOME/.dotfiles/helpers/open/:$PATH"
export PATH="$HOME/.dotfiles/helpers/search/:$PATH"
export PATH="$HOME/.dotfiles/helpers/terminal/:$PATH"
chmod +x ~/.dotfiles/helpers/**/* ~/.dotfiles/helpers/**/.[!.]*
# Custom
add_source ~/.dotfiles/.aliases
add_source ~/.dotfiles/.configs
add_source ~/.dotfiles/.colors
add_source ~/.dotfiles/.hooks
OPEN
andBROWSE
constants need to be configured according yor OS. Windows (WSL2) and macOS use the same command to open the file explorer or the default web browser, on Ubuntu (Linux) need to be specified each one.
SO | OPEN |
BROWSER |
---|---|---|
Windows (GitBash) | "explorer.exe" |
"${OPEN}" |
Windows (WSL2) | "wslview" |
"${OPEN}" |
macOS | "open" |
"${OPEN}" |
Ubuntu | "xdg-open" , "gnome-open" , "nautilus" ... |
"googlechrome" , "firefox" ... |
On WSL require to install wslu
Now add execution permission:
chmod +x ~/.dotfiles/helpers/**/* ~/.dotfiles/helpers/**/.[!.]*
Once finish, save .zshrc
file, close and reopen all terminals or update his source running source ~/.zshrc
command.
That's all folks! It's ready to use.
~
└── .zshrc
└── .dotfiles
├── configs
├── helpers
│ ├── android
│ ├── b64
│ ├── code
│ ├── md
│ ├── open
│ ├── search
│ └── terminal
├── .aliases
├── .colors
├── .configs
└── .hooks
Name | Description |
---|---|
.zshrc |
ZSH source file |
configs |
Folder with global configurations to use in other scripts |
helpers |
Folder with custom helper functions to use as terminal commands |
── android |
Helper commands for Android tools |
── b64 |
Helper commands for file conversions to/from base64 |
── code |
Helper commands to open VSCode |
── open |
Helper commands to open file/folder on the File Explorer or open files/url on the Browser |
── search |
Helper commands to search text inside files |
── terminal |
Helper commands to talk with the OS |
.aliases |
File for aliases definitions |
.colors |
File with terminal colors to use in other scripts |
.configs |
File for global configuratins. |
.hooks |
ZSH hooks file with custom functions to run as validation before and after run commands |
Oh My zsh! have a lot of plugins to use. It's recommended to explore the options and use what is good for your needs.
If you are using NVM take care of following this configuration to avoid slowing the zsh start-up and this configuration to speed up the compinit
- adb
- brew
- docker
- git
- git-lfs
- github
- gitignore
- history-substring-search
- node
- npm
- nvm
- vscode
- sudo
- web-search
- z
git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting
git clone https://github.com/Pilaton/OhMyZsh-full-autoupdate.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/ohmyzsh-full-autoupdate
git clone https://github.com/MichaelAquilina/zsh-you-should-use.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-you-should-use
Edit the ~/.zshrc
file and add it inside the plugins
property (don't use commas as separators).
plugins=(
...
+ zsh-autosuggestions
+ fast-syntax-highlighting
+ ohmyzsh-full-autoupdate
+ you-should-use
)
- iTerm2 + Oh My Zsh! + Powerlevel10K best terminal combination for Geeks!
- Why Oh My ZSH is so cool?
- Useful Alias for ZSH
- Reveal the command behind an alias with ZSH
- Command validations with ZSH
- Open File Explorer and Browser from ZSH
- ZSH cheatsheet for git plugin
- VS Code - Code editing redefined.
- Widows Terminal - A modern terminal application for users of command-line tools and shells.
We use SemVer for versioning. For the versions available, see the ZSH Dev Toolkit on GitHub.
- Camilo Martinez Equiman]
See also the list of contributors who participated in this project.
If this project helps you, consider buying me a cup of coffee.
This project is licensed under the MIT License - see the LICENSE file for details.