From 164e54bafc7c6450ce71f9571d5b774cff310557 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 8 Mar 2016 11:49:33 +0000 Subject: Add Khoi's scripts --- bin/tmux_attach | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 bin/tmux_attach (limited to 'bin/tmux_attach') diff --git a/bin/tmux_attach b/bin/tmux_attach new file mode 100755 index 0000000..564e3bb --- /dev/null +++ b/bin/tmux_attach @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +SESSIONS=$(tmux list-sessions | cut -d':' -f1) + +SESSION=$(echo "$SESSIONS" | dmenu -i -p "Session:" | tr -d '[[:space:]]') + +[[ -n $SESSION ]] || exit + +urxvt -e zsh -c "tmux new-session -A -s $SESSION" -- cgit v1.2.3