feat(config): add television cable integration and related keybindings across shells

This commit is contained in:
Prad Nukala committed 2026-09-30 11:14:14 -04:00
1 parent f033b29a7d
commit 3c4af515fa
12 files changed
+137 -21

No files matched your search

+4 -4
View File
@@ -1,4 +1,4 @@
function _pj_bind_down --description "down arrow: pj on an idle empty prompt, else fish's down-or-search"
function _pj_bind_down --description "down arrow: pj tv cable on an idle empty prompt, else fish's down-or-search"
# Mirror of atuin's up binding (atuin owns up, this owns down). Everything
# that legitimately needs the arrow keys keeps them:
# - non-empty buffer → multiline cursor movement / forward history search
@@ -13,9 +13,9 @@ function _pj_bind_down --description "down arrow: pj on an idle empty prompt, el
return
end
# pj is ~/.local/bin/pj (shared with the zsh ctrl-p binding). PJ_QUIET
# keeps it silent when the tree has no task source at all, so down is a
# no-op outside projects instead of printing an error on every press.
# pj is ~/.local/bin/pj (also ctrl-p), which opens the `pj` tv cable.
# PJ_QUIET keeps it silent when the tree has no task source at all, so
# down is a no-op outside projects instead of printing an error per press.
PJ_QUIET=1 pj
commandline -f repaint
end
@@ -10,8 +10,9 @@ function fish_user_key_bindings
# Keys owned by kitty.conf never reach fish and are NOT bound here:
# ctrl-g → lazygit overlay, ctrl-a → omp hsplit, ctrl-y → yazi vsplit,
# ctrl-h/j/k/l → vim-aware split nav (pass_keys.py).
# ctrl-e: yazi, same as ctrl-f (cd's to yazi's exit dir on quit).
bind -M $mode ctrl-e 'yy; commandline -f repaint'
# ctrl-e: tv git-files (bat preview, enter opens nvim). ctrl-o, ctrl-p
# and down also open tv cables — same keys in zsh and bash.
bind -M $mode ctrl-e 'tv git-files; commandline -f repaint'
bind -M $mode ctrl-b purple repaint
bind -M $mode ctrl-y clip-last
@@ -22,10 +23,11 @@ function fish_user_key_bindings
# Arrow keys: atuin owns up (bound from config.fish, survives the
# fish_vi_key_bindings reset above because that only erases presets),
# down runs pj — but only on an idle, empty prompt; see _pj_bind_down.
# down opens the pj tv cable — but only on an idle, empty prompt; see
# _pj_bind_down.
bind -M $mode down _pj_bind_down
# ctrl-f: pick file(s) with television and open in nvim.
# ctrl-f: yazi (cd's to yazi's exit dir on quit).
bind -M $mode ctrl-f 'yy; commandline -f repaint'
bind -M $mode ctrl-g 'lazygit; commandline -f repaint'
+3 -2
View File
@@ -1,5 +1,6 @@
function gho --description 'pick ghq repo / Obsidian vault + cd (picker in ~/.local/bin/gho)'
set -l dir (command gho); or return
function gho --description 'pick a ghq repo / Obsidian vault (tv ghq-repos cable) + cd'
set -l dir (tv ghq-repos); or return
test -n "$dir"; or return
cd $dir; or return
clear
if test -d .git