No non-sense dotfiles linker

Related tags

Command-line dotlink
Overview

dotlink

A simple program that can help you link all your dotfiles in place.

Supports multiple presets, in order to avoid linking every file in every machine.

Warning UNIX only (for now)

Features!

  • Simple TOML configuration file.
  • Ability to have multiple presets for different machines.
  • Doesn't overwrite links or files.
  • If a link alreay exists, checks if it points to the right file.

A real life use case (simplicity showcase)

I've setup my own dotfiles repo with a dotlink.toml file.

In my case i simply clone the repo and run dotlink inside of it.

$ git clone https://github.com/TheRealLorenz/dotfiles.git
$ cd dotfiles
$ dotlink -p macOS

The program automatically picks up the config file inside the current working directory and links everything!

How does it work?

dotlink relies on a config file, named dotlink.toml.

In the config file you can specify multiple presets, where every presets is a vector for entries.

Presets are top level keys of the config file.

There are two types of entries:

  • Simple entries:
[[preset_name]]
name = 'foo'                  # File name
to = '/path/to/destination'   # Destination path
  • Multiple entries:
[[preset_name]]
names = [ 'foo', 'bar', 'baz' ] # Multiple file names
to = '/path/to/destination/'    # Destination path

The program than simply symlinks every file specified by name or names to the corresponding to.

Presets example

[[linux-wayland]]
names = [
  'sway',
  'sov',
  'zsh',
  'nushell',
  'waybar'
]
to = '~/.config'

[[linux-wayland]]
name = 'rc.zsh'
to = '~/.zshrc'

[[linux-wayland]]
name = 'tmux.conf'
to = '~/.tmux.conf'

[[linux-xorg]]
names = [
  'i3',
  'polybar',
  'zsh',
  'nushell'
]
to = '~/.config'

[[linux-xorg]]
name = 'rc.zsh'
to = '~/.zshrc' 

[[linux-xorg]]
name = 'tmux.conf'
to = '~/.tmux.conf' 

[[server]]
name = 'tmux.conf'
to = '~/.tmux.conf'

[[macOS]]
name = 'zsh'
to = '~/.config'

[[macOS]]
name = 'rc.zsh'
to = '~/.zshrc'

[[macOS]]
name = 'tmux.conf'
to = '~/.tmux.conf'

[[macOS]]
name = 'nushell'
to = '~/Application Support'

The example above defines 4 presets: linux-wayland, linux-xorg, server, macOS.

Usage

Running dotlink -h will show the help message

Usage: dotlink [OPTIONS] [PATH]

Arguments:
  [PATH]  

Options:
  -p, --preset <PRESET>  Which preset to use [default: default]
  -l, --list-presets     
  -F, --file <FILE>      Custom config file location
      --dry-run          
  -h, --help             Print help

PATH represents the path to the dotfiles. Defaults to the current working directory.

Installing

Clone the repository

$ git clone https://github.com/TheRealLorenz/dotlink

Install with Cargo

$ cargo install --path dotlink

Planned features

  • Manage linked files.
  • Force linking.
  • Windows support.
  • Publish to crates.io.
You might also like...
RDFM - The Rusty DotFiles Manager

