Skip to content

akarzim/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

Dotfiles

My personal dotfiles.
Explore the docs »

Report Bug · Request Feature

Table of Contents

About The Project

This repo hosts my personal dotfiles.

Dotfiles Screen Shot

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • macOS
brew install bat exa fd fzf git git-delta htop ncdu neovim ripgrep sqlparse \
             tig tldr tmux tree universal-ctags watch z zplug

Plus for age file encryption tool support:

brew tap filippo.io/age https://filippo.io/age
brew install age

Installation

  1. Clone the repo
git clone https://github.com/akarzim/dotfiles.git
  1. Install dotfiles
cd dotfiles && ./init.zsh

Usage

Usage: ./init.zsh [-d | --diff] [-f | --force] [-h | --help] [-V | --version] [program ...]

Environment:
  DIFF      hide/show changes between files if they are different (default: 0 ; values: 0, 1)
  FORCE     overwrite or not existing files if they are different (default: 0 ; values: 0, 1)
  GPGTOOL   executable for the GPG file encryption tool (default: gpg)
  AGETOOL   executable for the age file encryption tool (default: age)
  AGEKEY    path to your age private key

Options:
  --age-key=AGE_KEY           path to your age private key
  --age-tool=AGE_TOOL         set the age file encryption tool executable
  --gpg-tool=GPG_TOOL         set the gpg file encryption tool executable
  -d, --diff, --no-diff       show/hide changes between files if they are different
  -f, --force, --no-force     overwrite or not existing files if they are different
  -h, --help                  print this help
  -V, --version               print the version number"

Add support for other dotfiles by creating new .zsh files under the modules/ directory. You have some functions at your disposal:

  • link SOURCE [DOTFILE] to create a symlink from SOURCE to DOTFILE
  • copy SOURCE [DOTFILE] to copy the SOURCE file to the DOTFILE destination
  • decipher SOURCE [DOTFILE] to copy an encrypted SOURCE file to the DOTFILE destination
  • rlink DIRECTORY SOURCE [DOTFILE] recursively link SOURCE to DOTFILE in DIRECTORY subdirectories
  • rcopy DIRECTORY SOURCE [DOTFILE] recursively copy SOURCE to DOTFILE in DIRECTORY subdirectories
  • rdecipher DIRECTORY SOURCE [DOTFILE]recursively decipher SOURCE to DOTFILE in DIRECTORY subdirectories
  • module MODULE to check if MODULE is required
  • program PROGRAM to check if PROGRAM is executable

NOTE: The last argument is optional. If it is missing, it will be forged from the file name SOURCE prefixed with a period.

Cache

A caching policy is also available to avoid useless computations:

  • caching_policy DIRECTORY returns true if the cache is obslolete.

A la carte

By providing your program selection, you can update a subset of the available configuration. For example, to choose only zsh and git, just call ./init.zsh zsh git and that's it.

Miscellanea

  1. init.zsh and functions.zsh contain ZSH syntax which is not Bash compatible:
    • Glob qualifiers1
    • Character Highlighting2
  2. functions.zsh contains BSD-based specific regex syntax3

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

François Vantomme - @akarzim

Project Link: https://github.com/akarzim/dotfiles

Acknowledgements

Footnotes

  1. http:https://zsh.sourceforge.net/Doc/Release/Expansion.html#Glob-Qualifiers

  2. http:https://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting

  3. https://stackoverflow.com/a/12696899/1340861