Skip to content

SVendittelli/dotfiles

Repository files navigation

Dot Files

pre-commit

My dot files for zsh, vim, tmux, etc.

Managed using chezmoi.

Installation

Linux

Install chezmoi using the correct package manager.

export PATH="$HOME/.local/bin/:$PATH"
chezmoi init SVendittelli
chezmoi apply ~/.local/bin/dcli
dcli sync
chezmoi apply ~/.keys
chezmoi apply

WSL

On Windows Subsystem for Linux ypu may additionally need to run these commands:

rustup default stable

macOS

Install homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install chezmoi and initialise:

brew install chezmoi
chezmoi init SVendittelli
chezmoi apply ~/.local/bin/dcli
dcli sync
chezmoi apply ~/.keys
chezmoi apply

Windows

In an administrator shell:

rundll32 sysdm.cpl,EditEnvironmentVariables

Set the following user environment variable:

KOMOREBI_CONFIG_HOME = "%USERPROFILE%\.config\komorebi"

Back in the administrator shell:

Set-ExecutionPolicy remotesigned
$Env:PATH += ";$Env:USERPROFILE\.local\bin"
Set-PSResourceRepository -Name PSGallery -Trusted
chezmoi init SVendittelli
chezmoi apply ~/.local/bin/dcli.exe
dcli sync
chezmoi apply ~/.keys
chezmoi apply

Set up pre-commit

Run git hooks on commit and push using pre-commit:

chezmoi cd
pre-commit install
exit

Clear the state of all run_onchange_ and run_once_ scripts

chezmoi stores whether and when run_onchange_ and run_once_` scripts have been run in its persistent state.

To clear the state of run_onchange_ scripts, run:

chezmoi state delete-bucket --bucket=entryState

To clear the state of run_once_ scripts, run:

chezmoi state delete-bucket --bucket=scriptState