diff options
author | Urbain Vaes <urbain@vaes.uk> | 2016-03-08 11:49:33 +0000 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2016-03-08 11:49:33 +0000 |
commit | 164e54bafc7c6450ce71f9571d5b774cff310557 (patch) | |
tree | 96c6ab2409041351a03728ed9687b100d93bf34e /bin/tmux_attach | |
parent | d8c21e3fb1e0380c3c61265ea647b5365574059a (diff) |
Add Khoi's scripts
Diffstat (limited to 'bin/tmux_attach')
-rwxr-xr-x | bin/tmux_attach | 9 |
1 files changed, 9 insertions, 0 deletions
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" |