mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 19:32:43 +00:00
feat(cable): add extensive television cable channel configurations and related files
This commit is contained in:
1 parent
7c786f9349
commit
e9a7fd1fde
72 files changed
+2101
No files matched your search
@@ -0,0 +1,36 @@
|
||||
[metadata]
|
||||
name = "opencode-sessions"
|
||||
description = "Browse and resume OpenCode sessions"
|
||||
requirements = ["opencode", "jq"]
|
||||
|
||||
[source]
|
||||
# Use literal strings (''') to avoid escape sequence errors
|
||||
command = '''opencode session list --format json | jq -r '.[] | "\(.id)\t\(.title)\t\(.directory)"' '''
|
||||
display = "{split:\t:1} ({split:\t:2})"
|
||||
output = "{split:\t:0}"
|
||||
|
||||
[preview]
|
||||
# We use triple single quotes so we don't have to escape the backslashes for jq or the template engine
|
||||
command = '''opencode session list --format json | jq -r '.[] | select(.id == "{split:\t:0}") | "TITLE: \(.title)\nID: \(.id)\nPROJECT: \(.projectId)\nDIRECTORY: \(.directory)\nUPDATED: \((.updated / 1000) | strftime("%Y-%m-%d %H:%M:%S"))"' '''
|
||||
|
||||
[ui]
|
||||
layout = "landscape"
|
||||
[ui.preview_panel]
|
||||
size = 60
|
||||
header = "Session: {split:\t:1}"
|
||||
border_type = "rounded"
|
||||
|
||||
[keybindings]
|
||||
shortcut = "f4"
|
||||
enter = "actions:resume"
|
||||
ctrl-d = "actions:delete"
|
||||
|
||||
[actions.resume]
|
||||
description = "Resume session"
|
||||
command = "opencode -s {split:\t:0}"
|
||||
mode = "execute"
|
||||
|
||||
[actions.delete]
|
||||
description = "Delete session"
|
||||
command = '''bash -c 'echo "Delete {split:\t:1}?" && read -p "[y/N]: " conf && [[ $conf == "y" ]] && opencode session delete {split:\t:0} ' '''
|
||||
mode = "execute"
|
||||
Reference in new issue
Block a user