Skip to content

Contains dotfiles I share between Linux & Windows environments and which are managed using yadm

Notifications You must be signed in to change notification settings

swinkels/yadm-dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo contains the dotfiles I share between different Linux & Windows environments.

Installation

I use yadm, “yet another dotfiles manager”, to manage my dotfiles so first you need to install yadm. The yadm documentation describes several ways to install it but if you’re in a rush, clone the repo:

git clone https://github.com/TheLocehiliosan/yadm.git

You can find the yadm script in the root of the workspace.

To install the dotfiles in this repo, execute

yadm/yadm clone https://github.com/swinkels/yadm-dotfiles.git

Note the following comment from the yadm documentation:

If a file already exists locally and has content that differs from the one in the repository, the local file will be left unmodified and you’ll have to review and resolve the differences.

How does yadm work?

In effect, yadm uses a bare Git repo in $HOME/.local/share/yadm/repo.git with your home directory as a work tree[fn:1]. This repo doesn’t show untracked files, so a yadm status only checks files that are managed by Git.

yadm uses a different approach to support the alternate files, which are variants of the same file. It depends on your “environment” which variant yadm will install, for example on the OS used or on the name of the machine name. You create every variant in a special directory, namely $HOME/.config/yadm/alt. Then, when you execute yadm clone or yadm pull, yadm creates a link to the correct variant in the root of your home directory.

Alternate files and Windows

The Windows filesystem NTFS does support links but that functionality isn’t enabled by default. According to this article, you have to

  1. run Windows in Developer Mode,
  2. edit the local security policy to grant permissions to create symlinks, and
  3. (possibly) configure the software you use, e.g. MSYS2 and cygwin.

You might not be possible to execute steps 1) and 2), for example on a company laptop where you don’t have sufficient rights to make these kindes of changes.

On Windows, I always use yadm in a Bash shell that is provided by MSYS2. If I cannot enable the functionality to create links, MSYS2 creates a well-named copy of the file instead. This means that if I want to modify an alternate file, I have to edit the original file in $HOME/.config/yadm/alt and reinstall all alternate files.

Footnotes

[fn:1] Starting with version 3, yadm uses $HOME/.local/share/yadm/repo.git to store the bare repo. Version 2 used $HOME/.config/yadm and version 1 used $HOME/.yadm.

About

Contains dotfiles I share between Linux & Windows environments and which are managed using yadm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published