d8888b. d88888b. 8888888b 8888b d8888 88 `8D 88 `8D 88' 88'YbdP`88 88oobY' 88 88

A tool to simplify reprovisioning a fresh OS. Installs packages and manages dotfiles.
A tool to simplify reprovisioning a fresh OS. Installs packages and manages dotfiles.

[[TOC]] Comtrya This is better, yes? Warning This tool is ridiculously early in its development. I'm building out features as I migrate my dotfiles ov

A tool to simplify reprovisioning a fresh OS. Installs packages and manages dotfiles.
A tool to simplify reprovisioning a fresh OS. Installs packages and manages dotfiles.

Comtrya This is better, yes? Warning This tool is ridiculously early in its development. I'm building out features as I migrate my dotfiles over. Thos

🦀 Syncing dotfiles and more

DT DT allows you to sync/populate configuration files at will. It currently provides a CLI tool dt-cli. Usage The command line interface dt-cli takes

Tool for managing dotfiles directories; Heavily based on rcm.

Paro paro : to prepare, get ready / set, put / furnish, supply. Tool for managing dotfiles directories; Heavily based on rcm. TODO Rust Boilerplate CI

A dotfiles manager, with real time fle watching and 100% less sym-links!

Kubo A dotfile manager that watches files in real time. Usage Create a directory called .kubo in $HOME, then create a file called kubo.toml in .kubo.

Manage your dotfiles and packages with ease. Define your $HOME as Code  💻 🚀 ✨
Manage your dotfiles and packages with ease. Define your $HOME as Code 💻 🚀 ✨

EnvHub is a simple tool to manage dotfiles and packages accross multiple machines. Written in Rust, internally it uses nix/homebrew/pkgx/devbox to man

A higher dimensional raytracing prototype with non-euclidean-like features
A higher dimensional raytracing prototype with non-euclidean-like features

euclider A higher-dimensional "non-euclidean" ray tracing prototype written in Rust. Dual-licensed under MIT or the UNLICENSE. Installation Install th

An OS kernel written in rust. Non POSIX

"Tifflin" Experimental Kernel (and eventually Operating System) This is an experiment in writing an OS Kernel in rust (http://rust-lang.org). Mostly t

Save disk space by cleaning non-essential files from software projects.
Save disk space by cleaning non-essential files from software projects.

Kondo 🧹 Cleans unneeded directories and files from your system. It will identify the disk space savings you would get from deleting temporary/unneces

Cassette A simple, single-future, non-blocking executor intended for building state machines.

Cassette A simple, single-future, non-blocking executor intended for building state machines. Designed to be no-std and embedded friendly. This execut

A non-root version of traceroute written in Rust

tracepath-rs A non-root version of traceroute written in Rust for Linux.

Non-Linear Ray Casting

linon Non-Linear Ray Casting References E. Gröller, “Nonlinear Ray Tracing: Visualizing Strange Worlds,” The Visual Computer, vol. 11, no. 5, pp. 263–

Metaplex is a protocol built on top of Solana that allows: Creating/Minting non-fungible tokens;
Metaplex is a protocol built on top of Solana that allows: Creating/Minting non-fungible tokens;

Metaplex is a protocol built on top of Solana that allows: Creating/Minting non-fungible tokens; Starting a variety of auctions for primary/secondary

In-memory, non stateful and session based code sharing application.

interviewer In-memory, non stateful and session based code sharing application. Test it here: interviewer.taras.lol Note: it's deployed to render auto

Bespoke toolkit for Non-fungible token (NFT) technology 🚀
Bespoke toolkit for Non-fungible token (NFT) technology 🚀

Bespoke toolkit for Non-fungible token (NFT) technology 🚀 What is Onft? Instead of forcing a consensus algorithm or peer networking on you, Onft prov

Non cycle-accurate emulator of the 6502 cpu, written in pure rust

CPU 6502 A non cycle-accurate emulator implementing all legal 6502 opcodes. What does non cycle-accurate mean? Every instruction on the 6502 takes a n

Non-Recursive Inverting of Binary Tree in Rust

Non-Recursive Inverting of Binary Tree in Rust The idea is to implement the classical Inverting of Binary Tree but without using recursion. Quick Star

A pure Rust implementation of the Web Local Storage API, for use in non-browser contexts

Rust Web Local Storage API A Rust implementation of the Web LocalStorage API, for use in non-browser contexts About the Web Local Storage API MDN docs

Owner
null
🦀 Syncing dotfiles and more

DT DT allows you to sync/populate configuration files at will. It currently provides a CLI tool dt-cli. Usage The command line interface dt-cli takes

Gaoyang Zhang 17 Dec 16, 2022
Tool for managing dotfiles directories; Heavily based on rcm.

Paro paro : to prepare, get ready / set, put / furnish, supply. Tool for managing dotfiles directories; Heavily based on rcm. TODO Rust Boilerplate CI

Rafael Delboni 7 Nov 20, 2022
Manage your dotfiles and packages with ease. Define your $HOME as Code 💻 🚀 ✨

EnvHub is a simple tool to manage dotfiles and packages accross multiple machines. Written in Rust, internally it uses nix/homebrew/pkgx/devbox to man

Tsiry Sandratraina 8 Oct 27, 2023
Non-Recursive Inverting of Binary Tree in Rust

Non-Recursive Inverting of Binary Tree in Rust The idea is to implement the classical Inverting of Binary Tree but without using recursion. Quick Star

Tsoding 15 Dec 6, 2022
Non-interactive nREPL client for shell scripts and command-line

nreplops-tool (nr) nreplops-tool (nr) is a non-interactive nREPL client designed to be used in shell scripts and on the command-line. Early α warning:

Matti Hänninen 3 Jul 1, 2022
Cost saving K8s controller to scale down and up of resources during non-business hours

Kube-Saver Motivation Scale down cluster nodes by scaling down Deployments, StatefulSet, CronJob, Hpa during non-business hours and save $$, but if yo

Mahesh Rayas 5 Aug 15, 2022
a simple, non-self-describing data-interchange format.

rust-fr 'rust-fr' (aka rust for real) is a simple, non-self-describing data-interchange format. installation You can use either of these methods. Add

Ayush 4 Feb 28, 2024
When your network-sense tingles 🚨

HTTP Sense HTTP Sense is a reverse proxy and network monitoring tool that provides comprehensive network monitoring for your backend servers and micro

HTTP Sense 6 Dec 22, 2022
A prototype WebAssembly linker using module linking.

WebAssembly Module Linker Please note: this is an experimental project. wasmlink is a prototype WebAssembly module linker that can link together a mod

Peter Huene 19 Oct 28, 2022
Rust crate for embedding, manipulating and retrieving data embedded in binaries using linker sections

linkstore is a library that allows you to define global variables in your final compiled binary that can be modified post-compilation.

William 5 Nov 18, 2022