From de668f47bc8c6b5f4799cf252591c42fae45b02e Mon Sep 17 00:00:00 2001 From: Tiago Celestino Date: Mon, 24 Feb 2025 08:15:39 -0300 Subject: [PATCH 1/8] chore: move fonts --- {fonts => extras/fonts}/CommitMono-400-Regular.otf | Bin {fonts => extras/fonts}/CommitMono-700-Regular.otf | Bin {fonts => extras/fonts}/FiraCode-Light.ttf | Bin {fonts => extras/fonts}/FiraCode-Regular.ttf | Bin {fonts => extras/fonts}/FiraCode-Retina.ttf | Bin .../fonts}/JetBrainsMono-ExtraLight.ttf | Bin {fonts => extras/fonts}/JetBrainsMono-Regular.ttf | Bin {fonts => extras/fonts}/JetBrainsMono-Thin.ttf | Bin 8 files changed, 0 insertions(+), 0 deletions(-) rename {fonts => extras/fonts}/CommitMono-400-Regular.otf (100%) rename {fonts => extras/fonts}/CommitMono-700-Regular.otf (100%) rename {fonts => extras/fonts}/FiraCode-Light.ttf (100%) rename {fonts => extras/fonts}/FiraCode-Regular.ttf (100%) rename {fonts => extras/fonts}/FiraCode-Retina.ttf (100%) rename {fonts => extras/fonts}/JetBrainsMono-ExtraLight.ttf (100%) rename {fonts => extras/fonts}/JetBrainsMono-Regular.ttf (100%) rename {fonts => extras/fonts}/JetBrainsMono-Thin.ttf (100%) 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 From bb7cbde14c06f34e85a2ed7457dddd6b67c2e200 Mon Sep 17 00:00:00 2001 From: Tiago Celestino Date: Mon, 24 Feb 2025 08:16:06 -0300 Subject: [PATCH 2/8] chore: update to use global env --- .npmrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.npmrc b/.npmrc index 2303389..254540f 100644 --- a/.npmrc +++ b/.npmrc @@ -3,6 +3,7 @@ save-exact=true init-author-email=${USER_EMAIL} init-author-name=${USER_NAME} 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 From ce6b42154b96b2be186c74004f51eba6497f097b Mon Sep 17 00:00:00 2001 From: Tiago Celestino Date: Mon, 24 Feb 2025 08:16:31 -0300 Subject: [PATCH 3/8] refactor: change fonts path --- install | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) 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 From 21c4c5937799a7f58344576b0c34f78fd0abdf52 Mon Sep 17 00:00:00 2001 From: Tiago Celestino Date: Mon, 24 Feb 2025 08:17:13 -0300 Subject: [PATCH 4/8] refactor: set global env --- zsh/.zshrc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index dd4c18d..9156e8b 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 sleect "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 From 04aa6f5f471fe67a17a38fb67b4720c4ba2bbace Mon Sep 17 00:00:00 2001 From: Tiago Celestino Date: Mon, 24 Feb 2025 08:18:07 -0300 Subject: [PATCH 5/8] docs: update doc --- README.md | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 441366f..fc79b80 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ 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 @@ -22,12 +22,15 @@ git clone https://github.com/tcelestino/dotfiles.git ~/.dotfiles ```bash cd ~/.dotfiles && 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. Install ```bash ./install ``` +โš ๏ธ **Don't forget set values `GH_TOKEN` and `NPM_TOKEN`!!** ## Additional Configurations @@ -40,26 +43,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). From a53962f8de465d893d48e39c642d7196b3293f37 Mon Sep 17 00:00:00 2001 From: Tiago Celestino Date: Mon, 24 Feb 2025 08:19:43 -0300 Subject: [PATCH 6/8] chore: add comments --- .npmrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.npmrc b/.npmrc index 254540f..0c1972d 100644 --- a/.npmrc +++ b/.npmrc @@ -1,7 +1,7 @@ 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} # set value NPM_SCOPE in .zshrc loglevel=notice From 8cc3671d11e3f3a6e6d962dfaa0348c9ee0414f5 Mon Sep 17 00:00:00 2001 From: Tiago Celestino Date: Mon, 24 Feb 2025 08:23:05 -0300 Subject: [PATCH 7/8] chore: typo --- zsh/.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 9156e8b..f8944c4 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -17,7 +17,7 @@ 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="" # create token at https://github.com/settings/apps sleect "Personal access tokens" +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" # set your ssh key path From 4df7f1faffb492b119353a4a43973db1a8a27052 Mon Sep 17 00:00:00 2001 From: Tiago Celestino Date: Mon, 24 Feb 2025 08:27:01 -0300 Subject: [PATCH 8/8] docs: update doc --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fc79b80..bb4fb9a 100644 --- a/README.md +++ b/README.md @@ -17,25 +17,26 @@ This repo is 100% open for you to explore and customize. Just clone it and swap 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. ```bash -4. Install + +4. Run the install script ```bash ./install ``` -โš ๏ธ **Don't forget set values `GH_TOKEN` and `NPM_TOKEN`!!** +โš ๏ธ **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