- Which of these are mine, versus work laptop?
- iTerm => MacOS Terminal settings
- (think there's a fair bit on MacOS settings)
- Detect Stndard MacOS terminal - and bail - in the bashrc files
- Add to Brew...
brew install --cask font-jetbrains-mono-nerd-font
- Add to Brew...
brew install --cask iterm2
- Add iTerms settings default locations
bash -c "`curl -fsSL https://raw.githubusercontent.com/pmgledhill102/dotfiles/main/install.sh`"
bash -c "`curl -fsSL https://raw.githubusercontent.com/pmgledhill102/dotfiles/dev/install.sh`"
Welcome to my dotfiles repository! This repository contains personal configuration files (often referred to as dotfiles because they typically start with a dot, like .zshrc or .vimrc) that I use to personalize and customize my development environment. These dotfiles are managed using GNU Stow which is downloaded as part of the install.sh script.
I'm looking to support:
- Ubuntu
- MacOS
Idea stolen from the absolutely wonderful Shivam Khattar (@iamkhattar). Many thanks for your endless energy!
- Quick installer scripts:
- Apple Mac - developer
- Windows - developer
- Ubuntu - lightweight install (small time, small size)
- Ubuntu - full install (dev box/WSL)
- Terminal Prompts
- Windows Terminal:
- Powershell
- WSL Bash
- VS Code Terminal with Powershell
- Bash on Ubuntu
- Aliases within Prompts
- Nerd Fonts
- Windows Terminal:
- WSL
- Disable IP6
- Disable using Windows Paths (the
gcloud
problem) - Change default folder to ~
- Windows Terminal Settings
- Nano Language Support
- Ubuntu core utils
Note: Ubuntu Minimal not supported (lacks git, nano, apt-utils, ...)
I decided to embrace Oh My Posh to provide terminal customisations. Although
not as configurable as PowerLevel10k, it is not limited to
zsh
, it can work across bash
, cmd
, powershell
and zsh
running on Windows
, Linux
or
MacOS
.
winget install JanDeDobbeleer.OhMyPosh -s winget
All modern prompts are designed to work best with a "Nerd Font" (fonts patched to include icons). I've gone for the Jet Brains Mono Nerd Font, as it was designed specifically for code so looks great and is easy to install on Windows.
winget install --id="DEVCOM.JetBrainsMonoNerdFont" --exact
C:\Users\messe\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
"defaultProfile": "{7c665dc7-9f17-41f5-b5b1-20d9a46fd961}",
{
"colorScheme": "Campbell",
"commandline": "\"C:\\Program Files\\PowerShell\\7\\pwsh.exe\"",
"font":
{
"face": "JetBrainsMonoNL NFP"
},
"guid": "{7c665dc7-9f17-41f5-b5b1-20d9a46fd961}",
"hidden": false,
"icon": "ms-appx:///ProfileIcons/pwsh.png",
"name": "Dev",
"startingDirectory": "c:\\dev"
}
$PROFILE = "C:\Users\messe\OneDrive\Documents\PowerShell\Microsoft.PowerShell_profile.ps1"
oh-my-posh init pwsh --config 'https://raw.githubusercontent.com/pmgledhill102/dotfiles/main/ohmyposh/theme.json' | Invoke-Expression
"terminal.integrated.fontFamily": "JetBrainsMono Nerd Font",
On MacOS location of settings is $HOME/Library/Application Support/Code/User/settings.json
brew install tidwall/jj/jj
jj -v "JetBrainsMono Nerd Font" -p -i "$HOME/Library/Application Support/Code/User/settings.json" -o "$HOME/Library/Application Support/Code/User/settings.json" "terminal\.integrated\.fontFamily"
# OR...
tmp=$(mktemp)
jq '.["terminal.integrated.fontFamily"] = "JetBrainsMono Nerd Font"' "$HOME/Library/Application Support/Code/User/settings.json" > "$tmp"
mv "$tmp" "$HOME/Library/Application Support/Code/User/settings.json"
# Install to $HOME/bin folder
curl -s https://ohmyposh.dev/install.sh | bash -s -- -d $HOME/bin
Add this to ~/.bashrc ...
# Oh My Posh
export PATH="$PATH:$HOME/bin"
eval "$(oh-my-posh init bash --config 'https://raw.githubusercontent.com/pmgledhill102/dotfiles/main/ohmyposh/theme.json')"
brew install jandedobbeleer/oh-my-posh/oh-my-posh
brew install --cask font-jetbrains-mono-nerd-font
Add to the .zshrc
file:
eval "$(oh-my-posh init zsh)"
And install iTerm2:
brew install --cask iterm2
# Configure iterm2 to use the file from this repo for it's settings, this includes
# the changes to default font
defaults write com.googlecode.iterm2 PrefsCustomFolder -string "~/.config/iterm"
defaults write com.googlecode.iterm2 LoadPrefsFromCustomFolder -bool true
When installed to Ubuntu servers, I want the footprint to be kept to a minimum, as I'll be
charged for the storage. This is a major reason to avoid homebrew
. To enforce this over time
I've included a 100MB check into the GitHub workflow.
Great article on running x86 containers on aarch64:
Here's my Mac brew list before I started to automate installs
> brew list
> brew tap
Formulae
- autoconf
- brotli
- c-ares
- ca-certificates
- cairo
- fontconfig
- freetype
- gcc
- gettext
- gh
- giflib
- git
- glib
- gmp
- go
- gradle
- graphite2
- grep
- harfbuzz
- icu4c
- isl
- jj
- jpeg-turbo
- kind
- kn
- kubernetes-cli
- libmpc
- libnghttp2
- libpng
- libtiff
- libuv
- libx11
- libxau
- libxcb
- libxdmcp
- libxext
- libxrender
- little-cms2
- lz4
- lzo
- m4
- maven
- mpdecimal
- mpfr
- node
- nvm
- oh-my-posh
- openjdk
- openjdk@17
- openssl@3
- pack
- pandoc
- pcre2
- pixman
- pkg-config
- pyenv
- quarkus
- readline
- rustup-init
- sqlite
- tfenv
- xorgproto
- xz
- zstd
Casks
- discord
- font-jetbrains-mono-nerd-font
- google-cloud-sdk
- insomnia
- inspec
- intellij-idea-ce
- iterm2
- utm
- visual-studio-code
Taps
- buildpacks/tap
- chef/chef
- jandedobbeleer/oh-my-posh
- knative/client
- quarkusio/tap
- tidwall/jj
I experimented with OMP support within Cloud Shell, but decided not to include this as a supported configuration due to:
- Lack of Nerd Fonts in the interface
- Ephemeral Machine, so have to reinstall every time, or make everything local
- Difficulty with local install... manual build of stow, zsh, ...
It might be beneficial still to install some custom commands, and dotfile settings, but not a priority.
Here are a few links to apps used, or articles related to dotfiles: