Skip to content

Commit df55564

Browse files
authored
revert: do not autospawn tmux on login (#2126)
* revert: do not autospawn tmux on login * fix: adjust the timeout for tmux
1 parent 6e1eef6 commit df55564

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

ansible/files/tmux.conf.j2

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ bind -n M-Right select-pane -R
1818
bind -n M-Up select-pane -U
1919
bind -n M-Down select-pane -D
2020

21-
# Enable mouse control (clickable windows, panes, resizable panes)
22-
set -g mouse on
23-
2421
# DESIGN TWEAKS
2522

2623
# don't do anything when a 'bell' rings

ansible/tasks/setup-tmux.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
update_cache: true
66
become: true
77

8-
- name: tmux - Configure shell auto-logout
8+
- name: tmux - Configure tmux alias
99
ansible.builtin.copy:
1010
content: |
1111
case "$-" in
12-
*i*) export TMOUT=600 ;;
12+
*i*) alias tmux='tmux new-session -A -s supa' ;;
1313
esac
14-
dest: '/etc/profile.d/11-shell_timeout.sh'
14+
dest: '/etc/profile.d/11-tmux_alias.sh'
1515
group: 'root'
1616
mode: '0644'
1717
owner: 'root'
@@ -26,18 +26,17 @@
2626
src: 'files/tmux.conf.j2'
2727
become: true
2828

29-
- name: tmux - Auto-launch tmux as needed
29+
- name: tmux - Auto-logout from stale tmux
3030
ansible.builtin.copy:
3131
content: |
3232
case "$-" in
3333
*i*)
3434
case "$TERM" in
35-
tmux*) ;;
36-
*) tmux new-session -A -s supa ;;
35+
tmux*) export TMOUT=86400 ;;
3736
esac
3837
;;
3938
esac
40-
dest: '/etc/profile.d/12-tmux.sh'
39+
dest: '/etc/profile.d/12-tmux_logout.sh'
4140
group: 'root'
4241
mode: '0644'
4342
owner: 'root'

0 commit comments

Comments
 (0)