All Projects → doron-cohen → Antidot

doron-cohen / Antidot

Licence: mit
Cleans up your $HOME from those pesky dotfiles

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Antidot

Dotfiles
Collection of i3-gaps Dotfiles
Stars: ✭ 143 (+66.28%)
Mutual labels:  dotfiles, rice
dotfiles
🍚 My minimal bspwm configurations for a beautiful workflow
Stars: ✭ 152 (+76.74%)
Mutual labels:  dotfiles, rice
autorice
Autorice 9001 ~ Simple and fast arch setup in minutes
Stars: ✭ 55 (-36.05%)
Mutual labels:  dotfiles, rice
Dotfiles
▒ rice ░░ custom linux config files
Stars: ✭ 1,514 (+1660.47%)
Mutual labels:  dotfiles, rice
Dotfiles
files that define my GNU/Linux box.
Stars: ✭ 351 (+308.14%)
Mutual labels:  dotfiles, rice
The Glorious Dotfiles
A glorified personal dot files
Stars: ✭ 1,850 (+2051.16%)
Mutual labels:  dotfiles, rice
dotfiles
Files that start with a dot (they're very cool).
Stars: ✭ 124 (+44.19%)
Mutual labels:  dotfiles, rice
dotfiles
collection (and a backup) of my config files
Stars: ✭ 49 (-43.02%)
Mutual labels:  dotfiles, rice
Dotfiles
Configuration files I use on my main machine
Stars: ✭ 299 (+247.67%)
Mutual labels:  dotfiles, rice
dotfiles
💻 🍚 🔳 🔲 My riced-up Kali dotfiles – off-white | dark leet | chrome lambo
Stars: ✭ 55 (-36.05%)
Mutual labels:  dotfiles, rice
Dotfiles
My dotfiles and themes.
Stars: ✭ 101 (+17.44%)
Mutual labels:  dotfiles, rice
Dots
another dotfiles repo
Stars: ✭ 39 (-54.65%)
Mutual labels:  dotfiles, rice
Dotfiles
👾 ~/
Stars: ✭ 91 (+5.81%)
Mutual labels:  dotfiles, rice
Dotfiles
🍚 my *nix configs
Stars: ✭ 134 (+55.81%)
Mutual labels:  dotfiles, rice
dotfiles
Gruvbox inspired Arch Linux i3wm rice.
Stars: ✭ 43 (-50%)
Mutual labels:  dotfiles, rice
Awesome Dotfiles
Dotfiles for awesome people using the awesomewm linux environment
Stars: ✭ 409 (+375.58%)
Mutual labels:  dotfiles, rice
Dotfiles
Stars: ✭ 85 (-1.16%)
Mutual labels:  dotfiles, rice
Standard Aliases
Attempt at defining a standard extension to Linux in form of Bash functions
Stars: ✭ 79 (-8.14%)
Mutual labels:  dotfiles
Dotfiles
My configurations and scripts
Stars: ✭ 82 (-4.65%)
Mutual labels:  dotfiles
Prompt So Fancy
Fancy terminal
Stars: ✭ 79 (-8.14%)
Mutual labels:  dotfiles

antidot 🏠 🔸 💥

Pipeline

Cleans up your $HOME from those pesky dotfiles.

Migration from Pre 0.6.0 Versions

Please backup your environment variable and aliases files (in $XDG_DATA_HOME/antidot/{env,alias}.*). After version 0.6.0 antidot stores env exports and alias definitions in a JSON file and generates from it shell definition files.

Intro

For years I stood by and saw how countless applications populate my home dir with dotfiles.

No more! antidot is a tool to automatically detect and remove dotfiles from $HOME without any risks. It will move files to more appropriate locations (based on XDG base directory specifications). It will also set environment variables, declare aliases and use symlinks to ensure apps can find their files.

Installation

Arch Linux

yay -Sy antidot-bin

Homebrew

brew install doron-cohen/tap/antidot

Go to the releases section and grab the one that fits your OS.

After installing run antidot update to download the latest rules file and you're all set!

How does it Work?

Dotfiles pollution is a complex problem to solve. There are many approaches to solve this annoying issue and antidot is taking the safest one.

We maintain a rule for each dotfile which applies actions when the file is detected. The main goal is to move the files to the most appropriate location while keeping the application working as expected.

There are a few types of actions:

  • Migrate - Move a file to a new location, optionally symlink the old location to the new one (this is for the hardest cases).
  • Delete - Delete a file or a directory (only if it's empty).
  • Export - Export an environment variable.
  • Alias - Set an alias to a command.

Examples

This is the rule for the Docker configuration directory:

  - name: docker
    dotfile:
      name: .docker
      is_dir: true
    actions:
      - type: migrate
        source: ${HOME}/.docker
        dest: ${XDG_CONFIG_HOME}/docker
      - type: export
        key: DOCKER_CONFIG
        value: ${XDG_CONFIG_HOME}/docker

When running antidot clean we will be prompted about this directory:

❯ ./antidot clean
Rule docker:
  MOVE   /Users/doroncohen/.docker → /Users/doroncohen/.config/docker
  EXPORT DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"
? Apply rule docker? (y/N)

Answering yes will move the directory and write the environment variable to a file that can be easily sourced by the shell. Running antidot init will create a shell script that will do just that.

Adding eval "$(antidot init)" to your .bashrc or .zshrc will make sure you shell sessions will see these variables and aliases. In Fish the proper way is to run antidot init | source. You could add it to $__fish_config_dir/conf.d/antidot.fish.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].