feat: v0.1.0 #1
@@ -26,6 +26,23 @@ managed_path = "~/.config"
|
||||
# default is "~/.config/userctx"
|
||||
contexts_path = "~/.config/userctx"
|
||||
|
||||
[apps]
|
||||
helix.symlink."*" = "themes/theme.toml"
|
||||
helix.code = "pkill -USR1 hx"
|
||||
|
||||
example2.scripts = ["s1", "s2"]
|
||||
|
||||
[apps.example]
|
||||
symlink."this.file" = "that.file"
|
||||
code = 'echo "this simulates reload command"'
|
||||
|
||||
[apps.niri]
|
||||
code = "this simulates code for niri restart"
|
||||
|
||||
[apps.niri.symlink]
|
||||
"another.file" = "another.link"
|
||||
|
||||
|
||||
# This section of config is intended to document
|
||||
# what userctx can do. Assume we are
|
||||
# building a config for app "example"
|
||||
@@ -38,6 +55,7 @@ contexts_path = "~/.config/userctx"
|
||||
# "source_path". Then userctx will try to lookup
|
||||
# app settings in /source_path/<context_name>
|
||||
source_path = "~/some/path"
|
||||
|
||||
# The default path to apply your context to is
|
||||
# ~/.config/example (for app name "example")
|
||||
# or if you provided a "managed path" in "general" section above,
|
||||
@@ -48,27 +66,13 @@ source_path = "~/some/path"
|
||||
# path.
|
||||
target_path = "~/.config/example/configs"
|
||||
|
||||
# "actions" array defines which steps should be
|
||||
# executed to apply content from
|
||||
# context directory to users home
|
||||
# directory. If actions array is empty the default
|
||||
# behaviour is to just symlink everything from
|
||||
# $CONTEXT_SRC to $CONTEXT_DST
|
||||
actions = [
|
||||
"symlinks", # do the symlinking as specified in "symlinks"
|
||||
"exec", # execute shell script from object "code" below
|
||||
"commands", # run commands from "commands array below"
|
||||
"scripts", # run scripts from "scripts" array below
|
||||
]
|
||||
|
||||
# "symlinks" array of mappings (inline tables of TOML) defines
|
||||
# "symlink" map defines
|
||||
# which files will be symlinked to users home
|
||||
# directory. If "symlinks" key is present in
|
||||
# "actions" above but this "symlinks" array is omitted
|
||||
# then userctx treats all files in the context directory as
|
||||
# files that must be symlinked to users home.
|
||||
symlinks = [
|
||||
# names of files in these mapping are relative to
|
||||
# Names of files in these mapping are relative to
|
||||
# context directory and target directory
|
||||
# by default source is ~/.config/userctx/<context_name>/example for
|
||||
# task (app) named "example"
|
||||
@@ -77,15 +81,16 @@ symlinks = [
|
||||
#
|
||||
# this will link file from context dir to destination dir
|
||||
# $CONTEXT_SRC/context_file.conf -> $CONTEXT_DST/symlink_to_context_file.conf
|
||||
{"context_file.conf" = "symlink_to_context_file.conf"},
|
||||
symlink."context_file.conf" = "symlink_to_context_file.conf"
|
||||
|
||||
# this will link file to subdirectory inside destination dir
|
||||
# directory must be created beforehand
|
||||
# $CONTEXT_SRC/other_file.conf -> $CONTEXT_DST/subdir/other_file.conf
|
||||
{"other_file.conf" = "subdir/other_file.conf" },
|
||||
|
||||
symlink."other_file.conf" = "subdir/other_file.conf"
|
||||
# also possible option
|
||||
{"subdir/yet_another_file.conf" = "yet_another_file.conf" },
|
||||
]
|
||||
symlink."subdir/yet_another_file.conf" = "yet_another_file.conf"
|
||||
|
||||
|
||||
# "code" object let's you write
|
||||
# a custom script that will apply contents of
|
||||
|
||||
Reference in New Issue
Block a user