Package: dashdot
dashdotDashdot 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 tohistoricreasons. 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.MotivationI 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 editthatone 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.InstallationInstallpipfrom your operating system's package managerRun$pip install dashdotI'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 bindsCtrl+wto bring an fzf menu to directly go to edit the file.UsageCreate a dotfiles folderAdd in folders with your config filesExampleconfig.tomlfileeditor="nvim"# Specifies what editor to use for edit flag(Defaults to nano if empty)[alacritty]# This corresponds to a specific folder in the dotfiles directorylocation="$HOME/.config/alacritty"# If passing a string, this is the location the directory gets symlinked tomain="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 destinationmain="zshrc"[bootstrap]linux.fedora=["sudo dnf upgrade"]# This command is run when you use Fedora linuxlinux.ubuntu=["sudo apt update","sudo apt upgrade"]# Multiple commands can be passed to the listdarwin=["brew update","brew upgrade"]# Darwin is for macwin32=["echo Why would you use windows"]# Win32 is for windows[update]# Pretty much the same as bootstrap except run when update is passedlinux.linuxmint=["flatpak update"]Commandsds link- To link your dotfiles to specific locations in the file systemds delink- To safely delete symlinksds edit- To go to edit the main file in the directoryds bootstrap- To bootstrap the systemds update- To update the systemExampleIf you want to see an example configuration repo, you can see mydotfilesBacking up your filesThe 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 aconfig.tomlfile. 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.