In order to do this you'll need git
installed. It should come by default
on macOS and Linux. If not, get a new version of your OS.
As of February 2019, I'm using bash-it
for many shell features I
used to "handroll". I use the powerline theme.
After cloning this, create symlinks to all configuration files:
ln -s $(pwd)/bash_logout ~/.bash_logout
ln -s $(pwd)/bash_profile ~/.bash_profile
ln -s $(pwd)/bashrc ~/.bashrc
ln -s $(pwd)/emacs.d ~/.emacs.d
ln -s $(pwd)/git-completion.bash ~/.git-completion.bash
ln -s $(pwd)/gitconfig ~/.gitconfig
ln -s $(pwd)/profile ~/.profile
ln -s $(pwd)/screenrc ~/.screenrc
mkdir -p ~/.ssh # Create if it doesn't exist
ln -s $(pwd)/ssh_config ~/.ssh/config
ln -s $(pwd)/Xmodmap ~/.Xmodmap
# See: http://unix.stackexchange.com/q/1677
ln -s $(pwd)/xsessionrc ~/.xsessionrc
# Optional extensions used in `~/.bash_profile`
ln -s $(pwd)/local_profile_extensions ~/.local_profile_extensions
On macOS
[sudo] cp tailscale.sh /usr/local/bin/tailscale
You may also want to enable git is-child
and annoy
via:
ln -s $(pwd)/is-git-child.sh /usr/local/bin/is-git-child
ln -s $(pwd)/annoy.py /usr/local/bin/annoy
(or some directory on your ${PATH}
other than /usr/local/bin
).
To use VS Code settings on macOS:
ln -s \
$(pwd)/vscode/settings.macos.json \
"${HOME}/Library/Application Support/Code/User/settings.json"
ln -s \
$(pwd)/vscode/keybindings.macos.json \
"${HOME}/Library/Application Support/Code/User/keybindings.json"
To use VS Code settings on Ubuntu:
ln -s \
$(pwd)/vscode/settings.ubuntu.json \
"${HOME}/.config/Code/User/settings.json"
ln -s \
$(pwd)/vscode/keybindings.ubuntu.json \
"${HOME}/.config/Code/User/keybindings.json"
To use VS Code settings on Windows for WSL2 (from PowerShell):
Remove-Item $env:APPDATA\Code\User\settings.json
New-Item `
-Path $env:APPDATA\Code\User\settings.json `
-ItemType SymbolicLink `
-Value $HOME\dotfiles\vscode\settings.windows.json
Remove-Item $env:APPDATA\Code\User\keybindings.json
New-Item `
-Path $env:APPDATA\Code\User\keybindings.json `
-ItemType SymbolicLink `
-Value $HOME\dotfiles\vscode\keybindings.windows.json
In order to track open GNU Screen windows, the dotfiles/screen_sessions.json
file is used. Populate it with the "initial" content
{ "SENTINEL": null }
There are some paths on the system that define default behavior.
- On Ubuntu,
/etc/ssh/sshd_config
can be modified to forcessh
login to only accept a public key. In particular, the linePasswordAuthentication no
should be added (or a variant of it should be uncommented). After modifying this, runrestart ssh
or just reboot. - On macOS,
/private/etc/ssh/sshd_config
can be modified to forcessh
login to only accept a public key. In particular, the linePasswordAuthentication no
should be added (or a variant of it should be uncommented). AlsoChallengeResponseAuthentication no
should be set. "If you are using a stock install (i.e., you didn't build/install it yourself from source), launchd should take care of picking up the new config without having to restart the daemon."
In order to use VS Code settings and keybindings, create symlinks into the VS Code install directory. (Before creating the symlinks you'll likely need to delete the existing JSON files.)
Also note that you may need to install Roboto on Ubuntu (see
editor.fontFamily
).
The bash-it
Powerline theme has some font issues in VS Code and requires
installing Menlo for Powerline (I followed a blog post to resolve
the issue).
My current (as of January 2023) list of extensions is
$ code --list-extensions
artdiniz.quitcontrol-vscode
dotjoshjohnson.xml
eamodio.gitlens
esbenp.prettier-vscode
executablebookproject.myst-highlight
github.copilot
github.copilot-chat
golang.go
graphql.vscode-graphql
graphql.vscode-graphql-execution
graphql.vscode-graphql-syntax
hashicorp.terraform
janisdd.vscode-edit-csv
kaiwood.center-editor-window # CTRL+L recenters editor on current line
ktnrg45.vscode-cython
marvhen.reflow-markdown
mostafa.change-case
ms-azuretools.vscode-docker
ms-ossdata.vscode-postgresql
ms-python.black-formatter
ms-python.debugpy
ms-python.isort
ms-python.python
ms-python.vscode-pylance
ms-toolsai.jupyter
ms-toolsai.jupyter-keymap
ms-toolsai.jupyter-renderers
ms-toolsai.vscode-jupyter-cell-tags
ms-toolsai.vscode-jupyter-slideshow
ms-vscode-remote.remote-containers
ms-vscode.cpptools
ms-vscode.makefile-tools
ms-vsliveshare.vsliveshare
stkb.rewrap
tamasfe.even-better-toml
tldraw-org.tldraw-vscode
yoavbls.pretty-ts-errors
These can be installed on a new machine via
code --install-extension ${EXTENSION}
. The actual state of these is kept
in ${CONFIG_DIR}/Code/CachedExtensions/user
(a JSON file) but that file is
too specific to be stored in version control. (For example, it tracks the
current version of VS Code.)
NOTE:
${CONFIG_DIR}
is${HOME}/Library/Application Support
on macOS and${HOME}/.config
on Linux
- Install VS Code (
code
) - It's not uncommon for me to install the Google Cloud SDK.
- For working with
node
, installnodenv
andnode-build
(I prefer not to use Homebrew to install these) - For working with
python
, installpyenv
and sometimes alsopyenv-virtualenv
- For working with
go
, installgoenv
- For working with
ruby
, installrbenv
- I occasionally like to use LaTeX for typesetting, so sometimes will
install it on a new machine. I will also sometimes install
pdftk
. - I use the Rectangle window manager on macOS
- Often the default version of
emacs
is too old, so it may be worth trying to update - It's always important to start by running
xcode-select --install
to make sure Developer Tools are installed - install Homebrew
- Set custom command to lock screen (ref)
- Make function (
FN
) keys be function keys (ref)
-
The
libsecret
library can be used in a similar fashion as the macOS keychain[credential] helper = /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret