Skip to main content

A dotfiles manager to cure my sucky workflow

Project description

dashdot

Dashdot allows you to easily link and delink your dotfiles so that you don't have to worry about losing your precious configuration files when swiching operating systems or computers.

What are dotfiles?

Dotfiles in unix based operating systems are files that start with a . in their name. They are "considered" hidden according to your operating system due to historic reasons. Most applications store their config files inside these hidden folders to prevent clutter in the user's home directory. Keeping your dotfiles synced between multiple computers can help you get the same setup on multiple computers.

Motivation

I used to use GNU Stow to make backups and store dotfiles and while it does an okay job at symlinking your files, it cannot do things more complicated.

  • It expects a specific directory structure for it to work.
  • Delinking already symlinked files is a pain as you have to go back to every symlink and delete them.
  • You cannot go directly to edit that one file that you always edit in your configurations unless you hack together a flimsy shell script.
  • It does not have good logging and error handling.

Meet dashdot. A program to easily manage your dotfiles imho.

Installation

  • Install pip from your operating system's package manager

  • Run

    $ pip install dashdot

  • I'd recomend having something like this to your shell's config to have a quick shortcut to go to dotfiles editor

    $ bindkey -s '^w' "cd ~/dotfiles; ds edit \$\(ds edit \| fzf\); cd -\n"

    Over here, it binds Ctrl+w to bring an fzf menu to directly go to edit the file.

Usage

  • Create a dotfiles folder
  • Add in folders with your config files

Example config.toml file

editor = "nvim" # Specifies what editor to use for edit flag(Defaults to nano if empty)

[alacritty] # This corresponds to a specific folder in the dotfiles directory
location = "$HOME/.config/alacritty" # If passing a string, this is the location the directory gets symlinked to
main = "alacritty.yml" # This is the file that gets edited when using the edit flag

[zsh]
location = [{src = "zshrc", dest = "$HOME/.zshrc" }, {src = "p10k.zsh", dest = "$HOME/.p10k.zsh"}] # If passing an array of dicts to location, each list item's src file is linked to the destination
main = "zshrc"

[bootstrap]
linux.fedora = ["sudo dnf upgrade"] # This command is run when you use Fedora linux
linux.ubuntu = ["sudo apt update", "sudo apt upgrade"] # Multiple commands can be passed to the list
darwin = ["brew update", "brew upgrade"] # Darwin is for mac
win32 = ["echo Why would you use windows"] # Win32 is for windows

[update] # Pretty much the same as bootstrap except run when update is passed
linux.linuxmint = ["flatpak update"]

Commands

  • ds link - To link your dotfiles to specific locations in the file system
  • ds delink - To safely delete symlinks
  • ds edit - To go to edit the main file in the directory
  • ds bootstrap - To bootstrap the system
  • ds update - To update the system

Example

If you want to see an example configuration repo, you can see my dotfiles

Backing up your files

The program does not assume anything about the way the dotfiles are backedup. This is not a git wrapper to store your dotfiles. Instead it allows you to configure where dotfiles are linked to in a config.toml file. It lets you take care of the backing up part yourself and hence, you are free to store it in a git repo, nas backup or a pendrive.

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

dashdot-0.0.7.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

dashdot-0.0.7-py2.py3-none-any.whl (5.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file dashdot-0.0.7.tar.gz.

File metadata

  • Download URL: dashdot-0.0.7.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for dashdot-0.0.7.tar.gz
Algorithm Hash digest
SHA256 913cf6355d0d4a38b58bd467f0a23b3b664ac7de371949e91cda99fcf617179c
MD5 2cf76f429b736d01177206d9cba20efe
BLAKE2b-256 3506b29a782d1da5f357d9edc648b3a04845b834295200bed20ce0c605817eb9

See more details on using hashes here.

File details

Details for the file dashdot-0.0.7-py2.py3-none-any.whl.

File metadata

  • Download URL: dashdot-0.0.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for dashdot-0.0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ff478fbbb8916755a22d182a15ad9eb41b683a1ebc82e4f40d1c5e38046fa2e1
MD5 01815b276984163a8e4b8cd589f50a01
BLAKE2b-256 0ef9c4817afb946849068657f58b674f656bf9263a467467d8fa9de1474c254d

See more details on using hashes here.

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