{"id":22952156,"url":"https://github.com/teekennedy/dotfiles","last_synced_at":"2025-08-13T01:32:34.715Z","repository":{"id":9661834,"uuid":"11601078","full_name":"teekennedy/dotfiles","owner":"teekennedy","description":"The GitHub standard repo","archived":false,"fork":false,"pushed_at":"2024-11-16T18:00:21.000Z","size":359,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-16T19:17:05.255Z","etag":null,"topics":["dotfiles","macos","neovim","tmux","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"OpenBazaar/OpenBazaar-Installer","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teekennedy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-07-23T06:14:48.000Z","updated_at":"2024-11-16T18:00:25.000Z","dependencies_parsed_at":"2023-10-14T21:13:27.182Z","dependency_job_id":"255e0702-625f-424f-892b-8656b6ed91bb","html_url":"https://github.com/teekennedy/dotfiles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teekennedy%2Fdotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teekennedy%2Fdotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teekennedy%2Fdotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teekennedy%2Fdotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teekennedy","download_url":"https://codeload.github.com/teekennedy/dotfiles/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229722195,"owners_count":18114119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotfiles","macos","neovim","tmux","zsh"],"created_at":"2024-12-14T15:32:33.224Z","updated_at":"2025-08-13T01:32:34.697Z","avatar_url":"https://github.com/teekennedy.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terrance Kennedy's Dotfiles\n\nMy personal collection of dotfiles. Originally created for Arch, then\ncompletely refactored for macOS. Features:\n\n- **zsh**\n\n  - Relatively minimal setup with autocompletion and colorized output where\n    available.\n  - Prompt from [Powerlevel10k].\n  - Shell history via [atuin].\n  - Aliases / shortcuts:\n    - `auth \u003cname\u003e`: Passes the current TOTP code of the given `\u003cname\u003e` from\n      your Yubikey to your clipboard.\n    - `cat` aliased to the syntax-highlighting [bat]. Bat is also used as the\n      output pager for the aws-cli.\n    - `diff`: aliased to colordiff, if available.\n    - `man`: aliased to `batman` from [bat-extras].\n    - `t \u003cname\u003e`: Attaches to a tmux session of the given `\u003cname\u003e`, or creates\n      one if it doesn't already exist.\n    - `vim`: aliased to neovim, if available.\n\n- **tmux**\n\n  - uses `Ctrl+a` as prefix (very common)\n  - creates non-login shells by default (faster and doesn't mess up PATH)\n  - extended history for panes (100k lines)\n  - keeps the current working directory when opening/splitting windows\n  - mouse integration (maily used for selecting text for copy-paste)\n  - vim-aware smart pane switching (using `Ctrl+[h|j|k|l]`)\n  - no status bar. Maybe later I'll customize it to my liking, but for now it's\n    just in the way.\n\n- **Alacritty**\n\n  - Uses [JetBrains Mono](https://www.jetbrains.com/lp/mono/) font.\n  - Has great defaults, doesn't need much customization.\n\n- **MacOS Setup** to sync all my mac settings across devices:\n  - Map caps lock key to esc.\n  - Sets host name interactively (skippable).\n  - Speeds up or disables many animations.\n  - Speeds up key repeat rate beyond the range of what's settable via GUI.\n  - Turns off autocorrect, auto quote conversion, and auto emdash conversion.\n  - Enables tap to click, fixes scrolling direction.\n  - Sets sensible defaults for:\n    - Finder\n    - Dock\n    - Safari\n    - Spotlight\n    - Activity Monitor\n    - Disk Utility\n    - QuickTime Player\n    - Photos\n    - Bear (if installed)\n\n## Base Installation (macOS)\n\n1. Install Homebrew if you haven't already:\n\n   ```bash\n   xcode-select --install\n   sudo xcodebuild -license accept\n   ```\n\n1. Install dependencies for dotfiles management:\n\n   ```bash\n   /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)\"\n   brew install git stow\n   ```\n\n1. Clone this repo and initialize submodules:\n\n   ```bash\n   # Clone using SSH url:\n   git clone git@github.com:teekennedy/dotfiles.git\n   # Or https url if you don't have SSH access setup yet:\n   #   git clone https://github.com/teekennedy/dotfiles.git\n   cd dotfiles\n   git submodule update --init --recursive\n   ```\n\n1. If you'd like to set macOS defaults, please READ through\n   `setup_macos_defaults.sh` to make sure you agree with the settings, then\n   run it:\n\n   ```bash\n   ./setup_macos_defaults.sh\n   ```\n\n   It will prompt you for your password (for sudo), and for a new hostname for\n   the computer (leave blank to skip setting hostname). Once the script is done,\n   restart to apply all changes.\n\n1. Run `symlink_dotfiles.sh` to \"install\" dotfiles by symlinking them from the\n   cloned repo to your home directory. Any files that already exist in your\n   home directory are first backed up to _dotfile_.bak. Any files that are\n   already symlinks are left alone.\n\n   ```console\n   ./symlink_dotfiles.sh\n   ```\n\n## Nix\n\nUsing [nix], [nix-darwin], and [home-manager], configuration and tooling can be declaratively configured.\n\n### Installation\n\n1. Install nix using the [determinate systems installer](https://github.com/DeterminateSystems/nix-installer#determinate-nix-installer):\n\n   ```shell\n   curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \\\n   sh -s -- install\n   ```\n\n1. Install [nix-darwin] using the flake in this repo:\n\n   ```shell\n   nix run nix-darwin -- switch --flake .\n   ```\n\nThis will install nix-darwin, home-manager, and the rest of my dotfiles and tooling.\nYou may need to start a new shell for the settings to fully take effect.\n\n### Applying changes\n\nAfter making changes to the nix-darwin configuration, run `darwin-rebuild switch --flake .` to apply.\n\n## Updating Dotfiles\n\nPull latest, sync submodules, symlink new dotfiles and/or submodules, and\nupdate neovim using `update_dotfiles.sh`.\n\n## Submodules\n\n### Adding\n\n`git submodule add \u003cHTTPS repository url\u003e \u003cpath\u003e`\n\n### Updating\n\n`git submodule update --recursive --remote`\n\n### Removing\n\n```bash\ngit submodule deinit -f -- a/submodule\nrm -rf .git/modules/a/submodule\ngit rm -f a/submodule\n```\n\n## Recommended extras\n\nIn addition to the base installation, here's some other recommended utilities\nand applications I use every day:\n\n```bash\n# CLI utilities\nbrew install \\\n    bat        `# Cat clone with syntax highlighting support` \\\n    bat-extras `# Bat integration with other utilities` \\\n    colordiff  `# Colorized diff tool` \\\n    coreutils  `# GNU file, shell, text utilities (I use gls for colorized ls output)` \\\n    git        `# Comes with macOS but brew's is newer` \\\n    git-delta  `# Syntax highlighting pager for git, diff, and grep output` \\\n    jq         `# Json query tool` \\\n    mas        `# Mac App Store CLI` \\\n    tig        `# Git repo browser` \\\n    tmux       `# Terminal multiplexer` \\\n    tree       `# Pretty print directory contents` \\\n    watch      `# Run commands repeatedly`\n\n# JetBrains Mono Nerd Font (Used by my Alacritty config):\nbrew tap homebrew/cask-fonts\nbrew install font-jetbrains-mono-nerd-font\n\n# If you get an error: 'command not found: #' when running the above, either\n# remove the inline comments or run 'setopt interactive_comments' to fix.\n\n# Apps\nbrew install --cask \\\n    fantastical `# Calendar` \\\n    keepassxc   `# Password manager` \\\n    notunes     `# Prevent Play/Pause button from launching Apple Music`\n\nmas install \\\n    904280696  `# Things (todos)` \\\n    1091189122 `# Bear (notes)` \\\n    1439431081 `# Intermission (give your eyes a break)`\n```\n\n## Zsh setup\n\nInstall zsh dependencies [Powerlevel10k] and [atuin] with:\n\n```bash\nbrew install romkatv/powerlevel10k/powerlevel10k atuin\n```\n\nThat's it! You won't see the changes until you either start a new shell or run\n`source ~/.zshrc` in the current one.\n\n## NeoVim setup\n\n[NeoVim](https://neovim.io/) is a modern fork of Vim.\nI have it configured using [AstroNvim](https://github.com/AstroNvim/AstroNvim),\nwhich provides a great default setup. Unlike [LunarVim](https://www.lunarvim.org/),\nAstroNvim does not hide configuration behind an abstraction layer.\n\nSetting up AstroNvim requires NeoVim itself,\nNerd Fonts (installed as a dependency to Alacritty),\nand a terminal with true color support (Alacritty).\n\nTo install, see the latest [installation instructions for AstroNvim](https://astronvim.com/#%EF%B8%8F-installation) on their website.\n\n## VS Code Setup\n\nVS Code's settings.json has a [location that depends on OS]. I develop on macOS and Linux, so to\nsupport both, I have the settings.json in my dotfiles repo symlinked to the default Linux location,\n`~/.config/Code/User/settings.json`. For macOS I have the extra one-time setup of sylinking the\ndefault macOS directory to the default Linux directory:\n\n```bash\nln -sf $HOME/.config/Code/User/settings.json $HOME/Library/Application\\ Support/Code/User/settings.json\n```\n\n## Firefox\n\nFirefox Sync will keep some settings in sync, but many config options have to be set on a\nper-install basis. I use Firefox's\n[AutoConfig](https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig) setup to\ncentralize management of configuration options across my devices.\n\nMy AutoConfig settings disable the built-in Pocket extension (sigh..), work around a memory leak by\ndisabling Accessibility Services (see [this\nbug](https://bugzilla.mozilla.org/show_bug.cgi?id=1726887) for context), and disable all telemetry.\n\n### Setup\n\nInstall Firefox if you haven't already:\n\n```bash\nbrew install --cask firefox\n```\n\nApplying AutoConfig requires adding files to the Firefox installation directory.\nThe `symlink_dotfiles.sh` script automatically handles this.\n\n## YubiKey (U2F) setup\n\nI use a YubiKey for convenient 2FA for just about anything that supports it. It\ncan be managed via the `ykman` CLI:\n\n```bash\nbrew install ykman\n```\n\nIf this is the first time using your YubiKey, I recommend turning off OTP to\nprevent long strings of letters being typed when you accidentally touch it. OTP\nis rarely used and the services that support it have other options anyway.\n\n```console\n$ ykman config usb --disable OTP\nDisable OTP.\nThis will cause the YubiKey to reboot.\nConfigure USB? [y/N]: y\n```\n\n### Using YubiKey for SSH\n\nYubiKeys support ecdsa-sk and ed25519-sk SSH keys. Like other SSH keys, these\nkeys are asymmetric (have public and private components), but in this case the\nprivate key is split into a resident key and a handle to the hardware token,\nthus requiring it to be activated for every SSH operation.\n\n#### Adding SSH keys\n\nTo add a new SSH key, first try to generate a more secure ed25519-sk key:\n\n`ssh-keygen -t ed25519-sk`\n\nIf that doesn't work, it's likely that your YubiKey doesn't support ed25519-sk.\nFall back to ecdsa-sk:\n\n`ssh-keygen -t ecdsa-sk`\n\nNow every time you use the key, you'll be prompted to confirm user presence by\ntapping your YubiKey.\n\n#### U2F keys and ssh-agent\n\nMacOS's default ssh-agent doesn't support ed25519-sk or ecdsa-sk keys. While\nadding U2F keys to your ssh-agent doesn't offer much in terms of convenience\n(you still have to tap your YubiKey on every use), having the agent error out\nevery time you try to use a U2F key is quite annoying.\n\nIf you want to use your U2F SSH keys with the ssh-agent, you'll need to use a\nnewer version of ssh-agent from homebrew. MacOS versions with System Integrity\nProtection do not make this easy, as the default ssh-agent is a system-level\nservice that cannot be disabled or overwritten since it lives under the\nprotected `/System` directory.\n\nTo use homebrew's ssh-agent, one has to resort to the somewhat hacky solution\nof starting homebrew's ssh-agent with a new unix socket path, and then forcibly\nsymlink the system-provided unix socket to the path used by homebrew. Roughly\nequivalent to running the following at login:\n\n```bash\n# Create a temporary path for homebrew's socket\nHOMEBREW_SSH_AUTH_SOCK=$(mktemp -dt ssh-agent)/auth-sock\n\n# Overwrite the system-generated socket with a symlink to homebrew's\nsudo ln -sf $HOMEBREW_SSH_AUTH_SOCK $SSH_AUTH_SOCK\n\n# Start homebrew's ssh-agent using the new path\neval \"$(ssh-agent -a $HOMEBREW_SSH_AUTH_SOCK)\"\n```\n\nTo ensure this works across all applications that use ssh-agent, it's best to\nrun these steps before login, via your own launch agent. I've made a script to\nsetup such an agent [./setup_homebrew_ssh_agent.sh].\n\nSee [Kirill Kuznetsov's post] for a detailed background on the motivation\nbehind setting up such a launch agent.\n\n### Adding a TOTP 2FA Account\n\n- Setup 2FA on website\n- When given QR code to scan with app, find and copy the alternate text\n  representation of the QR code.\n- Add the key to your Yubikey as an oath code and give it a name:\n  `ykman oath accounts add -t \u003cname\u003e \u003ckey\u003e`\n\n## License:\n\nMIT\n\n[bat]: https://github.com/sharkdp/bat\n[bat-extras]: https://github.com/eth-p/bat-extras\n[atuin]: https://github.com/ellie/atuin\n[Kirill Kuznetsov's post]: https://evilmartians.com/chronicles/stick-with-security-yubikey-ssh-gnupg-macos#making-things-stick\n[Powerlevel10k]: https://github.com/romkatv/powerlevel10k\n[location that depends on OS]: https://code.visualstudio.com/docs/getstarted/settings#_settings-file-locations\n[nix-darwin]: https://github.com/LnL7/nix-darwin\n[nix]: https://nixos.org/\n[home-manager]: https://github.com/nix-community/home-manager\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteekennedy%2Fdotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteekennedy%2Fdotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteekennedy%2Fdotfiles/lists"}