mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-07 12:05:34 +00:00
add a separate cable channels file for macos
This commit is contained in:
parent
11450915d0
commit
53c4bd3f09
56
cable/macos-channels.toml
Normal file
56
cable/macos-channels.toml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# GIT
|
||||||
|
[[cable_channel]]
|
||||||
|
name = "git-diff"
|
||||||
|
source_command = "git diff --name-only"
|
||||||
|
preview_command = "git diff --color=always {0}"
|
||||||
|
|
||||||
|
[[cable_channel]]
|
||||||
|
name = "git-reflog"
|
||||||
|
source_command = 'git reflog'
|
||||||
|
preview_command = 'git show -p --stat --pretty=fuller --color=always {0}'
|
||||||
|
|
||||||
|
[[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}"
|
||||||
|
|
||||||
|
[[cable_channel]]
|
||||||
|
name = "git-branch"
|
||||||
|
source_command = "git --no-pager branch --all --format=\"%(refname:short)\""
|
||||||
|
preview_command = "git show -p --stat --pretty=fuller --color=always {0}"
|
||||||
|
|
||||||
|
# Docker
|
||||||
|
[[cable_channel]]
|
||||||
|
name = "docker-images"
|
||||||
|
source_command = "docker image list --format=json | jq -r '.[] | .Names[0] // .Id'"
|
||||||
|
preview_command = "docker image inspect {0} | jq -C"
|
||||||
|
|
||||||
|
[[cable_channel]]
|
||||||
|
name = "podman-images"
|
||||||
|
source_command = "podman image list --format=json | jq -r '.[] | .Names[0] // .Id'"
|
||||||
|
preview_command = "podman image inspect {0} | jq -C"
|
||||||
|
|
||||||
|
# S3
|
||||||
|
[[cable_channel]]
|
||||||
|
name = "s3-buckets"
|
||||||
|
source_command = "aws s3 ls | cut -d \" \" -f 3"
|
||||||
|
preview_command = "aws s3 ls s3://{0}"
|
||||||
|
|
||||||
|
# Dotfiles
|
||||||
|
[[cable_channel]]
|
||||||
|
name = "my-dotfiles"
|
||||||
|
source_command = "fd -t f . $HOME/.config"
|
||||||
|
preview_command = ":files:"
|
||||||
|
|
||||||
|
# Shell history
|
||||||
|
[[cable_channel]]
|
||||||
|
name = "zsh-history"
|
||||||
|
source_command = "sed '1!G;h;$!d' $HOME/.zsh_history | cut -d\";\" -f 2-"
|
||||||
|
|
||||||
|
[[cable_channel]]
|
||||||
|
name = "bash-history"
|
||||||
|
source_command = "sed '1!G;h;$!d' $HOME/.bash_history"
|
||||||
|
|
||||||
|
[[cable_channel]]
|
||||||
|
name = "fish-history"
|
||||||
|
source_command = "fish -c 'history'"
|
@ -18,11 +18,15 @@ struct ChannelPrototypes {
|
|||||||
const CABLE_FILE_NAME_SUFFIX: &str = "channels";
|
const CABLE_FILE_NAME_SUFFIX: &str = "channels";
|
||||||
const CABLE_FILE_FORMAT: &str = "toml";
|
const CABLE_FILE_FORMAT: &str = "toml";
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(target_os = "macos")]
|
||||||
|
const DEFAULT_CABLE_CHANNELS: &str =
|
||||||
|
include_str!("../cable/macos-channels.toml");
|
||||||
|
|
||||||
|
#[cfg(all(unix, not(target_os = "macos")))]
|
||||||
const DEFAULT_CABLE_CHANNELS: &str =
|
const DEFAULT_CABLE_CHANNELS: &str =
|
||||||
include_str!("../cable/unix-channels.toml");
|
include_str!("../cable/unix-channels.toml");
|
||||||
|
|
||||||
#[cfg(not(unix))]
|
#[cfg(windows)]
|
||||||
const DEFAULT_CABLE_CHANNELS: &str =
|
const DEFAULT_CABLE_CHANNELS: &str =
|
||||||
include_str!("../cable/windows-channels.toml");
|
include_str!("../cable/windows-channels.toml");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user