Return of the tmux
This commit is contained in:
parent
6dfd7d5f8e
commit
1a1acba0e7
8 changed files with 47 additions and 104 deletions
4
bin/tmux-build-helper
Executable file
4
bin/tmux-build-helper
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -ef -o pipefail
|
||||
eval "$(direnv export bash)"
|
||||
eval "${BUILD_COMMAND:-echo 'BUILD_COMMAND not set'}" | bat --paging=always
|
|
@ -16,14 +16,11 @@ fi
|
|||
|
||||
_nvim_socket="$XDG_RUNTIME_DIR/nvim-persistent.sock"
|
||||
|
||||
function _nvim_setenv() {
|
||||
nvim --server "$_nvim_socket" --remote-expr "execute(\"let \$${1} = \\\"${2}\\\"\")" 2>&1 >/dev/null
|
||||
}
|
||||
|
||||
_nvim_setenv BUILD_COMMAND "$BUILD_COMMAND"
|
||||
_nvim_setenv GOPACKAGESDRIVER "$GOPACKAGESDRIVER"
|
||||
_nvim_setenv GOFLAGS "$GOFLAGS"
|
||||
tmux select-window -t nvim 2>/dev/null ||
|
||||
tmux new-window -S -n nvim \
|
||||
-e "BUILD_COMMAND=$BUILD_COMMAND" \
|
||||
-e "GOPACKAGESDRIVER=$GOPACKAGESDRIVER" \
|
||||
-e "GOFLAGS=$GOFLAGS" \
|
||||
nvim --listen "$_nvim_socket"
|
||||
|
||||
nvim --server "$_nvim_socket" --remote "$_file"
|
||||
|
||||
printf "\033]1337;SetUserVar=%s=%s\007" nvim_activate $(date +%s | base64)
|
Loading…
Add table
Add a link
Reference in a new issue