-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new file to document minimal setup, clean up images
- Loading branch information
Showing
8 changed files
with
152 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# An attempt at a minimal mac dev setup | ||
|
||
|
||
## Install Homebrew | ||
|
||
```bash | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
brew | ||
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/g/.zprofile\ | ||
eval "$(/opt/homebrew/bin/brew shellenv)"\ | ||
``` | ||
|
||
## Install some utilities | ||
```bash | ||
brew install 1password dropbox iterm2 arc shottr firefox telegram | ||
``` | ||
|
||
## Install dev tools | ||
```bash | ||
brew install colima kind docker docker-credential-helper docker-compose docker-buildx kubectl visual-studio-code zed micromamba | ||
``` | ||
|
||
## Setup custom resolutions with [hipdpi script](https://github.com/xzhih/one-key-hidpi) | ||
- This is for my ultra wide monitor (optional) | ||
```bash | ||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/xzhih/one-key-hidpi/master/hidpi.sh)" | ||
# set custom resolution of 2580x1080 in the script menus | ||
``` | ||
|
||
## Setup ZSH | ||
|
||
### ZSH Plugins | ||
|
||
Add ZSH Autosuggestions | ||
```bash | ||
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions | ||
``` | ||
|
||
ZSH Syntax Highlighting | ||
```bash | ||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git | ||
echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc | ||
``` | ||
|
||
Append to the end of the file `.zshrc | ||
|
||
It might look like this | ||
```bash | ||
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh | ||
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | ||
``` | ||
|
||
### `oh-my-posh` | ||
|
||
Modified Theme [bubblesline](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/bubblesline.omp.json) to simplify the display | ||
|
||
You may view the config [here](ohmyposh.json) | ||
|
||
Screenshot showing the Folder Name, and kubernetes context name | ||
|
||
![alt text](assets/ohmyposh-shell-screenshot.png) | ||
|
||
Screenshot showing folder name, git branch , python environment name and kubernetes context and namespace: | ||
|
||
![alt text](assets/ohmyposh-screenshot-moreinfo.png) | ||
|
||
|
||
Source the theme using the snippet below | ||
``` | ||
#ohmyposh | ||
# update the file name and path accordingly | ||
OHMYPOSHTHEMEFILE=v2a.json | ||
eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/$OHMYPOSHTHEMEFILE)" | ||
if [ "$TERM_PROGRAM" != "Apple_Terminal" ]; then | ||
eval "$(oh-my-posh init zsh)" | ||
fi | ||
``` | ||
|
||
Reload the Shell: `exec $SHELL` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | ||
|
||
"version": 2, | ||
"final_space": true, | ||
"console_title_template": "{{ .Shell }} in {{ .Folder }}", | ||
"blocks": [ | ||
{ | ||
"alignment": "left", | ||
"type": "prompt", | ||
"segments": [ | ||
{ | ||
"type": "path", | ||
"background": "darkGray", | ||
"foreground": "lightYellow", | ||
"leading_diamond": "\ue0b6", | ||
"style": "diamond", | ||
"template": "\ue5ff {{ .Folder }}", | ||
"trailing_diamond": "\ue0b4", | ||
"properties": { | ||
"style" : "full" | ||
} | ||
}, | ||
{ | ||
"type": "git", | ||
"background": "darkGray", | ||
"foreground": "blue", | ||
"leading_diamond": " \ue0b6", | ||
"properties": { | ||
"branch_icon": "" | ||
}, | ||
"style": "diamond", | ||
"template": "{{ .HEAD }}", | ||
"trailing_diamond": "\ue0b4" | ||
}, | ||
{ | ||
"type": "python", | ||
"background": "darkGray", | ||
"foreground": "lightGreen", | ||
"leading_diamond": " \ue0b6", | ||
"style": "diamond", | ||
"template": "{{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }}", | ||
"trailing_diamond": "\ue0b4", | ||
"properties": { | ||
"fetch_version": false, | ||
"fetch_virtual_env": true | ||
} | ||
}, | ||
|
||
{ | ||
"type": "kubectl", | ||
"style": "diamond", | ||
"leading_diamond": " \ue0b6", | ||
"trailing_diamond": "\ue0b4", | ||
"foreground": "cyan", | ||
"background": "darkGray", | ||
"template": " {{.Context}}{{if .Namespace}} :: {{.Namespace}}{{end}} ", | ||
"properties": { | ||
"context_aliases": { | ||
"arn:aws:eks:eu-west-1:1234567890:cluster/posh": "posh" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
|
||
} |