aboutsummaryrefslogtreecommitdiff
path: root/bin/tmux-send
diff options
context:
space:
mode:
authorNicholas Noll <nnoll523@gmail.com>2021-10-23 11:17:25 -0700
committerNicholas Noll <nnoll523@gmail.com>2021-10-26 11:11:57 -0700
commitc8e1e71eb526475dd431443345262c2e5a627831 (patch)
treeea9f7bcbba18a13f7ba8b32fcb1433ac2f4dd8b4 /bin/tmux-send
parent40f4c7305a041d4214df117491593898d04d0134 (diff)
chore(rename): libn -> base
Diffstat (limited to 'bin/tmux-send')
-rwxr-xr-xbin/tmux-send3
1 files changed, 1 insertions, 2 deletions
diff --git a/bin/tmux-send b/bin/tmux-send
index a1911f3..040ea7a 100755
--- a/bin/tmux-send
+++ b/bin/tmux-send
@@ -1,8 +1,7 @@
#!/bin/sh
dir=$1
-tty=$(tmux list-panes -F "#{pane_active}#{pane_tty}" | grep '^1' | cut -c2-)
-vim=$(ps -o stat=,command= -t $tty | awk 'BEGIN{flag=0} {if($1 ~ /S[a-z]*+/ && $2 ~ /nvim/){flag +=1}}; END {print flag}')
+vim=$(tmux display-message -p '#{pane_current_command} #{pane_title}' | grep -iq vim && echo 1)
if [ $vim -gt 0 ]; then
case $dir in