Add configuration

This commit is contained in:
2026-07-28 09:35:15 +02:00
parent 547cd123da
commit 80f24bcfa8
12 changed files with 629 additions and 41 deletions

View File

@@ -55,6 +55,39 @@ gh-threads --repo owner/repository \
--endpoint https://github.example.com/api/graphql
```
## Configuration
The optional TOML configuration is loaded from
`$GH_THREADS_CONFIG`, `$XDG_CONFIG_HOME/gh-threads/config.toml`, or the
operating system's user configuration directory at `gh-threads/config.toml`.
On Linux this is normally `~/.config/gh-threads/config.toml`. On macOS,
`~/Library/Application Support/gh-threads/config.toml` is preferred, with
`~/.config/gh-threads/config.toml` automatically used as a fallback when it
exists.
```toml
theme = "dark" # "dark" or "light"
refresh_interval = "10s"
repository = "" # optional owner/repository default
show_all = false # requires repository
limit = 50
endpoint = "https://api.github.com/graphql"
[display]
fold_resolved = true
thread_list_width_percent = 33 # 20-60
[paths]
scroll = false
scroll_interval = "350ms" # minimum 50ms
```
Command-line flags override the configuration. `GH_REPO` overrides the
configured repository when `--repo` is not provided. The corresponding flags
include `--config`, `--theme`, `--poll`, `--fold-resolved`,
`--thread-list-width`, `--path-scroll`, and `--path-scroll-interval`. Boolean
settings can be disabled explicitly, for example `--path-scroll=false`.
## Keys
| Key | Action |