atem-dots

Crates.ioatem-dots
lib.rsatem-dots
version
sourcesrc
created_at2025-02-11 21:13:37.013348+00
updated_at2025-02-19 23:49:55.117237+00
descriptionA (dot)file manager
homepage
repositoryhttps://github.com/jullanggit/dots
max_upload_size
id1552006
Cargo.toml error:TOML parse error at line 20, column 1 | 20 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
jullang (jullanggit)

documentation

README

What

A (dot)file manager using symlinks (intended for use in atem, but can also be used standalone).

Can be understood as a more powerful GNU Stow, which allows you to precisely control where in the file tree the symlink should be placed.

How

Dots operates on a file tree containing the paths you want to symlink. The location of this file tree has to be set using the files_path key in the config file (recommendation: {home}/.config/atem/files)

The files_path directory is split in multiple sub-directories, to allow for different files on different machines.

"{hostname}" can be used as a placeholder for the actual hostname (For example: {hostname}/etc/pacman.conf).

As most other symlinks are against the same subdir, you can set a default_subdir in the config file. Then, you can just omit the default subdir. (For example: /etc/pacman.conf)

"{home}" can be used as a placeholder for the home directory of the current user (For example: /{home}/.config/dots).

Ideas, contributing, bugs etc

  • Dots is still very much under active development, so if you have any ideas / feature requests or encounter any bugs, please open an issue or a PR

Commands

All paths are in the format described above.

  • add: Add the given path to the system
  • remove: Remove the given path from the system (does not remove the files the path points to, only the symlink)
  • import: Import the given path from the system
  • list: Outputs a list of all symlinks on the system that are probably made by dots

All commands (except remove, which doesn't care) can also take --copy as an argument for copying, instead of symlinking the file. This is meant for things that for some reason or another do not like being a symlink.

Note that paths added using --copy will not be detected by list, instead a list of items that should be on the system should be passed, which are then validated. Only paths that actually are on the system are printed back out.

Import

  • Copies the given path from the system into the config, and replaces the system path with a symlink the the config path

List

  • Paths to search for symlinks can be configured in the config file under the list_paths key

Options

  • silent: suppress any non-primary output

Config file

Location

{home}/.config/dots

Format

  • default_subdir & files_path:
    • key = value
  • list_paths & ignore_paths
    • key = value(,value,value)
  • root
    • True if specified, false otherwise

files_path

  • the path to the files/ directory

default_subdir

  • the default subdir that will get filled in when subdir is elided

list_paths

  • the paths that list searches through

ignore_paths

  • the paths that list ignores

root

  • whether list should run as root

Installing

cargo +nightly install atem-dots

Usage

  • This software is provided as-is: I make no guarantees that using dots wont fuck up your system, the only testing it currently receives is usage by me.
  • Please do report any errors/bugs if you encounter them
Commit count: 123

cargo fmt