Skip to main content

A tool for managing dotfiles.

Project description

Dotfile Manager Python package

A dotfile manager to easily reuse configurations between linux and macOS.

Installation

pip install dotfile-manager

Usage

  • Make sure your dotfiles are organized as described below.

  • cd into your dotfiles repo.

  • Installing the dotfiles: This will install all the necessary dependencies for your dotfiles.

    dotfile_manager install
    
  • Setting up the dotfiles: This will set up symbolic links for the config files, symlink binaries and create a script to source everything.

    dotfile_manager setup
    

Organize your dotfiles for use with the dotfile manager

A minimal example of how to organize your dotfiles can be seen here, a real-life example here.

The dotfiles are organised by project, where each project has its own top-level folder. A project has to contain a file dotfile_manager.yaml which configures the dotfile manager. It is setup as follows:

install_macos:
  - install_macos.sh

install_ubuntu:
  - install_ubuntu.sh

symlinks:
  zshrc.zsh: ~/.zshrc

bin:
  - do_something.sh

source:
  - aliases.sh
  - helpers.sh

disable: False

The entries of install_macos configure what scripts are used to install this project on macos. install_ubuntu does the same for ubuntu. Multiple scripts can be provided and they are executed in the order as specified in the yaml file.

The entries of symlinks configure where the files will be symlinked to, the key is the path of the file inside the topic folder, the value is the global path where the file will be symlinked to. Use this to setup configuration files that need to be at a specific location (for example .bashrc which has to be in ~/). It is possible to use ~ to specify the path of files that need to go to a user's ``$HOME` folder.

The entries of bin will be symlinked to ${DOTFILES}/generated/bin/. Add the latter to your $PATH to easily execute these binaries from everywhere.

The entries of source will be added to a script in ${DOTFILES}/generated/sources.zsh, such that you only have to source this file instead of sourcing all files individually.

Lastly disable can be used to disable a dotfile project. If this is set to true this project will be skipped during installation and setup.

All these entries are optional. If you don't need them you can simply omit them.

Advanced

To work correctly the dotfile manager needs to know where the repo with all your dotfiles is stored. Thus you need to run the dotfile_manager [install|setup] command from the directory where your dotfiles are stored. If you want to be able to run the dotfile manager from anywhere there are two options:

  • Use a command line argument:
    dotfile_manager -d <path/to/dotfiles/> install
    
  • Use an environment variable:
    export DOTFILES=<path/to/dotfiles>
    dotfile_manager install
    

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

dotfile_manager-0.3.5.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dotfile_manager-0.3.5-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file dotfile_manager-0.3.5.tar.gz.

File metadata

  • Download URL: dotfile_manager-0.3.5.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for dotfile_manager-0.3.5.tar.gz
Algorithm Hash digest
SHA256 04c0a428ccdbfa74a599a402992f93fd5821b0da27d4ef6b8bb6b89a5eb12306
MD5 43257b621d9c4c314622093748f1acee
BLAKE2b-256 73368979b960f992266555b7a32e927fc96396054cd05328f8dc3d1a0cbfa51f

See more details on using hashes here.

File details

Details for the file dotfile_manager-0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for dotfile_manager-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ca5f0612bd53c81c8e0ef52cf0393b7d7e7d76589070cc7ff11ae110c301131c
MD5 1b2f16a1f19f776f884da7c868a67850
BLAKE2b-256 80d4237f1526d879930fd926d8eab88b14367ef619328eb09149f3111bf1110e

See more details on using hashes here.

Supported by

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