diff --git a/.npmrc b/.npmrc index 2303389..0c1972d 100644 --- a/.npmrc +++ b/.npmrc @@ -1,8 +1,9 @@ prefix=${HOME}/.npm-packages save-exact=true -init-author-email=${USER_EMAIL} -init-author-name=${USER_NAME} +init-author-email=${USER_EMAIL} # set value USER_EMAIL in .zshrc +init-author-name=${USER_NAME} # set value USER_NAME in .zshrc init-license=MIT -scope=${NPM_SCOPE} -loglevel=warning -${NPM_SCOPE}:registry=https://registry.npmjs.org/ +scope=@${NPM_SCOPE} # set value NPM_SCOPE in .zshrc +loglevel=notice +registry=https://registry.npmjs.org/ +npm.pkg.github.com/:_authToken=${GH_TOKEN} # set value GH_TOKEN in .zshrc diff --git a/README.md b/README.md index 441366f..bb4fb9a 100644 --- a/README.md +++ b/README.md @@ -14,25 +14,29 @@ This repo is 100% open for you to explore and customize. Just clone it and swap 1. Clone this repository to your local machine: ```bash -git clone https://github.com/tcelestino/dotfiles.git ~/.dotfiles +git clone git@github.com:tcelestino/dotfiles.git ``` -2. Set run file to install +2. Open folder `dotfiles` and set run file to install ```bash -cd ~/.dotfiles && chmod +x install +chmod +x install ``` +3. Open `.zshrc` file and change variables "USER_NAME", "USER_EMAIL" and "NPM_SCOPE". You might set `GH_TOKEN` and `NPM_TOKEN` too. -3. Install +```bash + +4. Run the install script ```bash ./install ``` +โš ๏ธ **Don't forget to set values `GH_TOKEN` and `NPM_TOKEN`!!** ## Additional Configurations - To set the keyboard layout to include the 'รง' character on Ubuntu, follow the steps in the article "[Ajeitando o cedilha errado (ฤ‡) no Ubuntu Linux](https://www.danielkossmann.com/pt/ajeitando-cedilha-errado-ubuntu-linux/)" -- Import the color scheme and other configurations into iTerm2. The settings can be found in the "iterm2" folder. +- If you use iTerm2, you might import the color scheme and other configurations into iTerm2. The settings can be found in the "iterm2" folder. ## Contributing @@ -40,26 +44,5 @@ If you have any suggestions, improvements, or bug fixes, feel free to open an is This project follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. Please use it when making changes to the codebase. -- ๐Ÿš€ Features: `feat: feature description` -- ๐Ÿ› Bug Fixes: `fix: bug fix description` -- ๐Ÿ“ Documentation: `docs: description of the change` -- โšก๏ธ Performance: `perf: description of the improvement` -- โ™ป๏ธ Refactoring: `refactor: description of the change` -- ๐ŸŽจ Style: `style: description of the change` -- โœ… Tests: `test: description of the test` -- ๐Ÿ“ฆ Dependencies: `chore(deps): description of the update` -- ๐Ÿ›  Chores: `chore: description of the task` - -For breaking changes, add `!` after the type or include `BREAKING CHANGE:` in the commit body: -```bash -# Using ! after the type -feat!: change that breaks compatibility - -# Or using BREAKING CHANGE in the body -feat: change that breaks compatibility - -BREAKING CHANGE: detailed description of the breaking change -``` - ## License See in [LICENSE](LICENSE). diff --git a/fonts/CommitMono-400-Regular.otf b/extras/fonts/CommitMono-400-Regular.otf similarity index 100% rename from fonts/CommitMono-400-Regular.otf rename to extras/fonts/CommitMono-400-Regular.otf diff --git a/fonts/CommitMono-700-Regular.otf b/extras/fonts/CommitMono-700-Regular.otf similarity index 100% rename from fonts/CommitMono-700-Regular.otf rename to extras/fonts/CommitMono-700-Regular.otf diff --git a/fonts/FiraCode-Light.ttf b/extras/fonts/FiraCode-Light.ttf similarity index 100% rename from fonts/FiraCode-Light.ttf rename to extras/fonts/FiraCode-Light.ttf diff --git a/fonts/FiraCode-Regular.ttf b/extras/fonts/FiraCode-Regular.ttf similarity index 100% rename from fonts/FiraCode-Regular.ttf rename to extras/fonts/FiraCode-Regular.ttf diff --git a/fonts/FiraCode-Retina.ttf b/extras/fonts/FiraCode-Retina.ttf similarity index 100% rename from fonts/FiraCode-Retina.ttf rename to extras/fonts/FiraCode-Retina.ttf diff --git a/fonts/JetBrainsMono-ExtraLight.ttf b/extras/fonts/JetBrainsMono-ExtraLight.ttf similarity index 100% rename from fonts/JetBrainsMono-ExtraLight.ttf rename to extras/fonts/JetBrainsMono-ExtraLight.ttf diff --git a/fonts/JetBrainsMono-Regular.ttf b/extras/fonts/JetBrainsMono-Regular.ttf similarity index 100% rename from fonts/JetBrainsMono-Regular.ttf rename to extras/fonts/JetBrainsMono-Regular.ttf diff --git a/fonts/JetBrainsMono-Thin.ttf b/extras/fonts/JetBrainsMono-Thin.ttf similarity index 100% rename from fonts/JetBrainsMono-Thin.ttf rename to extras/fonts/JetBrainsMono-Thin.ttf diff --git a/install b/install index f5a20a9..5fc7327 100644 --- a/install +++ b/install @@ -27,13 +27,6 @@ error() { # command -v git >/dev/null 2>&1 || error "Git is required but not installed. https://git-scm.com/downloads" # } -# This is the default variable to set your information. You can override these values by exporting them in your shell. -export_user_info() { - export USER_NAME="Your Name" - export USER_EMAIL="your.email@example.com" - export NPM_SCOPE="@your_username" -} - # Create a symbolic link, removing existing file/link if necessary # @param $1 Source file path # @param $2 Destination link path @@ -164,7 +157,7 @@ setup_fonts() { mkdir -p "$font_dir" fi log "Installing fonts for macOS..." - cp "$DIR/fonts/"* "$font_dir/" + cp "$DIR/extras/fonts/"* "$font_dir/" elif [[ "$OSTYPE" == "linux-gnu"* ]]; then # Ubuntu/Linux local font_dir="$HOME/.local/share/fonts" @@ -172,7 +165,7 @@ setup_fonts() { mkdir -p "$font_dir" fi log "Installing fonts for Linux..." - cp "$DIR/fonts/"* "$font_dir/" + cp "$DIR/extras/fonts/"* "$font_dir/" fc-cache -f -v else error "Unsupported operating system" @@ -191,15 +184,13 @@ setup_macos() { main() { log "Starting installation from $DIR..." - export_user_info - - install_brew install_oh_my_zsh + install_brew install_deno + setup_zsh setup_brew setup_git - setup_zsh setup_npm setup_macos setup_fonts diff --git a/zsh/.zshrc b/zsh/.zshrc index dd4c18d..f8944c4 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -4,6 +4,7 @@ ZSH_THEME="dracula" plugins=(alias-finder brew copypath copyfile deno dotenv docker docker-compose extract history iterm2 git macos npm python vscode web-search yarn, custom-functions) + # global export JAVA_HOME="$(/usr/libexec/java_home -v 1.$JAVA_VERSION)" export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" @@ -16,10 +17,13 @@ export PATH="/usr/local/bin:$PATH" # brew on Intel export NPM_PACKAGES="${HOME}/.npm-packages" export PATH="$NPM_PACKAGES/bin:$PATH" export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" -export GH_TOKEN="YOUR GITHUB TOKEN" -export NPM_TOKEN="YOUR NPM TOKEN" +export GH_TOKEN="" # create token at https://github.com/settings/apps select "Personal access tokens" +export NPM_TOKEN="" export NODE_ENV="development" -export SSH_KEY_PATH="~/.ssh/id_ed" # cat ~/.ssh/id_ed +export SSH_KEY_PATH="~/.ssh/id_ed" # set your ssh key path +export USER_NAME="" +export USER_EMAIL="" +export NPM_SCOPE=${USER:-your_username} # e.g. tcelestino # preferred editor for local and remote sessions if [[ -n $SSH_CONNECTION ]]; then