dlvhdr / gh-dash

A beautiful CLI dashboard for GitHub 🚀
https://dlvhdr.github.io/gh-dash
MIT License
6.82k stars 195 forks source link

Support Reusable Configuring #317

Open joshmedeski opened 7 months ago

joshmedeski commented 7 months ago

Is your feature request related to a problem? Please describe. As a user, I want to reuse configuration logic across different config files, so I can reduce code duplication and better streamline my workflow.

Describe the solution you'd like I currently have a simple script that takes local .gh-dash.yml files (if they exists) and create custom views for certain projects.

Here is an example of custom config for a specific project:

prSections:
  # ...custom sections
issuesSections:
  # ... custom sections
defaults:
  layout:
    issues:
      repo:
        hidden: true
    prs:
      repo:
        hidden: true
  preview:
    width: 80
repoPaths:
  # ... custom path
keybindings:
  prs:
    - key: O
      command: >
        tmux new-window -c {{.RepoPath}} 'nvim -c ":silent Octo pr edit {{.PrNumber}}"'

I would like to be able to extend a "base" configuration and allow gh-dash to read those configuration values

prSections:
  # ...custom sections
issuesSections:
  # ... custom sections
repoPaths:
  # ... custom path
extend:
  - ~/.config/gh-dash/base.yml

Then, if I want to adjust defaults, keybindings or anything else I can change it in one place and everywhere else will automatically get those updates.

Describe alternatives you've considered

  1. Just copy/paste the changes I want to all gh-dash files (this is difficult as they are all in different places.
  2. Create some sort of complex yq script that merges the base config with the custom config before opening gh-dash (via my ghd script)

Additional context I may move all my gh-dash custom config files to a centralized place (like ~/.config/gh-dash/*.yml but that won't alleviate my current issue of not being able to share config values across different files.

dlvhdr commented 7 months ago

Love it