diff --git a/README.md b/README.md index dc71f45..101288b 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # userctx -Manage you configurations and themes with ease. +Manage your configurations and themes with ease. ## Installation You just need to copy the file to a directory -in your $PATH (for example: /usr/loca/bin) and +in your $PATH (for example: /usr/local/bin) and copy/create a config file. ```bash sudo install userctx.py /usr/local/bin/userctx @@ -29,8 +29,8 @@ Typically a context directory looks like this. In the above example, context "Goldfish" contains configs for apps "sway" and "wofi". These configs will be applied when you apply context "Goldfish". -When a context is applied the app configs from context directory are get -symlinked to youe ~/.config/ folder for each managed app. Goldfish/wofi/style.css symlinks to +When a context is applied the app configs from context directory get +symlinked to your ~/.config/ folder for each managed app. Goldfish/wofi/style.css symlinks to \~/.config/wofi/style.css, Goldfish/sway/theme.conf symlinks to \~/.config/sway/theme.conf etc. This default behaviour can be changed and specific actions or customizations @@ -67,7 +67,7 @@ This section contains global settings for **userctx**. ### The `[apps]` section For each application defined in the `general.apps` array, you can have a dedicated section to specify its configuration. -You can create **[apps.]** section in the config to specify **userctx** behaviour for the app. The following options are supported. +You can create **[apps.]** section in the config to specify **userctx** behavior for the app. The following options are supported. - `source_path` (string, optional): Overrides the global `source_path` for this specific application. - `target_path` (string, optional): Overrides the global `target_path` for this specific application. The final destination path for an application's configuration will be `/`. @@ -83,10 +83,10 @@ You can create **[apps.]** section in the config to specify **userctx** TODO: a more detailed explanation of wildcard symlinking. ## Examples -### Basic usecase: we only need symlinks +### Basic use case: we only need symlinks Let's add configuration for "foot" terminal emulator, which will be applied when we apply context "Goldfish" assuming -we would like to switch foot's visual theme when swithching context. +we would like to switch foot's visual theme when switching context. 1. First we need to create a separate file for visuals config in our context directory. @@ -146,7 +146,7 @@ apps = [ "wofi", ] ``` -4. Test you configuration +4. Test your configuration ```bash userctx --nop apply Goldfish ``` @@ -158,7 +158,7 @@ a symlink will be created in your homedir: ~/.config/foot/theme.ini -> ~/.config/userctx/Goldfish/foot/theme.ini -### More advanced usecase: run command and hot-reload +### More advanced use case: run command and hot-reload Let's configure **userctx** to apply theme to helix editor. 1. Similar to the above section, create ~/.config/userctx/Goldfish/helix/helix.toml @@ -189,9 +189,9 @@ reload = "pkill -USR1 hx" Here we instruct **userctx** to symlink any (single) file it finds in "helix" subdirectory of context folder to ~/.config/helix/themes/current_theme.toml -Then we run sed to change the config file. This part is not really necessare if helix is +Then we run sed to change the config file. This part is not really necessary if helix is configured to use theme named "current_theme" and you're sure that config won't change. -We could just replace the file and issue USR1. The sed part if for the case when config +We could just replace the file and issue USR1. The sed part is for the case when config is changed by user or other app. Finally we set the reload command which @@ -202,5 +202,4 @@ will tell helix to reload config. userctx --nop apply Goldfish ``` -See also template "config.toml" with numerous app settings. - +See also template "config.toml" with some app settings.