My dotfiles for MacOS and Linux.
- @todo add images
- shell
- tmux
- vscode
- vivaldi
- @todo manual settings
- mac settings
- generate ssh key and use gh cli to add (by hostname)
- @todo zsh todos
- tmux autostart
- prompt at bottom
- iterm2 shell integration
- ssh teleportation
- fzf tab repeat
- recursive file completions
- use zdotdir instead of home
- set homebrew prefix
- possible example also in zprezto modules
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
# https://github.com/VSCodeVim/Vim#-installation
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
echo 'Enable key repeat in VSCode for VSCode Vim.'
# https://www.howtogeek.com/267463/how-to-enable-key-repeating-in-macos.
defaults write -g ApplePressAndHoldEnabled -bool false
echo 'Fast key repeat. Requires restart.'
# https://twitter.com/jordwalke/status/1230582824224165888 fast repeat.
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
echo 'Fast opening and closing windows and popovers'
# https://robservatory.com/speed-up-your-mac-via-hidden-prefs/
defaults write NSGlobalDomain NSWindowResizeTime 0.001
echo 'Speed up dialogue boxes'- Package manager: Homebrew
- @todo apps
- Terminal emulator: iTerm2
- Global hotkey window
- Window manager: yabai
- Keyboard shortcuts: skhd
- Status bar: spacebar
- App switcher: AltTab
- Clipboard manager: CopyQ
- Productivity tools
- Multitouch
- Themes:
- base16
- Current: tomorrow-night-eighties-dark
- Fonts:
- Nerd Fonts
- Current: MesloLGS Nerd Font Mono
ZSH
- prezto
- @todo
- Plugins:
- prompt: Powerlevel10k
- @todo
tmux
- Plugins:
- statusline: lightline
- @todo
VIM
- awesome-vimrc
- Plugins:
- manager: vim-plug
- @todo
Code
- nvm
- pyenv
- rvm
Make sure the following command-line tools are installed:
Clone this repository:
mkdir -p "$HOME/.local/share"
git clone --recurse-submodules git@github.com/alexwforsythe/dotfiles "$HOME/.local/share"Run the installation script:
$HOME/.local/share/dotfiles/install.shManual steps (for now):
- SSH
- VSCode
- MacOS
- iTerm2
- Set the config directory to
$HOME/.iterm2 - @todo iTerm2 overwrites entire file breaking symlink
- Set the config directory to
- iTerm2
Install terminal profiles for italics support (optional):
tic -x $XDG_CONFIG_HOME/tmux/xterm-256color-italic.terminfo
tic -x $XDG_CONFIG_HOME/tmux/tmux-256color.terminfoUpdate this repository and all its dependencies:
git pull --recurse-submodulesRerun the installation script:
./install.shThe following dependencies are managed under submodules/ by this repository's
git submodules:
- Merge commits to the submodule's main branch
- Push the main branch to the origin remote
Some of the submodules are forks of popular tools like prezto and vimrc.
Occasionally, changes from the upstream repositories should be merged into the
forked repositories so that the submodules have the latest features and bug
fixes.
To pull upstream changes into a submodule:
# pull the latest changes from the forked repository
git submodule update --init --recursive
cd submodules/$submodule_dir
# pull the latest upstream changes
git pull --rebase $upstream_remote master
# resolve merge conflicts . . .
git push originVarious tools and plugins are loaded by the following files:
- zsh:
submodules/prezto/runcoms/zpreztorc - vim:
vim/.vimrc - npm:
npm/package.json - Homebrew (OS X):
brew/Brewfile
which-key uses a VSCode dropdown menu API to display options and reads user choices via the text input. I'm not sure why they chose that approach, but it seems related to the fact that VSCode doesn't support nested modes. Either way, I like that they were able to almost completely avoid messing with keybindings because it basically sandboxes their plugin.
Maybe that has more value for plugins in complex UI apps--like IDEs and browsers--but it got me thinking about a similar approach with tmux. Here's an example of how you could read an input character from a popup so it closes automatically:
popup -E 'read -p "Enter any char: " -n 1 char; tmux display "You entered: $char"'- Instead of
tmux display, the second command could execute a bash func that looks up the choice's associated tmux command and executes it. - It might be a little slower than tmux keybindings due to spawning a new shell process, but it still felt pretty fast to me.
- It would be easy to add an optional delay for people who don't like to see the
popup right away by adding
sleep "$DELAY"beforeread
Just thought I'd share the idea in case you're interested :)
- Nerd Font
scheme: "Tomorrow Night Eighties"
| code | ansi name | color | description |
|---|---|---|---|
| base00 | black | #2d2d2d | Default Background (, Cursor text) |
| base01 | name | #393939 | Lighter Background (Used for status bars, line number and folding marks) |
| base02 | name | #515151 | Selection Background |
| base03 | bright-black | #999999 | Comments, Invisibles, Line Highlighting |
| base04 | name | #b4b7b4 | Dark Foreground (Used for status bars) |
| base05 | white | #cccccc | Default Foreground, Caret, Delimiters, Operators (, Selected text, Cursor) |
| base06 | name | #e0e0e0 | Light Foreground (Not often used) |
| base07 | bright-white | #ffffff | Light Background (Not often used) |
| base08 | red | #f2777a | Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted |
| base09 | n/a | #f99157 | Integers, Boolean, Constants, XML Attributes, Markup Link Url |
| base0A | yellow | #ffcc66 | Classes, Markup Bold, Search Text Background |
| base0B | green | #99cc99 | Strings, Inherited Class, Markup Code, Diff Inserted |
| base0C | cyan | #66cccc | Support, Regular Expressions, Escape Characters, Markup Quotes |
| base0D | blue | #6699cc | Functions, Methods, Attribute IDs, Headings |
| base0E | magenta | #cc99cc | Keywords, Storage, Selector, Markup Italic, Diff Changed |
| base0F | name | #a3685a | Deprecated, Opening/Closing Embedded Language Tags, e.g. <?php ?> |
Beginners
Dotbot
Alternatives
- General-purpose dotfiles utilities
- Dotfiles: Best Way to Store in a Bare Git Repository (by Atlassian)
Startup files
VIM
Zsh
General
Completions