Skip to content

ctadel/teer

Repository files navigation

LOGO

In the realm of customization, managing dotfiles – those hidden configuration files that govern the behavior of various applications – is a common practice among us developers.

However, while many have their own dotfiles repositories, there's often a lack of efficient synchronization tools. This realization inspired the development of teer, a python program designed to streamline the synchronization process and ensure that your configurations are always up-to-date across different systems.

teer makes it incredibly easy to add the configuration of any application and include additional scripts to run post-syncing, providing a seamless and customizable experience.

Demo

Operating System Compatibility

Operating System Status
Linux
MacOS
Windows

Getting Started

  1. Clone this Repository: Clone the teer repository to your local system.
  2. Specify Dotfiles Directory: Add your dotfiles repository path to parameters.cfg file.
  3. Make your own Configuration File: Create a config.json file and specify the applications and their configurations to be synced. (See Reference: #configuration)
  4. Configure Parameters: Update the parameters.cfg file based on your requirement.
  5. Start Syncing: Utilize the teer.py script to synchronize your dotfiles across different systems effortlessly.
python teer.py
  1. Sit Back and Relax: Based on the instructions written in configuration file, teer will start the synchronization process.

Features

  • Interactive Syncing: Use the (--interactive / -i) flag to run the script and sync dotfiles for each application one at a time
  • Executable Commands: Execute commands after syncing configurations, allowing for additional customization or sourcing dotfiles.
  • Effortless Integration: Create your own config file and easily integrate your dotfiles into your existing dotfiles repository workflow for seamless management.

Configuration

The configuration file config.json follows a structured format to define the source and destination paths for the dotfiles, along with additional instructions for post-syncing operations. Below is an explanation of each property:

  • local_path (string/path): This property specifies the directory within the repository where the application's backup of dotfiles or folders is stored. If not specified, it defaults to the repository's root directory.

  • remote_path (string/path): This property indicates the directory on the user's system where the dotfiles should be synced to. If not specified, it defaults to the user's home directory.

  • files (object/dict): This property contains key-value pairs, where each key is a file in the local_path directory and it's corresponding value is the path where the file should be linked on the user's system. This allows for selective syncing of specific files.

  • exec (string/shell command): This property specifies a script or command to be executed after the dotfiles have been synced. It is useful for any post-sync operations that need to be performed, such as reloading configurations or running setup scripts.

  • launch_file (string/path): This property is used to link .desktop files, which are typically used to create entries in the application's launcher menu. The .desktop file will be linked inside the ~/.local/share/applications/ directory, making the application accessible from the system's application launcher.

Each entry in the configuration file ensures that the corresponding dotfiles are accurately synced from the specified local paths to the designated remote paths, with optional commands executed post-syncing to finalize the setup. This flexible configuration approach makes managing and syncing dotfiles efficient and tailored to individual application needs.

Parameters

The parameters file parameters.cfg is any configuration file. It allows you to overwrite all the default values used in the script such as log path, and default remote directory and also set application parameters that are passed as arguments such as Interactive Mode, Force Overwrite, Enable Logs.

All the possible parameters are already available in the parameters.cfg file in this repository. In case you mess things up, you can always take refer to original parameters.cfg file from here.

Sample Configurations

Below are sample entries in the config.json file illustrating various use cases:

{
  "Shell Scripts"   :  {
    "local_path"      : "shell",
    "exec"            : "bash shell/add_source.sh",
    "files"           : {
          "bashpd.sh"   : ".bashpd"
        }
    },

  "Git"       : {
    "files"    : {
        "gitconfig"  : ".gitconfig"
      }
  },

  "Kitty Terminal"   : {
    "local_path"      : "kitty",
    "remote_path"     : "~/.config/kitty"
  },

  "Yazi File Manager"    : {
    "local_path"      : "yazi",
    "remote_path"     : "~/.config/yazi"
  },

  "Lunar Vim"    : {
    "local_path"      : "lvim",
    "remote_path"     : "~/.config/lvim"
  },

  "Postgresql"       : {
    "files"    : {
        "psqlrc"  : ".psqlrc"
      }
  },

  "Tig"       : {
    "files"    : {
        "tigrc"  : ".tigrc"
      }
  },

  "Byobu"       : {
    "local_path"  : "byobu",
    "remote_path" : "~/.byobu"
  },

  "FZF Script"       : {
    "local_path"  : "shell",
    "remote_path" : "~/usr/bin/",
    "files"    : {
        "fzf_script.sh"  : "f"
      }
  },

  "Spotify TUI"       : {
    "local_path"  : "ncspot",
    "remote_path" : "~/.config/ncspot"
  }
}

Conclusion

With teer, managing your dotfiles across different systems becomes a breeze. Say goodbye to manual copy-pasting and rsync headaches – embrace a streamlined synchronization process and ensure your configurations are always in sync, no matter where you go. The ease of adding new application configurations and executing additional scripts post-syncing makes teer an indispensable tool for every developer.

About

dotfiles manager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages