diff options
| author | Mike Vink <mike.vink@stater.nl> | 2023-05-26 17:01:26 +0000 |
|---|---|---|
| committer | Mike Vink <mike.vink@stater.nl> | 2023-05-26 17:01:26 +0000 |
| commit | b8e8e1a291eb2af25107c4e5de956132d61636ec (patch) | |
| tree | efe4f6236be812a4436a84de33222721d7895c97 /shell-scripts | |
| parent | 21062025f02747987ccb9692742d9c2b4dec4af8 (diff) | |
fix bugs
Diffstat (limited to 'shell-scripts')
| -rw-r--r-- | shell-scripts/tmux-normal-mode | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/shell-scripts/tmux-normal-mode b/shell-scripts/tmux-normal-mode new file mode 100644 index 0000000..0a956e2 --- /dev/null +++ b/shell-scripts/tmux-normal-mode @@ -0,0 +1,11 @@ +kakoune_session="$(tmux display-message -p "#{window_name}" | sed "s/kakc@//")" +dispatch_name="dispatch://$(tmux display-message -p "#{pane_start_command}")" +output=$(mktemp -d /tmp/kak-tmux.XXXXXXXX)/fifo +mkfifo ${output} +( tmux capture-pane -S '-' -E '-' -J -e -p -t $TMUX_PANE | filter-ansi >${output} & ) +tmux new-window -t kaks@$kakoune_session -n "$dispatch_name" -d " + kak -c '$kakoune_session' -e \"edit -fifo ${output} -scroll '${dispatch_name}';\ + set-option buffer readonly true ;\ + set-option window filetype dispatch ;\ + hook -always -once buffer BufCloseFifo .* %{ nop %sh{ rm -r $(dirname ${output}) } }\"" +tmux swap-pane -s kaks@$kakoune_session:"$dispatch_name".0 -t : |
