commit c29162a8ae4621240671deec750de51cda2fc9e4 parent f360a25275d2467cc5a275a1fcc0cc78d4bd52d9 Author: Jacob R. Edwards <jacobouno@protonmail.com> Date: Sun, 30 Aug 2020 11:42:24 -0700 Add script to attach to tmux sessions Diffstat:
| A | scripts/.local/bin/tat | | | 15 | +++++++++++++++ |
| M | sxhkd/.config/sxhkd/sxhkdrc | | | 2 | +- |
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/scripts/.local/bin/tat b/scripts/.local/bin/tat @@ -0,0 +1,15 @@ +#!/usr/bin/env ksh +# attach to tmux session via an external menu + +list() { tmux ls | cut -d: -f1 ;} + +if [ "$1" = "-e" ] && [ -n "$DISPLAY" ] +then + $TERMINAL -e tmux a -t`list | dmenu` & +else + select session in `list` + do + tmux a -t${session:?None selected.} + break; + done +fi diff --git a/sxhkd/.config/sxhkd/sxhkdrc b/sxhkd/.config/sxhkd/sxhkdrc @@ -4,7 +4,7 @@ super + t # attach to tmux session super + shift + t - $TERMINAL -e tmux a -t`tmux ls | cut -d: -f1 | dmenu` + tat -e # browser super + f