Skip to content

Profiles

Izunim edited this page Feb 27, 2026 · 4 revisions

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).

How It Works

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:

  1. Profile Overrides: If the active profile tracks a target (e.g., hypr), synx syncs and restores that target from ~/dotfiles/profiles/<name>/hypr.
  2. Base Fallback: If a target is tracked in the base config but not explicitly in the profile (e.g., kitty), synx falls back to syncing/restoring from the base ~/dotfiles/kitty.

This means you don't have to duplicate shared configs across all your machines/profiles!

Usage

Create a profile

synx --profile-create lap

This registers a new profile. You can now switch to it.

Apply a profile

synx --profile lap

When you apply a profile, synx will automatically:

  1. Sync your current state to back it up.
  2. Switch the active profile marker.
  3. Restore the new profile's state into your ~/.config.
  4. Auto-reload Hyprland if hypr/ configs were altered.

Add explicit overrides

Once a profile is active, tracking new dotfiles will prompt you to add them as overrides specifically for that profile:

synx --add hypr

synx will ask: Add 'hypr' as an explicit override for this profile? [Y/n]. Proceeding will track hypr uniquely for this profile.

List profiles

synx --profile-list

Shows all profiles along with how many explicit targets they each track.

  ○ pc (2 target(s))
  ● lap (1 target(s), active)

Delete a profile

synx --profile-delete lap

Completely removes the profile directory and detaches it if it was active.

Example: Multi-Machine Setup

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 lap

2. On the PC:

synx --profile pc
synx --add hypr # Say Yes to add as override
synx --add waybar # Say Yes to add as override
synx

3. 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
synx

Now, 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!

Notes

  • 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.

Hooks

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

Clone this wiki locally