kak and niri
This commit is contained in:
parent
23ebcfbfb6
commit
a7b0020125
3 changed files with 550 additions and 0 deletions
32
kak/tv/tv.kak
Normal file
32
kak/tv/tv.kak
Normal file
|
@ -0,0 +1,32 @@
|
|||
# define-command run-tv %{ evaluate-commands %sh{
|
||||
# # Create a temporary fifo for communication
|
||||
# tv_tmp="$(mktemp -d "${TMPDIR:-/tmp}"/tv.kak.XXXXXX)"
|
||||
|
||||
|
||||
# tv_out="${tv_tmp}/tvcmd"
|
||||
# result="${tv_tmp}/result"
|
||||
|
||||
# mkfifo ${tv_out}
|
||||
|
||||
# # run command detached from the shell
|
||||
# { tv > ${tv_out} } > /dev/null 2>&1 < /dev/null &
|
||||
|
||||
# # Open the file in Kakoune and add a hook to remove the fifo
|
||||
# echo "edit! -fifo ${tv_out} *buffer-name*
|
||||
# hook buffer BufClose .* %{ nop %sh{ rm -r $(dirname ${tv_tmp})} }"
|
||||
|
||||
# }
|
||||
# }
|
||||
#
|
||||
#
|
||||
define-command bla %{ evaluate-commands %sh{
|
||||
# Create a temporary fifo for communication
|
||||
output=$(mktemp -d -t kak-temp-XXXXXXXX)/fifo
|
||||
mkfifo ${output}
|
||||
# run command detached from the shell
|
||||
{ lazygit > ${output} } > /dev/null 2>&1 < /dev/null &
|
||||
# Open the file in Kakoune and add a hook to remove the fifo
|
||||
echo "edit! -fifo ${output} *buffer-name*
|
||||
hook buffer BufClose .* %{ nop %sh{ rm -r $(dirname ${output})} }"
|
||||
} }
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue