[general] # if dry run is set to true # userctx will only validate config # and tell you what it will do to apply context # tasks dry_run = true # "apps" array tells userctx what to do (which apps # should be actually managed). If it is empty or not # set, then userctx will do nothing. # Uncomment apps below. apps = [ "sway", "wofi", ] # target directory where managed configs # are located # defaults to $XDG_CONFIG_HOME if specifically set # or ~/.config if $XGD_CONFIG_HOME is not set target_path = "~/.config" # directory where contexts are stored # default is "~/.config/userctx" source_path = "~/.config/userctx" # section that demonstrates all the available # features of userctx [apps.example] # The default path to apply your context to is # ~/.config/example (for app name "example") # if not overridden with general.target_path. # Setting "target_path" overrides this. # $CONTEXT_DST env will hold the actual destination path. # symlinks will be created relative to this specified # path. target_path = "~/.config/example/configs" # "symlink" map defines # which files will be symlinked to users home # directory. # Names of files in this mapping are relative to # context directory and target directory # by default source is ~/.config/userctx//example # and target directory is ~/.config/example # for app named "example" # # this will link file from context dir to destination dir # $CONTEXT_SRC/context_file.conf -> $CONTEXT_DST/symlink_to_context_file.conf symlink."context_file.conf" = "symlink_to_context_file.conf" # this will link file to subdirectory inside destination dir # Note that destination subdir must be created beforehand. # $CONTEXT_SRC/other_file.conf -> $CONTEXT_DST/subdir/other_file.conf symlink."other_file.conf" = "subdir/other_file.conf" symlink."subdir/yet_another_file.conf" = "yet_another_file.conf" # If symlinks mapping is not empty then only instructions from the map # will be applied. If you want to redefine linking rules only for single # file and symlink others according to default rules then add the following # rule as well. symlink."*" = "*" # As a special case, providing the following mapping symlinks # a SINGLE file (the first one found) from context directory # to a specified name (see helix section below). # This reads "symlinks ANY file you find to this path". # symlink."*" = "some/destination.conf" # "exec" let's you write a reload command or # even a bigger custom script that will apply contents of # your context. Note the triple double-qoutes for multiline # strings (see TOML spec). # This string will be passed as is to $SHELL for execution. exec = """ # this is a normal shell script which will # be executed by user's $SHELL or 'bash' binary # if users $SHELL is empty # users envs are available echo "$HOME" # additional envs are available echo "$CONTEXT_SRC" echo "$CONTEXT_DST" echo "$CONTEXT_NAME" """ # if "script" array is not empty # then userctx will try to find # named files in $CONTEXT_SRC and # execute them with $SHELL