Skip to content

Latest commit

 

History

History
102 lines (96 loc) · 1.96 KB

readme.md

File metadata and controls

102 lines (96 loc) · 1.96 KB

Tidy

Create symlinks for your dotfiles

Tidy Dotfile Linker v1.2.0

Usage:
  tidy [flags]

Examples:
tidy [-s | -u] [directory | *]

Flags:
  -f, --force   overwrite existing files
  -h, --help    help for tidy
  -s, --set     use to create symlinks, mutually exclusive with unset
  -u, --unset   use to remove symlinks, mutually exclusive with set

Installation

Build from source

Dependencies

Install

git clone https://github.com/shrimp332/tidy
cd tidy
sudo make install # installs to /usr/local/bin
# or `make install-local` # installs to ~/.local/bin

Using Go

go install github.com/shrimp332/tidy/cmd/tidy@latest

Archlinux

Makepkg

Manual way of making package. Will require manual updates (it's not in the aur)

git clone https://github.com/shrimp332/tidy
cd tidy
makepkg -si

Add this as a paru repo. (instructions)

paru tidy-git

Config File

{
  "home": [], // ~/
  "config": [], // ~/.config
  "bin": [], // ~/.local/bin
  "custom": {
    "directory": [] // custom location
  }
}

Usage

File Structure

dotfiles/
├── scripts/
│  ├── .tidy.json
│  └── increasevol.sh
├── zsh/
│  ├── .tidy.json
│  ├── .zshrc
│  ├── .zshenv
│  └── zsh/
└── other/
   ├── .tidy.json
   ├── passwords.kdbx
   └── obsidian/

Config File

// dotfiles/zsh/.tidy.json
{
  "home": [".zshrc", ".zshenv"],
  "config": ["zsh"]
}

// dotfiles/scripts/.tidy.json
{
  "bin": ["increasevol.sh"]
}

// dotfiles/other/.tidy.json
{
  "custom": {
    "~/Notes": ["obsidian"],
    "~/Documents": ["passwords.kbdx"]
  }
}

Commands

cd dotfiles
tidy -s * # To create zsh, scripts, and other symlinks
tidy -u scripts # To delete scripts symlink