Skip to content

ZacharyBenamram/dotfiles

 
 

Repository files navigation

Danny Hermes dotfiles

Prerequisites

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.

bash-it Framework

As of February 2019, I'm using bash-it for many shell features I used to "handroll". I use the powerline theme.

Symlinks

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

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"

GNU Screen

In order to track open GNU Screen windows, the dotfiles/screen_sessions.json file is used. Populate it with the "initial" content

{"SENTINEL": null}

System Paths / Defaults

There are some paths on the system that define default behavior.

  • On Ubuntu, /etc/ssh/sshd_config can be modified to force ssh login to only accept a public key. In particular, the line PasswordAuthentication no should be added (or a variant of it should be uncommented). After modifying this, run restart ssh or just reboot.
  • On macOS, /private/etc/ssh/sshd_config can be modified to force ssh login to only accept a public key. In particular, the line PasswordAuthentication no should be added (or a variant of it should be uncommented). Also ChallengeResponseAuthentication 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."

VS Code

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 June 2020) list of extensions is

$ code --list-extensions
artdiniz.quitcontrol-vscode
DotJoshJohnson.xml
eamodio.gitlens
esbenp.prettier-vscode
ExecutableBookProject.myst-highlight
golang.Go
kaiwood.center-editor-window  # CTRL+L recenters editor on current line
mostafa.change-case
ms-python.python
ms-vscode.cpptools

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

Optional

  • Install VS Code (code)
  • It's not uncommon for me to install the Google Cloud SDK.
  • For working with node, install nodenv and node-build (I prefer not to use Homebrew to install these)
  • For working with python, install pyenv and sometimes also pyenv-virtualenv
  • For working with go, install goenv
  • For working with ruby, install rbenv
  • I occasionally like to use LaTeX for typesetting, so sometimes will install it on a new machine. I will also sometimes install pdftk.

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)

Linux

  • 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

About

Dotfiles for Danny Hermes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 52.2%
  • Emacs Lisp 40.7%
  • Python 7.1%