diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2022-08-09 19:47:36 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2022-08-09 19:47:36 +1200 |
commit | 7d92f42d23ce9603a42638ff34e605af3e1599aa (patch) | |
tree | e1c3d1380ba39cbb03dfffb67e31a039c2daa31a | |
parent | Merge branch 'release/v12.19.0' into develop (diff) | |
download | dotfiles-7d92f42d23ce9603a42638ff34e605af3e1599aa.tar.gz dotfiles-7d92f42d23ce9603a42638ff34e605af3e1599aa.zip |
Set default tm(1df) session name with file not env
-rw-r--r-- | bin/tm.sh | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |