Reusing Settings
DASH supports defining global settings that will always be applied, and lets you override them with a per-repo or one-time basis.
This lets you set your theme, keybindings and any other setting by defining them once.
The Global Config
Section titled “The Global Config”The global config is usually under $HOME/.config/gh-dash/config.yml - but that follows the XDG spec. See How to Configure for more details.
The global config is loaded first, with the option to override anything it defines. Here you’d usually want to define stuff like your theme, keybindings etc.
Per-Repo / One-Time Overrides
Section titled “Per-Repo / One-Time Overrides”DASH supports passing ad-hoc or per-repo config files by:
- Creating a
.gh-dash.ymlfile in a git repo’s root directory. - Passing a path to a
.ymlfile you supplied with the--configflag or theGH_DASH_CONFIGenvironment variable.
Any settings defined here will override your global config settings.
Example
Section titled “Example”Your global config under ~/.config/gh-dash/config.yml could look like this:
pager: diff: diffnavtheme: colors: text: primary: "#E2E1ED" secondary: "#666CA6" inverted: "#242347" # ...keybindings: universal: - key: g name: lazygit command: cd {{.RepoPath}} && lazygitThen in a git repo you could create a .gh-dash.yml file defining just the
sections:
prSections: - title: Bugs filters: is:open author:@me [BUG] - title: Our Packages filters: is:open review-requested:@me repo:work-org/our-pkgStarting DASH from the git repo, the final config used will have the pager, theme and keybindings
from your global config and the prSections from your repo’s config.
Including Other Config Files
Section titled “Including Other Config Files”Any config file can pull in other config files with the include directive, which
takes a list of paths to other config files:
include: - /var/lib/gh-dash/system-shared.yml - ~/.config/gh-dash/themes/tokyonight.yml - ./shared-keybindings.yml
prSections: - title: Bugs filters: is:open author:@me [BUG]Included files are merged in using the same rules as the global/override merge:
the file doing the including takes precedence over the files it includes, and
included files are merged in the order they’re listed (later ones overriding
earlier ones). keybindings are unioned across all files, and sections are
taken from the file that defines them.
Paths are resolved relative to the file declaring the include, and a leading
~ is expanded to your home directory. Included files may declare their own
include directives, which are resolved recursively.