Move tmux and screen configs to Ansible role

This commit is contained in:
Eryn Wells 2024-10-02 19:55:27 -07:00
parent bc4b9f8089
commit 01312752fc
4 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,27 @@
# .screenrc
# Eryn Wells <eryn@3b518c.com>
autodetach on
altscreen on
defflow auto
defscrollback 10000
defutf8 on
startup_message off
bind j focus down
bind k focus up
bind s split
activity "%c activity -> %n%f %t"
bell "%c bell -> %n%f %t^G"
msgwait 1
vbell off
hardstatus alwayslastline
hardstatus string "%{wk}[ %?%-Lw%?%{Rk}%n*%f %t%{Wk}%+Lw%?%= ][ %{Bk}%c %Y-%m-%d%{wk} ]"
#escape ^ee
screen -t 'mail' mutt
screen $SHELL

View file

@ -0,0 +1,70 @@
# tmux config
# Eryn Wells <eryn@erynwells.me>
set -g prefix C-f
# Don't destroy sessions that have no clients attached.
set -g exit-unattached off
set -g default-terminal "screen-256color"
set -g history-limit 10000
# Bells from everywhere
set -g bell-action any
set -g visual-bell off
# Pass xterm titles through
set -g set-titles on
set -g set-titles-string "#T"
set -g allow-rename on
# Use vi keys for copy mode
set -g mode-keys vi
set -g repeat-time 0
# Bring over the SSH agent environment
set -g update-environment "SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION"
#
# STATUS BAR
#
set -g status-style bg=black
set -g status-left " #S "
set -g status-left-style bg=green,fg=black
set -g status-right "#[bg=red,fg=white] #h #[bg=blue,fg=white] %a %b %e, %R #[default]"
# Start window and pane indexing from 1 instead of 0
set -g base-index 1
set -g pane-base-index 1
# Tabs like this: "(<index>:<window_name>)"
setw -g window-status-style "fg=white,bg=black"
setw -g window-status-format " #{?#{==:#W,tmux},...,#I} #W "
setw -g window-status-current-style "fg=white,bg=blue"
#setw -g window-status-current-format " #I #W "
setw -g window-status-current-format " #{?#{==:#W,tmux},...,#I} #W "
setw -g window-status-separator ""
set -g window-status-bell-style "bg=red"
set -g window-status-activity-style "bg=red"
set -g alternate-screen on
set -g clock-mode-style 24
# Lock the screen after 120 seconds
set -g lock-after-time 0
set -g lock-command "tmux clock-mode"
#
# KEY BINDINGS
#
bind-key C-a last-window
# TODO: Decide if this should have a -n (allow invoking the command without the leader).
bind-key C-k clear-history
bind-key C-h select-pane -L
bind-key C-j select-pane -D
bind-key C-k select-pane -U
bind-key C-l select-pane -R

View file

@ -1,9 +1,15 @@
---
- name: ZSH
ansible.builtin.include_tasks: zsh.yml
tags: dotfiles_zsh
- name: Vim
ansible.builtin.include_tasks: vim.yml
tags: dotfiles_vim
- name: Git
ansible.builtin.include_tasks: git.yml
tags: dotfiles_git
- name: Shell utilities
ansible.builtin.include_tasks: shell_utilities.yml

View file

@ -0,0 +1,16 @@
---
- name: (tmux) Link tmux.conf
ansible.builtin.file:
path: ~/.tmux.conf
src: "{{ role_path }}/files/tmux/tmux.conf"
state: link
force: true
tags: dotfiles_tmux
- name: (screen) Link screenrc
ansible.builtin.file:
path: ~/.screenrc
src: "{{ role_path }}/files/screen/screenrc"
state: link
force: true
tags: dotfiles_screen