feature: tmux configuration

This commit is contained in:
Michele Cereda
2023-05-09 00:21:28 +02:00
parent d651c2cb39
commit 497077669c
2 changed files with 121 additions and 0 deletions

51
examples/.tmux.conf Normal file
View File

@@ -0,0 +1,51 @@
################################################################################
## ~/.tmux.conf
################################################################################
###
# Tmux behavior
#################
set -g xterm-keys on
# scrollback size
set -g history-limit 100000
# enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
###
# Tmux visuals
#################
set -g default-terminal "screen-256color"
set -g status-right '#H %Y-%m-%d %H:%M'
###
# Window visuals
##################
# renumber windows when one is closed
set -g renumber-windows on
# set the terminals' title
set -g set-titles on
# rename a window to the current program
set-window-option -g automatic-rename on
###
# Activity monitor
####################
# highlight the active window
# set-window-option -g window-status-current-style 'bg=red dim'
# highlight a window's tab when it has activity
set -g monitor-activity on
# notify of a window's activity in the status bar
set -g visual-activity on

70
examples/ansible/tmux.yml Normal file
View File

@@ -0,0 +1,70 @@
---
# Sources:
# - https://github.com/tmux/tmux/wiki/
- name: Install and configure Tmux
hosts: all
tasks:
- name: Install Tmux's package
ansible.builtin.package:
name: tmux
- name: Write Tmux's configuration file
ansible.builtin.copy:
dest: "{{ ansible_user_dir }}/.tmux.conf"
mode: u=rw,go=r
content: |
################################################################################
## ~/.tmux.conf
################################################################################
###
# Tmux behavior
#################
set -g xterm-keys on
# scrollback size
set -g history-limit 100000
# enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
###
# Tmux visuals
#################
set -g default-terminal "screen-256color"
set -g status-right '#H %Y-%m-%d %H:%M'
###
# Window visuals
##################
# renumber windows when one is closed
set -g renumber-windows on
# set the terminals' title
set -g set-titles on
# rename a window to the current program
set-window-option -g automatic-rename on
###
# Activity monitor
####################
# highlight the active window
# set-window-option -g window-status-current-style 'bg=red dim'
# highlight a window's tab when it has activity
set -g monitor-activity on
# notify of a window's activity in the status bar
set -g visual-activity on
backup: true