mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
television: add support for channels (#7026)
This commit is contained in:
parent
9ef92f1c6b
commit
de496c9ccb
2 changed files with 73 additions and 6 deletions
|
|
@ -10,6 +10,20 @@
|
|||
input_bar_position = "top";
|
||||
};
|
||||
};
|
||||
channels.my-custom = {
|
||||
cable_channel = [
|
||||
{
|
||||
name = "git-log";
|
||||
source_command = ''git log --oneline --date=short --pretty="format:%h %s %an %cd" "$@"'';
|
||||
preview_command = "git show -p --stat --pretty=fuller --color=always {0}";
|
||||
}
|
||||
{
|
||||
name = "my-dotfiles";
|
||||
source_command = "fd -t f . $HOME/.config";
|
||||
preview_command = "bat -n --color=always {0}";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
|
|
@ -23,5 +37,18 @@
|
|||
show_preview_panel = true
|
||||
use_nerd_font_icons = false
|
||||
''}
|
||||
assertFileExists home-files/.config/television/my-custom-channels.toml
|
||||
assertFileContent home-files/.config/television/my-custom-channels.toml \
|
||||
${pkgs.writeText "channels-expected" ''
|
||||
[[cable_channel]]
|
||||
name = "git-log"
|
||||
preview_command = "git show -p --stat --pretty=fuller --color=always {0}"
|
||||
source_command = "git log --oneline --date=short --pretty=\"format:%h %s %an %cd\" \"$@\""
|
||||
|
||||
[[cable_channel]]
|
||||
name = "my-dotfiles"
|
||||
preview_command = "bat -n --color=always {0}"
|
||||
source_command = "fd -t f . $HOME/.config"
|
||||
''}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue