Skip to content

matheuristic/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

Contents

Other configuration and notes

Deploying user config files and tool scripts using GNU Stow

Install GNU Stow (on a Debian-derived distribution use sudo apt install stow ; on macOS use sudo port install stow if MacPorts is installed).

Make sure that the installed version of GNU Stow is at least 2.4.0 (earlier versions have buggy --dotfiles option behavior). If necessary, compile from source. On macOS, this means installing XCode CLI tools, setting the environment variable PERL5LIB=/Library/Developer/CommandLineTools/usr/share/git-core/perl and making sure to set the right prefix in the configuration stage, e.g., ./configure --prefix=$HOME/.local if $HOME/.local/bin/ is a $PATH directory.

Git clone the repository, and symlink each package's config files to the user home directory using stow. Each repository subdirectory in stow/ (e.g.stow/package) corresponds to a package of the same name, and stow with the --no-folding and --dotfiles options will create the directory structure within the package at the target destination if it does not exist and symbolically link each file in the package to the corresponding location in the target destination, creating any required directories as needed and changing dot-XYZ names to .XYZ. Note that stow does not support slashes in the package names, so it should be run from within the stow/ directory. Two examples (tmux and fish) are shown as follows.

$ git clone https://github.com/matheuristic/dotfiles.git
$ cd dotfiles/stow
$ stow -t $HOME --dotfiles --no-folding tmux
$ stow -t $HOME --dotfiles --no-folding fish
...

References:

Shell types

There are different shell types, discussed using Bash since that is the default shell for most distributions. A shell can be of multiple types, for instance a login interactive shell.

  • Login shell. A login Bash shell reads ~/.bash_profile (or ~/.profile if ~/bash_profile does not exist) on start and ~/.bash_logout on exit.
  • Non-interactive shell. A non-interactive Bash shell reads the file specified by $BASH_ENV on start.
  • Interactive shell. A interactive Bash shell reads ~/.bashrc on start.

Note that while Bash is the default shell on most Linux systems, Zsh is the default shell on macOS systems.

About

Dot files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published