mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-03 01:50:12 +00:00
WIP
This commit is contained in:
parent
aac7e4dc45
commit
61ebc72355
46
cable/unix/files.toml
Normal file
46
cable/unix/files.toml
Normal file
@ -0,0 +1,46 @@
|
||||
[metadata]
|
||||
name = "files"
|
||||
description = "A channel to select files and directories"
|
||||
requirements = ["fd", "bat"]
|
||||
|
||||
[source]
|
||||
command = "fd -t f"
|
||||
interactive = false
|
||||
|
||||
[entry]
|
||||
# only show the last path segment ('/a/b/c' -> 'c')
|
||||
template = "{split:/-1}"
|
||||
ansi = false
|
||||
|
||||
[output]
|
||||
# output the entire path when selecting entries
|
||||
template = "{}"
|
||||
|
||||
[preview]
|
||||
command = "bat -n --color=always {}"
|
||||
env = { "BAT_THEME" = "ansi" }
|
||||
|
||||
[ui]
|
||||
layout = "landscape"
|
||||
scale = 100
|
||||
show_help = false
|
||||
show_preview = true
|
||||
input_position = "bottom"
|
||||
|
||||
[keymap]
|
||||
quit = ["esc", "ctrl-c"]
|
||||
select_next_entry = ["down", "ctrl-n", "ctrl-j"]
|
||||
select_prev_entry = ["up", "ctrl-p", "ctrl-k"]
|
||||
confirm_selection = "enter"
|
||||
|
||||
[actions.'open in $EDITOR']
|
||||
command = "$EDITOR {}"
|
||||
mode = "become" # "become" / "spawn" / "transform"
|
||||
|
||||
[actions.'remove']
|
||||
command = "rm {}"
|
||||
mode = "spawn"
|
||||
|
||||
[actions.'rename']
|
||||
command = "read -p \"New name: \" new_name && mv {} $new_name"
|
||||
mode = "spawn"
|
Loading…
x
Reference in New Issue
Block a user