This repository contains my personal configuration files and scripts for automating the synchronization of my development environment settings. It includes configurations for Zsh, Zed, and VS Code, as well as scripts to keep these configurations in sync with a Git repository.
It uses https://github.com/imbaggaarm/zshrc-auto-sync as a reference for the Zsh configuration and adds automation for Zed and VS Code configurations. The repository is designed to be used on macOS, leveraging launchd services for background synchronization.
This repository is designed to streamline the management of my development environment by automating the synchronization of configuration files. It uses macOS launchd services to monitor changes in configuration files and automatically commit and push updates to a Git repository.
- Zsh Configuration: Custom
.zshrcfile with aliases, plugins, and environment variables. - Zed Configuration: Keybindings and settings for the Zed editor.
- VS Code Configuration: Keybindings and settings for Visual Studio Code.
- Automation: Scripts to monitor changes in configuration files and sync them to a Git repository.
- macOS Launch Agents: Automatically run synchronization scripts in the background.
Ensure you have the following:
- fswatch: Used to monitor file changes.
- A working installation of
zsh.
-
Clone this repository:
git clone https://github.com/lucastnr/my-config.git cd my-config -
Make the setup script executable:
chmod +x ./auto_sync/setup_services.sh
-
Run the setup script to configure and start the macOS
launchdservices:./auto_sync/setup_services.sh
This script:
- Makes all necessary scripts executable.
- Copies the
plistfiles to~/Library/LaunchAgents. - Loads the
launchdservices to start monitoring file changes.
These scripts:
- Use
fswatchto monitor changes in configuration files. - Trigger the corresponding commit scripts when changes are detected.
These scripts:
- Copy the updated configuration files to the repository.
- Commit and push the changes to the Git repository.
This repository is for personal use and is not licensed for public distribution. Feel free to adapt it for your own use, but please ensure you understand the scripts and configurations before using them.
- Ensure you have write access to the Git repository where changes will be pushed.
- The
fswatchtool is required for monitoring file changes. Install it via Homebrew:brew install fswatch
- Logs for the
launchdservices can be found in the~/tmpdirectory:com.lucas.sync-zed.stdoutandcom.lucas.sync-zed.stderrcom.lucas.sync-zshrc.stdoutandcom.lucas.sync-zshrc.stderr
- If you do have sensitive information in your configuration files, ensure to exclude them from the repository or use a secure method to handle them.
- e.g. create a
.secrets.shfile and runsource .secrets.shin your.zshrcfile.
- e.g. create a