-
Notifications
You must be signed in to change notification settings - Fork 0
Profiles
Profiles are independent sets of dotfiles. They act as "smart overrides" over your base configuration. This makes them perfect for handling multi-machine setups (like a PC vs a Laptop) or switching between different theming presets (like smooth vs snappy animations).
A profile is a directory under ~/dotfiles/profiles/<name>/ within your dotfiles repository. It holds configuration files that you explicitly want to override when that profile is active.
When a profile is active, synx combines your tracked configs:
-
Profile Overrides: If the active profile tracks a target (e.g.,
hypr),synxsyncs and restores that target from~/dotfiles/profiles/<name>/hypr. -
Base Fallback: If a target is tracked in the base config but not explicitly in the profile (e.g.,
kitty),synxfalls back to syncing/restoring from the base~/dotfiles/kitty.
This means you don't have to duplicate shared configs across all your machines/profiles!
synx --profile-create lapThis registers a new profile. You can now switch to it.
synx --profile lapWhen you apply a profile, synx will automatically:
- Sync your current state to back it up.
- Switch the active profile marker.
-
Restore the new profile's state into your
~/.config. - Auto-reload Hyprland if
hypr/configs were altered.
Once a profile is active, tracking new dotfiles will prompt you to add them as overrides specifically for that profile:
synx --add hyprsynx will ask: Add 'hypr' as an explicit override for this profile? [Y/n]. Proceeding will track hypr uniquely for this profile.
synx --profile-listShows all profiles along with how many explicit targets they each track.
○ pc (2 target(s))
● lap (1 target(s), active)
synx --profile-delete lapCompletely removes the profile directory and detaches it if it was active.
You have a beefy PC (pc) and a battery-conscious laptop (lap). They share 90% of dotfiles like kitty, fish, and nvim, but need different hypr (monitors/animations) and waybar (battery modules) configs.
1. Create the profiles:
synx --profile-create pc
synx --profile-create lap2. On the PC:
synx --profile pc
synx --add hypr # Say Yes to add as override
synx --add waybar # Say Yes to add as override
synx3. On the Laptop:
synx -r # Download the repo first
synx --profile lap
synx --add hypr # Edit local hypr config, then say Yes to add as override
synx --add waybar # Edit local waybar, then say Yes
synxNow, when you edit kitty on either machine and run synx, it updates the base ~/dotfiles/kitty for both. But editing waybar only modifies the override for the currently active profile!
- The active profile is tracked via a marker file in
~/.config/synx/active_profile. - To see what the active profile is currently overriding, you can run
synx --list. Profile-specific overrides will be clearly annotated.
You can run specific scripts when applying a profile using Hooks. Create pre-profile and/or post-profile executable scripts in your ~/.config/synx/hooks directory. The target profile name is passed as the first argument ($1), allowing you to conditionally run commands like enabling/disabling Hyprland plugins based on the profile.
Example ~/.config/synx/hooks/post-profile:
#!/bin/bash
TARGET_PROFILE=$1
if [ "$TARGET_PROFILE" == "gaming" ]; then
echo "Enabling gaming plugins..."
# hyprpm enable my-gaming-plugin
elif [ "$TARGET_PROFILE" == "work" ]; then
echo "Disabling gaming plugins..."
# hyprpm disable my-gaming-plugin
fi