mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-02 15:11:03 +01:00
television: update channel location
Co-authored-by: awwpotato <awwpotato@voidq.com>
This commit is contained in:
parent
d492e3c381
commit
98aed449ba
2 changed files with 56 additions and 42 deletions
|
|
@ -43,29 +43,41 @@ in
|
|||
default = { };
|
||||
description = ''
|
||||
Each set of channels are written to
|
||||
{file}`$XDG_CONFIG_HOME/television/NAME-channels.toml`
|
||||
{file}`$XDG_CONFIG_HOME/television/cable/NAME.toml`
|
||||
|
||||
See <https://github.com/alexpasmantier/television/blob/main/docs/channels.md>
|
||||
See <https://alexpasmantier.github.io/television/docs/Users/channels>
|
||||
for options
|
||||
'';
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
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 = "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}";
|
||||
}
|
||||
];
|
||||
example = {
|
||||
git-diff = {
|
||||
metadata = {
|
||||
name = "git-diff";
|
||||
description = "A channel to select files from git diff commands";
|
||||
requirements = [ "git" ];
|
||||
};
|
||||
}
|
||||
'';
|
||||
source = {
|
||||
command = "git diff --name-only HEAD";
|
||||
};
|
||||
preview = {
|
||||
command = "git diff HEAD --color=always -- '{}'";
|
||||
};
|
||||
};
|
||||
git-log = {
|
||||
metadata = {
|
||||
name = "git-log";
|
||||
description = "A channel to select from git log entries";
|
||||
requirements = [ "git" ];
|
||||
};
|
||||
source = {
|
||||
command = "git log --oneline --date=short --pretty=\"format:%h %s %an %cd\" \"$@\"";
|
||||
output = "{split: :0}";
|
||||
};
|
||||
preview = {
|
||||
command = "git show -p --stat --pretty=fuller --color=always '{0}'";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
enableBashIntegration = lib.hm.shell.mkBashIntegrationOption { inherit config; };
|
||||
|
|
@ -84,7 +96,7 @@ in
|
|||
}
|
||||
(lib.mapAttrs' (
|
||||
name: value:
|
||||
lib.nameValuePair "television/${name}-channels.toml" {
|
||||
lib.nameValuePair "television/cable/${name}.toml" {
|
||||
source = tomlFormat.generate "television-${name}-channels" value;
|
||||
}
|
||||
) cfg.channels)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue