wip
This commit is contained in:
28
.config/television/cable/files.toml
Normal file
28
.config/television/cable/files.toml
Normal file
@@ -0,0 +1,28 @@
|
||||
[metadata]
|
||||
name = "files"
|
||||
description = "A channel to select files and directories"
|
||||
requirements = ["fdfind", "batcat", "cat", "head"]
|
||||
|
||||
[source]
|
||||
command = ["fdfind -t f", "fdfind -t f -H", "fdfind -t f -H -I"]
|
||||
|
||||
[preview]
|
||||
command = ["batcat -n --color=always '{}'", "cat '{}'", "head -50 '{}'"]
|
||||
env = { BAT_THEME = "ansi" }
|
||||
|
||||
[keybindings]
|
||||
shortcut = "f1"
|
||||
ctrl-e = "actions:edit"
|
||||
ctrl-up = "actions:goto_parent_dir"
|
||||
|
||||
[actions.edit]
|
||||
description = "Opens the selected entries with the default editor (falls back to vim)"
|
||||
command = "${EDITOR:-vim} '{}'"
|
||||
shell = "bash"
|
||||
# use `mode = "fork"` if you want to return to tv afterwards
|
||||
mode = "execute"
|
||||
|
||||
[actions.goto_parent_dir]
|
||||
description = "Re-opens tv in the parent directory"
|
||||
command = "tv files .."
|
||||
mode = "execute"
|
||||
Reference in New Issue
Block a user