fix typos in README.md
This commit is contained in:
25
README.md
25
README.md
@@ -1,10 +1,10 @@
|
|||||||
# userctx
|
# userctx
|
||||||
|
|
||||||
Manage you configurations and themes with ease.
|
Manage your configurations and themes with ease.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
You just need to copy the file to a directory
|
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.
|
copy/create a config file.
|
||||||
```bash
|
```bash
|
||||||
sudo install userctx.py /usr/local/bin/userctx
|
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".
|
In the above example, context "Goldfish" contains configs for apps "sway" and "wofi".
|
||||||
These configs will be applied when you apply context "Goldfish".
|
These configs will be applied when you apply context "Goldfish".
|
||||||
|
|
||||||
When a context is applied the app configs from context directory are get
|
When a context is applied the app configs from context directory get
|
||||||
symlinked to youe ~/.config/ folder for each managed app. Goldfish/wofi/style.css symlinks to
|
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.
|
\~/.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
|
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
|
### The `[apps]` section
|
||||||
For each application defined in the `general.apps` array, you can have a dedicated section to specify its configuration.
|
For each application defined in the `general.apps` array, you can have a dedicated section to specify its configuration.
|
||||||
|
|
||||||
You can create **[apps.<you_app>]** section in the config to specify **userctx** behaviour for the app. The following options are supported.
|
You can create **[apps.<your_app>]** 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.
|
- `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 `<target_path>/<app_name>`.
|
- `target_path` (string, optional): Overrides the global `target_path` for this specific application. The final destination path for an application's configuration will be `<target_path>/<app_name>`.
|
||||||
@@ -83,10 +83,10 @@ You can create **[apps.<you_app>]** section in the config to specify **userctx**
|
|||||||
TODO: a more detailed explanation of wildcard symlinking.
|
TODO: a more detailed explanation of wildcard symlinking.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
### Basic usecase: we only need symlinks
|
### Basic use case: we only need symlinks
|
||||||
Let's add configuration for "foot" terminal emulator, which
|
Let's add configuration for "foot" terminal emulator, which
|
||||||
will be applied when we apply context "Goldfish" assuming
|
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
|
1. First we need to create a separate file for visuals config in our
|
||||||
context directory.
|
context directory.
|
||||||
@@ -146,7 +146,7 @@ apps = [
|
|||||||
"wofi",
|
"wofi",
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
4. Test you configuration
|
4. Test your configuration
|
||||||
```bash
|
```bash
|
||||||
userctx --nop apply Goldfish
|
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
|
~/.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.
|
Let's configure **userctx** to apply theme to helix editor.
|
||||||
|
|
||||||
1. Similar to the above section, create ~/.config/userctx/Goldfish/helix/helix.toml
|
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
|
Here we instruct **userctx** to symlink any (single) file it finds in "helix" subdirectory of context folder
|
||||||
to ~/.config/helix/themes/current_theme.toml
|
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.
|
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.
|
is changed by user or other app.
|
||||||
|
|
||||||
Finally we set the reload command which
|
Finally we set the reload command which
|
||||||
@@ -202,5 +202,4 @@ will tell helix to reload config.
|
|||||||
userctx --nop apply Goldfish
|
userctx --nop apply Goldfish
|
||||||
```
|
```
|
||||||
|
|
||||||
See also template "config.toml" with numerous app settings.
|
See also template "config.toml" with some app settings.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user