cd $HOME
mkdir -p devtools/{bin,install}
Move and resize windows with keyboard shortcuts.
Default terminal application replacement.
- Go to "Profiles > Keys" and delete all shortcuts.
- Go to "Keys" (global) and delete all shortcuts. Then, import shortcut settings from below.
- Edit "Split ... With Profile (null)", and use "Default" profile.
git clone https://github.com/morhetz/gruvbox-contrib.git
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Get more out of your terminal.
Installation:
- Zsh.
apt install zsh
# or
brew install zsh
- Oh My Zsh.
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- Powerlevel 10k.
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
# edit ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"
p10k configure
Option | Value |
---|---|
Prompt | pure |
Theme | original |
Extras | right |
Time | 24h |
Height | 2 lines |
Spacing | compact |
Transient Prompt | yes |
Instant Prompt | off |
NOTE: Install Meslo-Nerd font when prompted for full unicode character support. But Anonymous Pro is still a better looking font IMHO
I like to enable user@host
even when I'm on my local machine. To do so, find this line and comment it out
# Don't show context unless root or in SSH.
# typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_CONTENT_EXPANSION=
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM}/plugins/zsh-completions
# edit ~/.zshrc
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=7"
plugins=(
git
vi-mode
zsh-autosuggestions
zsh-syntax-highlighting
zsh-completions
colorize
docker
docker-compose
gcloud
rust
cargo
vagrant
# ssh-agent
)
NOTE: using
fg=7
(white) for the highlight color works well for dark and light color themes
WARNING: ssh-agent will override agent-forwarding when enabled on a remote host
Add to the end of ~/.zshrc
################################################################################
function insert_path
{
if [[ $# != 2 ]]; then
return 1
fi
local item=$1
local location=$2
if [[ $PATH =~ $item ]]; then
return 0
fi
case $location in
pre) export PATH=${item}:$PATH ; return 0 ;;
post) export PATH=$PATH:${item} ; return 0 ;;
esac
return 1;
}
insert_path $HOME/devtools/bin pre
alias rng="source ranger" # drops into directory on 'q'
alias lgi="lazygit"
neofetch
################################################################################
Copy *.json
to $HOME/Library/ApplicationSupport/Code/User
Plugin | Extension ID |
---|---|
Align by RegEx | janjoerke.align-by-regex |
Better Align | wwm.better-align |
Better TOML | bungcip.better-toml |
C/C++ | ms-vscode.cpptools |
CMake Tools | ms-vscode.cmake-tools |
CMake | twxs.cmake |
Docker | ms-azuretools.vscode-docker |
Git Graph | mhutchie.git-graph |
Gruvbox Themes | tomphilbin.gruvbox-themes |
Python | ms-python.python |
Remote Development | ms-vscode-remote.vscode-remote-extensionpack |
Rust (rls) | rust-lang.rust |
Vim | vscodevim.vim |
XML Tools | dotjoshjohnson.xml |
TUI git client with better tools to rewrite history
https://github.com/jesseduffield/lazygit/releases
TUI filesystem explorer with miller-column layout and vim keybindings
brew install ranger
ranger --copy-config=all
# edit $HOME/.config/ranger/rc.conf
set preview_images true
set preview_images_method iterm2
replace BSD
readlink
with GNUreadlink
brew install coreutils
ln -s $(which greadlink) $HOME/devtools/bin/readlink
which readlink
Note: may require logout to refresh.
Python wrapper to emulate linux
ip
commands on Mac
brew install iproute2mac
add global settings files to .gitconfig
[includes]
path = ${HOME}/devtools/install/devtools/dotfiles/git/gitconfig-global
- Set
Key Repeat
to Fast - Set
Delay Until Repeat
to Short - Remap
Caps Lock
toEscape
- Configure mission control and keyboard shortcuts (see images below)
- "View > Show View Options" and check "Show Library Folder".
- "Preferences > General" enable "Show these items on the desktop > Hard disks"
- "Preferences > Sidebar" enable "Show these items in the sidebar > Locations > Hard disks"
- "Preferences > Advanced" select "When performing a search > Search the Current Folder"