Skip to content

Commit

Permalink
chore: update default branch to main
Browse files Browse the repository at this point in the history
  • Loading branch information
trystan2k committed Nov 1, 2022
1 parent 56a3007 commit 5bde4ab
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- main

jobs:
lint:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
61 changes: 28 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,46 @@
## 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

### Option 1 - Install Script

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`

b. Go to script folders and execute bootstrap: `cd dotfiles\scripts; ./bootstrap.sh`

### 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`

Expand All @@ -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

Expand All @@ -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`
Expand All @@ -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

<https://github.com/wesbos/Cobalt2-Alfred-Theme/blob/master/Cobalt2-alfred3.x.alfredappearance>

## Apps that are interesting but not sure if useful

1. Rust Desk (<https://rustdesk.com/>) - Remote connection
2. Sound Control (<https://staticz.com/soundcontrol/>) - Sound control
3. ZX - (<https://github.com/google/zx>) - Allow to write shells scripts with Javascript
3. ZX - (<https://github.com/google/zx>) - Allow writing shells scripts with Javascript
4. Mackup (<https://github.com/lra/mackup>) - Backup of Mac
5. Karabiner (<https://pqrs.org/osx/karabiner/>) - Remap keybinds
6. Mosh (<https://mosh.org/>) - Mobile SSH client
Expand All @@ -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 [email protected])"
Expand All @@ -162,13 +157,13 @@ just reload direnv:

## Thanks to

This repo was based in the | [Mathias Bynens](https://mathiasbynens.be/) | one (<https://github.com/mathiasbynens/dotfiles).> 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 (<https://github.com/mathiasbynens/dotfiles).>
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.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 8 additions & 3 deletions symlinks/.gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 5bde4ab

Please sign in to comment.