k9s: add hotkey option (#4617)

* k9s: add hotkey option

This PR adds an option to customise k9s hotkeys.
The keyword `hotKey` must be in camel case on the user config.

* Update modules/programs/k9s.nix

Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>

* fix formatting

---------

Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Li Yang 2023-11-02 04:40:14 +11:00 committed by GitHub
parent 9bc7d84b82
commit fc2a8842ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 46 additions and 2 deletions

View file

@ -0,0 +1,5 @@
hotKey:
shift-0:
command: pods
description: Viewing pods
shortCut: Shift-0

View file

@ -13,7 +13,15 @@
headless = false;
};
};
hotkey = {
hotKey = {
shift-0 = {
shortCut = "Shift-0";
description = "Viewing pods";
command = "pods";
};
};
};
skin = {
k9s = {
body = {
@ -35,8 +43,12 @@
home-files/.config/k9s/config.yml \
${./example-config-expected.yml}
assertFileExists home-files/.config/k9s/skin.yml
assertFileExists home-files/.config/k9s/hotkey.yml
assertFileContent \
home-files/.config/k9s/skin.yml \
${./example-skin-expected.yml}
assertFileContent \
home-files/.config/k9s/hotkey.yml \
${./example-hotkey-expected.yml}
'';
}