Skip to content

Commit

Permalink
Provide tmux-bind-q-kill-pane hook
Browse files Browse the repository at this point in the history
This binds kill-pane to `q` (without prefix), similar to how old apt-dater+screen worked.
  • Loading branch information
stbuehler committed Oct 17, 2017
1 parent 9b29a2c commit ae285d4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXTRA_DISTS=cmd hosts2xml ssh-addonce tmux-hint pcre-less
EXTRA_DISTS=cmd hosts2xml ssh-addonce tmux-bind-q-kill-pane tmux-hint pcre-less

install-exec-hook:
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
Expand Down
2 changes: 1 addition & 1 deletion lib/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DISTS = cmd hosts2xml ssh-addonce tmux-hint pcre-less
EXTRA_DISTS = cmd hosts2xml ssh-addonce tmux-bind-q-kill-pane tmux-hint pcre-less
all: all-am

.SUFFIXES:
Expand Down
16 changes: 16 additions & 0 deletions lib/tmux-bind-q-kill-pane
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

if [ -z "$TMUX_PANE" ]; then
exit 0
fi

case "$AD_ACTION" in
refresh)
;;

*)
tmux bind-key -T root q kill-pane
;;
esac

exit 0

0 comments on commit ae285d4

Please sign in to comment.