Skip to content

Add zsh completions (compdef) for kscreen-doctor

ivan tkachenko requested to merge work/ratijas/zsh into master

Top-notch 🤌 context-aware completions for kscreen-doctor with fine-grained tags, descriptions and dynamic selection of outputs and their available modes. In the output completion menu it displays status of outputs and sorts enabled ones first. In the modes selection it brings current mode to the top (if any), then lists output's preferred ones, all marked accordingly, and finally dumps all other available modes. All modes are pretty-formatted to be nicely aligned and easily distinguishable while inserting correct compact mode ID upon completion.

Showcase

List of outputs & --options

Outputs & --options

Output menu

Note that some of these options are terminators, while others have a '.' dot suffix to further complete their arguments.

image

Modes

Grouped, sorted, formatted and aligned.

DP-3 HDMI-0
Modes for DP-3 Modes for HDMI-0
Overscan & Scale

Note how selected (highlighted) items are not the same as the actually inserted text.

Overscan & Scale

Note: this patch uses new variable from ECM (extra-cmake-modules) which is not shipped yet, but hopefully will make it into 5.101 release. Read more: frameworks/extra-cmake-modules!310 (merged)

Merge request reports