tmux: Add controller configuration into auto-generation aswell

This commit is contained in:
Johanna Dorothea Reichmann 2019-05-29 19:49:29 +02:00
parent 7e2a5118ec
commit 6f5077f327
Signed by: transcaffeine
GPG Key ID: 03624C433676E465
3 changed files with 69 additions and 24 deletions

View File

@ -4,9 +4,15 @@
package: package:
name: tmux name: tmux
state: present state: present
ignore_errors: true
- name: Template config file into home folder - name: Template config file into home folder
template: template:
src: tmux.conf.j2 src: tmux.conf.j2
dest: ~/.tmux.conf dest: ~/.tmux.conf
- name: Template controller config file to home folder
template:
src: controller.tmux.conf.j2
dest: ~/.controller.tmux.conf

View File

@ -0,0 +1,39 @@
# Reload controller config with "r" key
unbind t
bind t source-file ~/.controller.tmux.conf \; display-message "Controller config reloaded..."
# No automatic renaming of windows
set -g automatic-rename off
# Enable 256-color terminal
set -g default-terminal "screen-256color"
# Set titles to be informative
set set-titles on
set set-titles-string "tmux: [#H] [#S] [#W:#D #I:#P]"
# Change colors on the pane seperators
set pane-border-fg colour237
set pane-active-border-fg colour27
# Tweak currently highlighted window ('active')
setw window-status-current-fg colour236
setw window-status-current-bg colour27
setw window-status-current-format " #F[#W] "
setw window-status-current-attr none
# Tweak overview of windows
setw window-status-format " #F[#I][#W] "
setw window-status-bg colour237
setw window-status-fg colour255
# Tweak status line design
set status-bg colour237
set status-fg colour27
set status-justify centre
set status-left " [#H] [#S] "
set status-left-length 100
set status-right ' [#(curl https://wttr.in/berlin?format=3)] [%Y-%m-%d %H:%M.%S] '
# Refresh status bar every second
set status-interval 1

View File

@ -2,39 +2,39 @@
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# No automatic renaming of windows # No automatic renaming of windows
set -g automatic-rename off set automatic-rename off
# Enable 256-color terminal # Enable 256-color terminal
set -g default-terminal "screen-256color" set default-terminal "screen-256color"
# Set titles to be informative # Set titles to be informative
set -g set-titles on set set-titles on
set -g set-titles-string "tmux: [#H] [#S] [#W:#D #I:#P]" set set-titles-string "tmux: [#H] [#S] [#W:#D #I:#P]"
# Install tmux-plugin-manager, first run `git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm` # Change pane colors
#set -g @plugin 'tmux-plugins/tpm' set pane-border-fg colour237
#set -g @plugin 'tmux-plugins/tmux-sensible' set pane-active-border-fg colour199
# Tweak currently highlighted pane # Tweak currently active window
setw -g window-status-current-fg colour236 setw window-status-current-fg colour236
setw -g window-status-current-bg colour199 setw window-status-current-bg colour199
setw -g window-status-current-format " #F[#W] " setw window-status-current-format " #F[#W] "
setw -g window-status-current-attr none setw window-status-current-attr none
# Tweak pane display # Tweak display of window overview
setw -g window-status-format " #F[#W][#I] " setw window-status-format " #F[#W][#I] "
setw -g window-status-bg colour237 setw window-status-bg colour237
setw -g window-status-fg colour255 setw window-status-fg colour255
# Tweak status line design # Tweak status line design
set -g status-bg colour235 set status-bg colour235
set -g status-fg colour199 set status-fg colour199
set -g status-justify centre set status-justify centre
set -g status-left " [#H] [#S] " set status-left " [#H] [#S] "
set -g status-left-length 100 set status-left-length 100
set -g status-right '[FFKA: #(ip addr show freifunk | grep inet6 | grep -v fe80 | cut -d/ -f1 | cut -d " " -f6)] [%Y-%m-%d %H:%M.%S]' set status-right '[FFKA: #(ip addr show freifunk | grep inet6 | grep -v fe80 | cut -d/ -f1 | cut -d " " -f6)] [%Y-%m-%d %H:%M.%S]'
# Refresh status bar every 5s # Refresh status bar every 2s
set -g status-interval 5 set status-interval 2
# Initialize tmux-plugin-manager # Initialize tmux-plugin-manager
run '~/.tmux/plugins/tpm/tpm' run '~/.tmux/plugins/tpm/tpm'