Skip to main content

GNU Stow wrapper

Project description

Cstow

Demo

About

There's lots of dotfiles managers, but my favorite is GNU Stow.

It has only two problems: boring UI and no config. Cstow solves them.

Name

Constantine's GNU Stow wrapper.

Some GNU Stow Terminology

A target directory is the root of a tree in which one or more packages wish to appear to be installed.

A stow directory is the root of a tree containing separate packages in private subtrees.

Installation

Use pipx

pipx install cstow

Or pip

pip install cstow

Configuration

Set CSTOW_CONFIG_PATH to path/to/your/cstow_config.toml. Use any file name you want.

Examples

Config Contents

Cstow expands ~ and $AN_ENVIRONMENT_VARIABLE.

Name Type Description Default
root_dir String The root of stow directories /
cmd_template String The template for GNU Stow commands See below
targets_dirs Table Targets (keys) and dirs (values)
targets_dirs (key) String A target directory
targets_dirs (value) Array of strings Stow directories for the target

root_dir

You might set it to ~/dotfiles or $DOTFILES.

If you don't set root_dir, use absolute paths in targets_dirs.

cmd_template

You can set it to any shell command, but every variable must be used at least once.

Cstow escapes variables so don't even try shell-injecting yourself!

Variables

Variable Description
action A GNU Stow action (no, stow, restow, delete)
target A target directory
dir A stow directory

Default

stow --$action --no-folding --verbose --target=$target --dir=$dir . \
     2>&1 | grep --invert-match --regexp="^BUG" --regexp="^WARN"

Usage

# Get some help
cstow -h
cstow --help

# Run an action
cstow               # Default action is 'no'
cstow no            # Action is a positional argument
cstow -a no         # But flags also work
cstow --action no

# Print plain text
cstow stow -p
cstow restow --plain
cstow -p -a delete

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cstow-1.0.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

cstow-1.0.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file cstow-1.0.0.tar.gz.

File metadata

  • Download URL: cstow-1.0.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1041-azure

File hashes

Hashes for cstow-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a3d1ba4aed3c5fe884181815437a28a2371163013fe4d364b012a1622075dbee
MD5 d6b5821edd939c4f36f566d99c85b4ea
BLAKE2b-256 af3f65ab0360027163ea048e1af706c6c22c6fee72ca8191b510b6c2f46fd068

See more details on using hashes here.

File details

Details for the file cstow-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: cstow-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1041-azure

File hashes

Hashes for cstow-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc2c92ea3252ee2fae57c46323f2def1985958b8c027aa380e3c349b132a75c5
MD5 ae942496e380be8c69d0e228b7a38348
BLAKE2b-256 2832fac4595d2414999ff7260a38d6a0f12242a7a7095b282d5de87af0684208

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page