Skip to content

dev-vinicius-andrade/dotfiles

Repository files navigation

dotfiles

Repository to version my current dotfiles and scripts to set up my development environment.

Currently, I'm using the same dotfiles to work either on MacOS and Windows WSL.

The main goal of this repository is to automate the setup of my development environment, installing all dependencies and setting up the configuration files.

Table of contents

Checkout the table of contents to navigate through the repository documentation.

Clone and give script permission

Take a look at the following sections to clone the repository and give the script permission to run according to your operating system.

Clone and give script permission Macos

If you are using MacOS, you can clone the repository and give the script permission to run.

cd ~/ && git clone [email protected]:dev-vinicius-andrade/dotfiles.git && \
chmod +x ~/dotfiles/init.zsh

Clone and give script permission Linux

I'll separate this in two sections:

Clone and give script permission Linux Os

If you are using a Linux Os, you can clone the repository and give the script permission to run.

cd ~/ && git clone [email protected]:dev-vinicius-andrade/dotfiles.git && \
chmod +x ~/dotfiles/init.zsh
Clone and give script permission Windows Wsl

You can checkout more about installing WSL in Microsoft Docs case you don't have it.

If you are using Windows WSL, like I'm, that could be a little bit tricky.

As my linux tests were made on WSL, I figured out that the best way to clone the repository was to clone it directly on windows home directory.

Clone the repository on Windows

So, let's use power shell to clone the re and navigate to your home directory and clone the repository.

cd ~ && git clone git@github.com:dev-vinicius-andrade/dotfiles.git 
Give script permission on WSL

As I wanted to use the same dotfiles in different systems, with different usernames, the best way i found to work with was:

  • Connect to the WSL Distribution terminal Microsoft Docs
  • Create a symbolic link to the dotfiles folder in the WSL home directory

Notes: If you cloned the repository in another location rather than the user home directory, you should change the path in the commands below.

ln -sn "$(wslpath $(cmd.exe /C "echo %USERPROFILE%" 2>/dev/null) | tr -d '\r')/dotfiles" ~/dotfiles
  • Give the script permission to run
chmod +x ~/dotfiles/init.sh

Running

After cloning the repository and giving the script permission to run, you can run the script to install all dependencies and set up the environment.

As some tasks need sudo permission, you may need to enter your password during the script execution.

Running on MacOS

After cloning the repository and giving the script permission to run, you can run the script to install all/or a specif set of dependencies and set up the environment.

Notes: The script location depends where you cloned the repository. As some tasks need sudo permission, you may need to enter your password during the script execution.

~/dotfiles/init.sh #options

Checkout the Init Script Options section to see the available options.

Running on Linux

After cloning the repository and giving the script permission to run, you can run the script to install all/or a specif set of dependencies and set up the environment.

Notes: The script location depends where you cloned the repository. As some tasks need sudo permission, you may need to enter your password during the script execution.

~/dotfiles/init.sh #options

Checkout the Init Script Options section to see the available options.

Running on Windows WSL

After cloning the repository and giving the script permission to run, you can run the script to install all/or a specif set of dependencies and set up the environment.

Examples of running the script

Notes: The script location depends where you cloned the repository. As some tasks need sudo permission, you may need to enter your password during the script execution.

Running without options

# The script will run all the tasks and asks for your inputs to continue;
~/dotfiles/init.sh

Auto accept package licenses

# If you want to auto accept all package licenses, you can pass the -y|--yes|-Y flag
~/dotfiles/init.sh -y #options

Checkout the Init Script Options section to see the available options.

Skip already runned tasks

Or you can run it passing some Init Script Options section to see the available options.

## The script will run all the tasks that are not already runned.
## The -y|--yes|-Y flag will auto accept package licenses
~/dotfiles/init.sh --skip #-y|--yes|-Y to auto accept package licenses

Installing only some dependencies

You can also run the script to install only some dependencies. In the example below, the script will run only the wezterm init script.

# The script will run only the wezterm init script.
~/dotfiles/init.sh --wezterm

Skipping specific tasks

You can also skip some specific tasks. In the example below, the script will skip the wezterm init script. So, it will run all the tasks except the wezterm init script.

# The script will skip the wezterm init script.
~/dotfiles/init.sh --skip-wezterm

A complete example

Let's assume you've run the script before with --skip-wezterm and now you want to install it.

# The script will run only the wezterm init script.
~/dotfiles/init.sh --skip_package_installation --skip_update --wezterm
# This will skip the package manager installation and updates, auto accept all package licenses and run only the wezterm init script.

Help

As the code can be updated, make it's more reliable to check the available options directly in the script using the --help flag.

Notes: The script location depends where you cloned the repository. As some tasks need sudo permission, you may need to enter your password during the script execution.

~/dotfiles/init.sh --help

Init Script Options

The script has some options that you can use to install only run some specific tasks. As the code can be updated, make it's more reliable to check the available options directly in the script using the --help flag.

Notes: The script location depends where you cloned the repository. As some tasks need sudo permission, you may need to enter your password during the script execution.

~/dotfiles/init.sh --help

<name_of_init_script> can be one of the files in the scripts/zsh/init folder without the extension.

  • -y|--yes| -Y : accepts all packages installation licenses

  • --skip: Skip the already runned tasks

  • --skip-<name_of_init_script> : You set the skip flag for the individual scripts if needed.

  • --<name_of_init_script> : Run only the specified init script

  • --skip-package-installation | -spi : Skip the package manager installation

  • --skip-update | -su : Skip the package manager update and upgrade

  • --additional-packages : Install additional that are not in the package manager

  • --help : Will print the available options to run the script

Project structure

  • init.sh Script to install all dependencies and set up the environment
  • .zshrc Zsh configuration file
  • .zshenv Zsh Public environment variables
  • alacritty Alacritty configuration files and themes
  • nushell Nushell configuration files
  • nvim Neovim configuration files/plugins
  • starship Starship configuration files
  • tmux Tmux configuration files
  • zsh Zsh configuration files
  • scripts Scripts to automate the environment setup
  • wezterm Wezterm configuration files
  • nushell Nushell configuration files

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published