summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2018-01-18 12:15:26 +0100
committerUrbain Vaes <urbain@vaes.uk>2018-01-18 12:15:26 +0100
commit92f20897231932fc92ea9c03e0d974e6db66ff55 (patch)
tree96bad61273b729e36618e7dafb98e11882da26d7
parent2d8ca280c9db6cba94d7110e18604e5754e326a0 (diff)
[tmux_attach] Open tmux session in workspace of the same name
-rwxr-xr-xbin/bin/tmux_attach2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/bin/tmux_attach b/bin/bin/tmux_attach
index 9d5488a..80add99 100755
--- a/bin/bin/tmux_attach
+++ b/bin/bin/tmux_attach
@@ -7,6 +7,8 @@ UNION=$(cat <(echo "$SESSIONS") <(echo "$TMUXINATOR") | sort | uniq | sed "/^$/d
SESSION=$(echo "$UNION" | dmenu -i -p "Session:" | tr -d '[[:space:]]')
[[ -n $SESSION ]] || exit
+# Rename i3 workspace
+command -v i3-msg && i3-msg workspace "$SESSION"
grep -Fxq "$SESSION" <(echo "$TMUXINATOR") \
&& COMMAND="tmuxinator start $SESSION" \