Manage and edit $HOME dotfiles using Python + git = <3
Project description
mydot -- A Python Module for managing dotfiles
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
{.bash} 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. --restore # remove files from staging area d. --status # see the state of your repo d. --ls # list all files under version control d. --help # see other available options
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.
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.
Source Distribution
mydot-0.3.1.tar.gz
(8.3 kB
view hashes)
Built Distribution
mydot-0.3.1-py3-none-any.whl
(11.1 kB
view hashes)