Skip to content

hamlittle/devtools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

devtools

Terminal Screenshot

cd $HOME
mkdir -p devtools/{bin,install}

Applications

Rectangle

Move and resize windows with keyboard shortcuts.

Rectangle Keyboard Shortucts

iTerm2

Default terminal application replacement.

Configuration

  1. Go to "Profiles > Keys" and delete all shortcuts.
  2. Go to "Keys" (global) and delete all shortcuts. Then, import shortcut settings from below.
  3. Edit "Split ... With Profile (null)", and use "Default" profile.

iTerm2 Keyboard Shortcuts

Themes

git clone https://github.com/morhetz/gruvbox-contrib.git

Homebrew

https://brew.sh/

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

ZSH + Oh My Zsh + Powerlevel 10k

Get more out of your terminal.

Installation:

  1. Zsh.
apt install zsh
# or
brew install zsh
  1. Oh My Zsh.
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  1. Powerlevel 10k.
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
# edit ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"

Prompt

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

Context

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=

Plugins

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

Addendum

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

################################################################################

VSCode

Configuration

Copy *.json to $HOME/Library/ApplicationSupport/Code/User

  • Settings
  • Keybinding
  • Snippets

Plugins

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

Packages

Lazygit

TUI git client with better tools to rewrite history

https://github.com/jesseduffield/lazygit/releases

ranger

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

GNU readlink

replace BSD readlink with GNU readlink

brew install coreutils
ln -s $(which greadlink) $HOME/devtools/bin/readlink
which readlink

Note: may require logout to refresh.

ip

Python wrapper to emulate linux ip commands on Mac

brew install iproute2mac

git

add global settings files to .gitconfig

[includes]
	path = ${HOME}/devtools/install/devtools/dotfiles/git/gitconfig-global

System Settings

Keyboard

  1. Set Key Repeat to Fast
  2. Set Delay Until Repeat to Short
  3. Remap Caps Lock to Escape
  4. Configure mission control and keyboard shortcuts (see images below)

Keyboard Repeat Settings Keyboard Remap Settings Mission Control Shortcuts Application Shortcuts

Finder

  1. "View > Show View Options" and check "Show Library Folder".
  2. "Preferences > General" enable "Show these items on the desktop > Hard disks"
  3. "Preferences > Sidebar" enable "Show these items in the sidebar > Locations > Hard disks"
  4. "Preferences > Advanced" select "When performing a search > Search the Current Folder"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •