mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 04:58:32 +02:00
document config-override enhancement
This commit is contained in:
parent
7df83aa44a
commit
40f93a9322
2 changed files with 49 additions and 0 deletions
|
@ -61,6 +61,28 @@ and can be edited with a plain text editor.
|
||||||
Or use the built-in prompt or an external editor to compose your
|
Or use the built-in prompt or an external editor to compose your
|
||||||
entries.
|
entries.
|
||||||
|
|
||||||
|
### Modifying Configurations from the Command line
|
||||||
|
|
||||||
|
You can override a configuration field for the current instance of `jrnl` using `--config-override CONFIG_KEY:CONFIG_VALUE` where `CONFIG_KEY` is a valid configuration field, specified in dot-notation and `CONFIG_VALUE` is the (valid) desired override value.
|
||||||
|
|
||||||
|
You can specify multiple overrides as a comma-separated list.
|
||||||
|
!!! note
|
||||||
|
These overrides allow you to modify ***any*** field of your jrnl configuration. We trust that you know what you are doing.
|
||||||
|
|
||||||
|
#### Examples:
|
||||||
|
|
||||||
|
``` sh
|
||||||
|
#Create an entry using the `stdin` prompt, for rapid logging
|
||||||
|
jrnl --config-override editor:""
|
||||||
|
|
||||||
|
#Populate a project's log
|
||||||
|
jrnl --config-override journal:"$(git rev-parse --show-toplevel)/todo.txt"
|
||||||
|
|
||||||
|
#Pass multiple overrides
|
||||||
|
jrnl --config-override display_format:fancy,linewrap:20,colors.title:green
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
## Multiple journal files
|
## Multiple journal files
|
||||||
|
|
||||||
You can configure `jrnl`to use with multiple journals (eg.
|
You can configure `jrnl`to use with multiple journals (eg.
|
||||||
|
|
|
@ -154,6 +154,33 @@ only field 1.
|
||||||
jrnl -on "$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)"
|
jrnl -on "$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Launch a terminal for rapid logging
|
||||||
|
You can use this to launch a terminal that is the `jrnl` stdin prompt so you can start typing away immediately.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
jrnl now --config-override editor:""
|
||||||
|
```
|
||||||
|
|
||||||
|
Bind this to a keyboard shortcut.
|
||||||
|
|
||||||
|
Map `Super+Alt+J` to launch the terminal with jrnl prompt
|
||||||
|
|
||||||
|
- **xbindkeys**
|
||||||
|
In your `.xbindkeysrc`
|
||||||
|
|
||||||
|
```ini
|
||||||
|
Mod4+Mod1+j
|
||||||
|
alacritty -t floating-jrnl -e jrnl now --config-override editor:"",
|
||||||
|
```
|
||||||
|
|
||||||
|
- **I3 WM** Launch a floating terminal with the `jrnl` prompt
|
||||||
|
|
||||||
|
```ini
|
||||||
|
bindsym Mod4+Mod1+j exec --no-startup-id alacritty -t floating-jrnl -e jrnl --config-override editor:""
|
||||||
|
for_window[title="floating *"] floating enable
|
||||||
|
```
|
||||||
|
|
||||||
## External editors
|
## External editors
|
||||||
|
|
||||||
Configure your preferred external editor by updating the `editor` option
|
Configure your preferred external editor by updating the `editor` option
|
||||||
|
|
Loading…
Add table
Reference in a new issue