+
Skip to content

mojjominion/consync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

consync

Description

Simple tool to auto add configuration files (.conf, .config, .conf) to the your managed repository on trigger of following events

    /// An event describing creation operations on files.
    ///
    /// This event is about the creation of files, folders, or other structures but not about e.g.
    /// writing new content into them.
  - Create(CreateKind),

    /// An event describing mutation of content, name, or metadata.
    ///
    /// This event is about the mutation of files', folders', or other structures' content, name
    /// (path), or associated metadata (attributes).
  - Modify(ModifyKind),

    /// An event describing removal operations on files.
    ///
    /// This event is about the removal of files, folders, or other structures but not e.g. erasing
    /// content from them. This may also be triggered for renames/moves that move files _out of the
    /// watched subpath_.
    ///
    /// Some editors also trigger Remove events when saving files as they may opt for removing (or
    /// renaming) the original then creating a new file in-place.
  - Remove(RemoveKind),

source

Usage

Installing

You can run this bash script to install the tool

curl -L https://raw.githubusercontent.com/mojjominion/consync/master/scripts/install.sh | bash

Note: this script will create a systemd service for the current user which will run in the background

This script will do following three things:

  1. download and install the binary from github release
  2. create systemd service to keep the tool running in the background
  3. and finally install consync_uninstall to uninstall the tool

To check that sevice is running you can use this command

ps -eo 'tty,pid,comm' | grep "consync"

For more information refer to the script here

Cli

  • consync find find all the files matching default extentions in ~/.config/ dir.
  • consync find <file_ext> find all the files matching file_ext input ignoring all the default ones.

Uninstalling

To undo whatever the installation script did in the system you can run this bash script

consync_uninstall

This script will remove the systemd service created for the current user.

Support

At the moment this tool only supports chezmoi config manager. In future it might have some configuration to run custom scripts on those events

  • Config
root: $HOME/.config
run: <custom command> | null
file_types:
- conf
- config
- confg
- yml
- yaml
- service

root is the directory that needs to be tracked for file changes

run will be executed for every file that is in file_types if it changes

About

Auto sync your dot_configs with your managed repo

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载