diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2022-08-09 19:48:10 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2022-08-09 19:48:10 +1200 |
commit | 50f43cb8f7b25bcc87ad27ebfd302fc26038719a (patch) | |
tree | c80e77ab6c9cca94fefe72ac480597ab52de9c17 | |
parent | Merge branch 'release/v12.19.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-50f43cb8f7b25bcc87ad27ebfd302fc26038719a.tar.gz dotfiles-50f43cb8f7b25bcc87ad27ebfd302fc26038719a.zip |
Merge branch 'release/v12.20.0'v12.20.0
* release/v12.20.0:
Set default tm(1df) session name with file not env
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | bin/tm.sh | 7 |
2 files changed, 8 insertions, 3 deletions
@@ -1,2 +1,2 @@ -tejr dotfiles v12.19.0 -Tue, 09 Aug 2022 07:26:36 +0000 +tejr dotfiles v12.20.0 +Tue, 09 Aug 2022 07:48:02 +0000 @@ -1,5 +1,10 @@ # Attach to existing tmux session rather than create a new one if possible +# Source config if it exists (just the session name, really) +if [ -e "${XDG_CONFIG_HOME:-"$HOME"/.config}"/tm/config ] ; then + . "${XDG_CONFIG_HOME:-"$HOME"/.config}"/tm/config || exit +fi + # If given any arguments, just use them as they are if [ "$#" -gt 0 ] ; then : @@ -10,7 +15,7 @@ elif tmux has-session 2>/dev/null ; then # Create a new session with an appropriate name else - set -- new-session -s "${TMUX_SESSION:-default}" + set -- new-session -s "${default_session_name:-default}" fi # Execute with concluded arguments |