Manage and edit $HOME dotfiles using Python + git = <3
Project description
mydot -- A Python Module for managing dotfiles
Super-charged version of the Atlassian approach to managing
dotfiles using a bare git repo + fzf
magic!
Quick Start
-
Configure shell: At the bottom of your
~/.bashrc
add:export DOTFILES="$HOME/.config/dotfiles" alias d.="python -m mydot"
what and why?:
DOTFILES
: variable pointing to your local--bare
dotfiles repositoryd.
alias to invokemydot
's command line interface
-
Initialize dotfiles repository: First open a new shell or
source ~/.bashrc
then:mkdir -pv $DOTFILES # create directory git init --bare $DOTFILES # initialize the repository
-
Install
mydot
,fzf
, and disable viewing of untracked filespip install --user mydot sudo apt install fzf -y d. git config --local status.showUntrackedFiles no
-
Add files to your dotfiles repo
d. git add ~/.vimrc ~/.tmux.conf ~/.bashrc ~/.bash_aliases d. git commit -m "the journey of a thousand miles begins with one step"
protip:
d. git
gives you full control and lets you do anything available from thegit
command. -
Feel the power with
mydot
d. --edit # choose a file to open in $EDITOR d. --add # add changed files to staging area d. --run # select an executable file to run d. --grep # grep through tracked dotfiles and pick from matches d. --restore # remove files from staging area d. --discard # discard unstaged changes from work tree d. --tar # make a tarball of your dotfiles d. --clip # put file paths into the clipboard d. --status # see the state of your repo d. --ls # list all files under version control d. --help # see more details about available commands
Going Deeper
Useful aliases
alias es="python -m mydot --edit" # quick select a file to edit
alias rs="python -m mydot --run" # quick select a script to run
Source of Truth
This project is available on GitHub and GitLab. Each push
to master
automatically goes to both so choose whichever platform you prefer.
All releases are published to PyPi
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.