diff --git a/group_vars/laptop.yml b/group_vars/laptop.yml index 91b9382f..86218093 100644 --- a/group_vars/laptop.yml +++ b/group_vars/laptop.yml @@ -1,4 +1,6 @@ --- + ### mgrote.tmux + tmux_auto_attach: absent ### mgrote.dotfiles dotfiles_repo_url: https://git.mgrote.net/mg/dotfiles dotfiles_repo_path: /home/mg/dotfiles diff --git a/roles/mgrote.tmux/defaults/main.yml b/roles/mgrote.tmux/defaults/main.yml index 18cd7cfc..324bc15c 100644 --- a/roles/mgrote.tmux/defaults/main.yml +++ b/roles/mgrote.tmux/defaults/main.yml @@ -2,3 +2,4 @@ tmux_conf_destination: "/home/mg/.tmux.conf" tmux_bashrc_destination: "/home/mg/.bashrc" tmux_standardsession_name: "default" + tmux_auto_attach: present # or absent; soll bei jedem shell-start automatisch eine tmux session erstellt oder attached werden diff --git a/roles/mgrote.tmux/tasks/main.yml b/roles/mgrote.tmux/tasks/main.yml index ad921be9..0dbf18a2 100644 --- a/roles/mgrote.tmux/tasks/main.yml +++ b/roles/mgrote.tmux/tasks/main.yml @@ -28,3 +28,4 @@ if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then tmux attach -t {{ tmux_standardsession_name }} || tmux new -s {{ tmux_standardsession_name }} fi + state: "{{ tmux_auto_attach }}"