diff --git a/.github/workflows/ci-workflow.yaml b/.github/workflows/ci-workflow.yaml index 397a29b..7f6a1eb 100644 --- a/.github/workflows/ci-workflow.yaml +++ b/.github/workflows/ci-workflow.yaml @@ -4,7 +4,7 @@ on: pull_request: push: branches: - - master + - main jobs: lint: diff --git a/CHANGELOG.md b/CHANGELOG.md index fd161e9..132e75e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -797,4 +797,4 @@ All notable changes to this project will be documented in this file. See [standa [1.3.0]: https://github.com/trystan2k/dotfiles/compare/v1.2.0...v1.3.0 [1.2.0]: https://github.com/trystan2k/dotfiles/compare/v1.1.0...v1.2.0 [1.1.0]: https://github.com/trystan2k/dotfiles/compare/v1.0.0...v1.1.0 -[1.0.0]: https://github.com/trystan2k/dotfiles/compare/master...v1.0.0 +[1.0.0]: https://github.com/trystan2k/dotfiles/compare/main...v1.0.0 diff --git a/README.md b/README.md index f8606af..47ee355 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,11 @@ ## General Information **Warning** The idea of this repository is to be a reference to others. **NEVER** run the installation script or any other script without -reading it first and adjust according to your needs. This is my very personal configuration and may not be suitable for you. I highly recommend -you to fork or clone and edit this repo before try it. I am not responsible for any problem it may cause to you. Use at your own risk! - -This script setup a MacOS (tested in Catalina 10.15.x) or a Linux (tested in Elementary OS Hera 5.1). It basically install the same softwares -(if available for the OS) and do the dotfiles symlink to the home folder. Specificaly for MacOS, it also do some initial configuration like add -icons to the Dock, set languages, etc. +reading it first and adjust according to your needs. This is my very personal configuration and may not be suitable for you. +I highly recommend you fork or clone and edit this repo before trying it. I am not responsible for any problem it may cause you. Use at your own risk! +This script set up a MacOS (tested in Catalina 10.15.x) or a Linux (tested in Elementary OS Hera 5.1). +It installs the same software (if available for the OS) and do the dotfiles symlink to the home folder. +Specifically for MacOS, it also does some initial configuration like adding icons to the Dock, set languages, etc. ## Installation @@ -20,14 +19,14 @@ icons to the Dock, set languages, etc. The first and easier option to install is just execute the line in a terminal window: -`sh -c "$(curl -fsSL https://raw.githubusercontent.com/trystan2k/dotfiles/master/install.sh)"` +`sh -c "$(curl -fsSL https://raw.githubusercontent.com/trystan2k/dotfiles/main/install.sh)"` This will verify any missing dependency (like Git) and install it (or ask you to install, in MacOS case), create my personal folder, clone this -repository inside it and execute the bootstrap script +repository inside it, and execute the bootstrap script -### Option 2 - Clone repo +### Option 2 - Clone the repo -Other option is to manually clone this repository and execute the bootstrap script. +Another option is to manually clone this repository and execute the bootstrap script. a. Clone repo: `git clone https://github.com/trystan2k/dotfiles.git` @@ -35,19 +34,19 @@ b. Go to script folders and execute bootstrap: `cd dotfiles\scripts; ./bootstrap ### Option 3 - Separated steps -Some of the configuration can be ran isolated. You can, for example, use the `tools.sh` script in the scripts folder to just install the +Some of the configurations can be run isolated. You can, for example, use the `tools.sh` script in the scripts folder to just install the software listed there. a. Install tools: `cd dotfiles\scripts; ./tools.sh` -b. Create/Recreate the symlinks to home folder: `cd dotfiles\scripts; ./symlinks.sh` +b. Create/Recreate the symlinks to the home folder: `cd dotfiles\scripts; ./symlinks.sh` c. Use the Brewfile to install all tools via Brew `cd dotfiles\tools\macos|linux; brew bundle` ## Post Installation -Due to some limitations, some tools needs to be installed after the terminal is restarted, so it gets difficult to automatize. -After the reboot of the computer (after the dotfiles install script is finished or the last step is executed and terminal restarted), execute the post-install script: +Due to some limitations, some tools need to be installed after the terminal is restarted, so it gets difficult to automatize. +After the reboot of the computer (after the dotfiles install script is finished or the last step is executed and the terminal restarted), execute the post-install script: `cd dotfiles\scripts; ./post-install.sh` @@ -58,8 +57,8 @@ After the reboot of the computer (after the dotfiles install script is finished I am currently using [Hyper Terminal](https://hyper.is/). The symlink step link the `.hyper.js` file with my current configuration, themes, etc. -**Theme** : [powerlevel10k theme](https://github.com/romkatv/powerlevel10k) -**Fonts** : [Nerd Font](https://github.com/ryanoasis/nerd-fonts) and [Fira Code](https://github.com/tonsky/FiraCode) +**Theme**: [powerlevel10k theme](https://github.com/romkatv/powerlevel10k) +**Fonts**: [Nerd Font](https://github.com/ryanoasis/nerd-fonts) and [Fira Code](https://github.com/tonsky/FiraCode) ### Homebrew @@ -72,14 +71,14 @@ I use ZSH as my current shell and to manage its plugin I am using [Zinit](https: ### Package Manager -I am using [ASDF](https://github.com/asdf-vm/asdf) as package manager for tools like `node/npm`, `yarn`, `java`, `ruby`, etc. -Some of initial configuration can be done executing the configuration script located at configure folder +I am using [ASDF](https://github.com/asdf-vm/asdf) as the package manager for tools like `node/npm`, `yarn`, `java`, `ruby`, etc. +Some of the initial configuration can be done by executing the configuration script located in configure folder `cd dotfiles\configure; ./asdf-plugins.sh` -## Apps that needs to be installed manually +## Apps that need to be installed manually -## Settings that needs to be done manually +## Settings that need to be done manually 1. System Preferences -> Users & Groups -> Login Options => Change 'Show fast user switching menu as' to `Icon` 2. System Preferences -> Security & Privacy -> General => Change 'Require password' to `5 seconds` @@ -106,15 +105,11 @@ Some of initial configuration can be done executing the configuration script loc Paste #182E40,#1F4662,#1D425D,#FFFFFF,#988026,#FFFFFF,#2CDB00,#FEBD29 ``` -3. Alfred - - - ## Apps that are interesting but not sure if useful 1. Rust Desk () - Remote connection 2. Sound Control () - Sound control -3. ZX - () - Allow to write shells scripts with Javascript +3. ZX - () - Allow writing shells scripts with Javascript 4. Mackup () - Backup of Mac 5. Karabiner () - Remap keybinds 6. Mosh () - Mobile SSH client @@ -133,21 +128,21 @@ Some of initial configuration can be done executing the configuration script loc Or use defined alias `fixZshPerms` -2. It is possible that `colorls` Ruby Gem fail to install in a fresh installation due to folder permissions. +2. It is possible that `colorls` Ruby Gem fail to install in a fresh install due to folder permissions. If that happens, just execute the ruby-gems.sh script after reboot. ```bash . configure/ruby-gems.sh ``` -3. When use IDEs like VSCode, due to how direnv loads, the asdf tools are not loaded correctly. It this starts to happen, +3. When using IDEs like VSCode, due to how direnv loads, the asdf tools are not loaded correctly. If this starts to happen, just reload direnv: ```bash direnv reload ``` -4. When installing Ruby via ASDF in a M1 Mac, add this to .exports.local file +4. When installing Ruby via ASDF in an M1 Mac, add this to .exports.local file ```bash export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)" @@ -162,13 +157,13 @@ just reload direnv: ## Thanks to -This repo was based in the | [Mathias Bynens](https://mathiasbynens.be/) | one ( I had remove some -setup I do not need and add some I found over internet. +This repo was based on the | [Mathias Bynens](https://mathiasbynens.be/) | one ( +I had remove some setup I do not need and added some I found over the internet. -The unassisted install script was based in the | [Mohammed Ajmal Siddiqui](https://github.com/ajmalsiddiqui/dotfiles) | one. I had added some +The unassisted install script was based on the | [Mohammed Ajmal Siddiqui](https://github.com/ajmalsiddiqui/dotfiles) | one. I added some tools I used and remove some I don't. -The idea to split tools into separated files was inspired by | [Zach Holman](https://github.com/holman/dotfiles) |, which later was replaced +The idea to split tools into separate files was inspired by | [Zach Holman](https://github.com/holman/dotfiles) |, which later was replaced by Brewfile usage. -And many other folks that is always available to help in GitHub Issue, StackOverFlow questions, blog articles and sharing Gists with examples. +And many other folks that are always available to help with GitHub Issue, StackOverFlow questions, blog articles, and sharing Gists with examples. diff --git a/install.sh b/install.sh index a93acff..9e2dfc8 100755 --- a/install.sh +++ b/install.sh @@ -59,7 +59,7 @@ git clone $GITHUB_URL cd dotfiles || exit # Go to branch -git checkout master +git checkout main # Cd into scripts folder and execute bootstrap cd scripts || exit diff --git a/symlinks/.gitconfig b/symlinks/.gitconfig index 40b30b0..3a23c10 100755 --- a/symlinks/.gitconfig +++ b/symlinks/.gitconfig @@ -26,6 +26,8 @@ comaster = checkout master + comain = checkout main + cofeature = "!cofeature() { git checkout feature/$1; }; cofeature" crfeature = "!crfeature() { git checkout -b feature/$1; }; crfeature" @@ -34,13 +36,16 @@ crrelease = "!crrelease() { git checkout -b release/$1; }; crrelease" - # Delete any branches (except the actual, master and develop) that have been merged into master + # Delete any branches (except the actual, master, maon and develop) that have been merged into default branch # See also: https://gist.github.com/robmiller/5133264 # delete-merged-branches - dmb = "!git fetch && git branch --merged | grep -v "master" | grep -v "develop" | grep -v "\\*" | xargs -n 1 git branch -d" + dmb = "!git fetch && git branch --merged | grep -v "master" | grep -v "main" | grep -v "develop" | grep -v "\\*" | xargs -n 1 git branch -d" # Sync fork repo - sync-fork = !git fetch upstream && git checkout master && git merge upstream/master + sync-fork-master = !git fetch upstream && git checkout master && git merge upstream/master + + # Sync fork repo + sync-fork-main = !git fetch upstream && git checkout main && git merge upstream/main # View abbreviated SHA, description, and history graph of the latest 20 commits l = log --pretty=oneline -n 20 --graph --abbrev-commit