Skip to main content

Manage and edit $HOME dotfiles using Python + git = <3

Project description

mydot -- A Python Module for managing dotfiles

Quick Start

  1. Configure bash

    # add to the bottom of your `~/.bashrc`:
    export DOTFILES="$HOME/.config/dotfiles"
    alias config="/usr/bin/git --git-dir=$DOTFILES --work-tree=$HOME"
    alias d.="python -m mydot"
    

    First we define a variable which will point to where our dotfiles are stored then make two aliases.

    • config: interact with the repo directly
    • d. invoke the module's command line interface
  2. Initialize dotfiles repository

    mkdir -pv $DOTFILES
    git init --bare $DOTFILES
    

    Create the directory (and any parents) then initialize the bare repo

  3. Confirm and configure dotfiles repo

    # Confirm working dotfiles alias
    config status
    # Disable display of untracked files
    config config --local status.showUntrackedFiles no
    # Confirm change
    config status
    # Add files to track using Git
    config add -v ~/.vimrc ~/.tmux.conf ~/.bashrc ~/.bash_aliases
    
  4. Get powerful with mydot

    python -m pip install --user mydot
    # try out the commands
    d. --help
    d. --edit
    d. --add
    d. --restore
    d. --status
    d. --ls
    

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


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.1.6.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

mydot-0.1.6-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page