mirror of
https://github.com/nix-community/home-manager
synced 2024-12-25 03:09:47 +01:00
fc2a8842ea
* 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>
54 lines
1.2 KiB
Nix
54 lines
1.2 KiB
Nix
{ config, ... }:
|
|
|
|
{
|
|
programs.k9s = {
|
|
enable = true;
|
|
package = config.lib.test.mkStubPackage { };
|
|
|
|
settings = {
|
|
k9s = {
|
|
refreshRate = 2;
|
|
maxConnRetry = 5;
|
|
enableMouse = true;
|
|
headless = false;
|
|
};
|
|
};
|
|
hotkey = {
|
|
hotKey = {
|
|
shift-0 = {
|
|
shortCut = "Shift-0";
|
|
description = "Viewing pods";
|
|
command = "pods";
|
|
};
|
|
};
|
|
};
|
|
skin = {
|
|
k9s = {
|
|
body = {
|
|
fgColor = "dodgerblue";
|
|
bgColor = "#ffffff";
|
|
logoColor = "#0000ff";
|
|
};
|
|
info = {
|
|
fgColor = "lightskyblue";
|
|
sectionColor = "steelblue";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/k9s/config.yml
|
|
assertFileContent \
|
|
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}
|
|
'';
|
|
}
|