From 130ba2d1a5dcd5ba0743e706db54e6bb0b3504ca Mon Sep 17 00:00:00 2001 From: "David Todd (c0de)" Date: Sat, 10 Feb 2018 19:22:34 -0600 Subject: [PATCH] Attach tmux session upon entering shell If the tmux session "C0DE" does not already exist, it will be created --- shell/env | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shell/env b/shell/env index 3d3702e..d5ec83e 100644 --- a/shell/env +++ b/shell/env @@ -8,3 +8,8 @@ export LANGUAGE=en_US.UTF-8 # Paths export PATH=$PATH:${HOME}/bin:/usr/lib/wine/bin:/sbin:/usr/sbin:/usr/local/bin + +# Automatically attach tmux session "C0DE" upon entering a shell +if [[ -z "$TMUX" ]]; then + tmux attach -t C0DE || tmux new -s C0DE +fi