wip
This commit is contained in:
23
.config/television/cable/recent-files.toml
Normal file
23
.config/television/cable/recent-files.toml
Normal file
@@ -0,0 +1,23 @@
|
||||
[metadata]
|
||||
name = "recent-files"
|
||||
description = "List recently modified files (via git or filesystem)"
|
||||
requirements = ["git", "fdfind", "batcat"]
|
||||
|
||||
[source]
|
||||
command = [
|
||||
"git diff --name-only HEAD~10 HEAD 2>/dev/null || find . -type f -mtime -7 -not -path '*/.*' 2>/dev/null | head -100",
|
||||
"fdfind -t f --changed-within 7d -E .git -E .cache -E node_modules -E .local/share/Trash",
|
||||
]
|
||||
|
||||
[preview]
|
||||
command = "batcat -n --color=always '{}'"
|
||||
env = { BAT_THEME = "ansi" }
|
||||
|
||||
[keybindings]
|
||||
ctrl-e = "actions:edit"
|
||||
|
||||
[actions.edit]
|
||||
description = "Open the selected file in editor"
|
||||
command = "${EDITOR:-vim} '{}'"
|
||||
shell = "bash"
|
||||
mode = "execute"
|
||||
Reference in New Issue
Block a user