duganchen / dotfiles

My dotfiles.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My personal dotfiles.

Start by making sure the appropriate directories exist:

mkdir -p ~/.config/{bat/themes,kitty,lf/kitty-pistol-previewer,fish/{completions,conf.d,functions,themes},mpv/{fonts,scripts},xplr/plugins}

And, on Linux:

mkdir -p ~/.config/environment.d

Install them with GNU stow:

stow -t ~ cfg

If you're using Linux, also do:

stow -t ~ linux

And if you're using OS X:

stow -t ~ osx

And then, on OS X, do some post-install:

bat cache --build

I use Catppuccin, kitty, fish, starship, mpv, NERD symbols (Jetbrains Mono), lsd and lf, eza (which used to be called exa), etc.

FISH

Install fisher, and use it to install the Catppuccin Mocha theme and the tide shell.

Run the init_fish.fish script.

Git and SSH

The options for these aren't really stowable. But here are my notes to copy-and-paste.

For my credential helper, I use libsecret on Linux and keychain on OS X.

The rest of the git config is the standard boilerplate to integrate vscode and delta.

Here's what I have in ~/.gitconfig for both platforms:

[core]
editor = code --wait
pager = delta
[diff]
tool = vscode
colorMoved = default
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[merge]
tool = vscode
conflictstyle = diff3
[mergetool "vscode"]
cmd = code --wait $MERGED
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
light = false

Mac

In ~/.ssh/config:

Host *
    UseKeychain yes
    AddKeysToAgent yes

In ~/.gitconfig:

[credential]
helper = osxkeychain

Linux

# On Fedora, install git-credential-libsecret
[credential]
helper = libsecret

VSCode

Some of the extensions I use that are actually worth noting down are:

The two shell extensions are from Microsoft's recommendations.

"Plugin Manager" Explanation

There are a lot of "plugin managers" that just clone stuff from git. Here's my system, which uses git-subrepo and Stow.

Let's say I want to use zsh-autosuggestions.

I would do the following:

git subrepo clone git@github.com:zsh-users/zsh-autosuggestions.git subrepos/zsh-autosuggestions
mkdir -p cfg/.zsh
cd cfg/.zsh
ln -s ../../subrepos/zsh-autosuggestions

The next time I stow the cfg directory, the symbolic link to the zsh-autosuggestions repo gets installed to ~/.zsh/zsh-autosuggestions, where I want it.

About

My dotfiles.


Languages

Language:Lua 48.8%Language:Shell 48.0%Language:Ruby 1.7%Language:Roff 0.6%Language:TypeScript 0.3%Language:Python 0.3%Language:Perl 0.1%Language:Makefile 0.1%Language:Dockerfile 0.0%