Skip to content

dot Files: ZSH setup and productivity tools for development

License

Notifications You must be signed in to change notification settings

deinsoftware/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

dotfiles

Languages: [πŸ‡ͺπŸ‡Έ] EspaΓ±ol - [πŸ‡ΊπŸ‡Έ] English

ZSH setup and productivity tools for development

Repo

1. Clone

Clone this repo on ~/.dotfiles path:

git clone https://github.com/deinsoftware/dotfiles.git ~/.dotfiles

2. Setup

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 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 and BROWSE 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

3. Permissions

Now add execution permission:

chmod +x ~/.dotfiles/helpers/**/* ~/.dotfiles/helpers/**/.[!.]*

4. Update

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.

Folder Structure

~
└── .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

Plugins

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

Official

Extras

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
)

Article Series


About

Built With

  • VS Code - Code editing redefined.
  • Widows Terminal - A modern terminal application for users of command-line tools and shells.

Versioning

We use SemVer for versioning. For the versions available, see the ZSH Dev Toolkit on GitHub.

Authors

See also the list of contributors who participated in this project.

Sponsors

If this project helps you, consider buying me a cup of coffee.

GitHub Sponsors paypal

License

This project is licensed under the MIT License - see the LICENSE file for details.