From 1b1b5fde0e116d041f5c54643af5cb04b3adfea1 Mon Sep 17 00:00:00 2001 From: Marcus Kammer Date: Wed, 1 Nov 2023 09:27:18 +0100 Subject: [PATCH] Write .tmux.conf file --- sbcl-nginx.yml | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sbcl-nginx.yml b/sbcl-nginx.yml index d04feac..edacad7 100644 --- a/sbcl-nginx.yml +++ b/sbcl-nginx.yml @@ -322,6 +322,62 @@ write_files: /bin/bash /home/marcus/setup_git.sh /bin/bash /home/marcus/setup_repos.sh + - path: /home/marcus/.tmux.conf + owner: 'marcus:marcus' + permissions: '0755' + defer: True + content: | + # Improve colors and set TERM correctly inside tmux + set -g default-terminal "screen-256color" + + # Set prefix key to Ctrl-a, like GNU Screen + unbind C-b + set -g prefix C-a + bind C-a send-prefix + + # Enable mouse support + set -g mouse on + + # Use Alt-arrow keys to switch panes + bind -n M-Left select-pane -L + bind -n M-Right select-pane -R + bind -n M-Up select-pane -U + bind -n M-Down select-pane -D + + # Use Alt+h/j/k/l to resize panes + bind -n M-h resize-pane -L 2 + bind -n M-j resize-pane -D 2 + bind -n M-k resize-pane -U 2 + bind -n M-l resize-pane -R 2 + + # Split panes with | and - + bind | split-window -h + bind - split-window -v + + # Reload tmux config + bind r source-file ~/.tmux.conf + + # Quick pane cycling + unbind ^A + bind ^A select-pane -t :.+ + + # Enable clipboard support on macOS + # Uncomment the line below if you are on macOS and have reattach-to-user-namespace installed + # set-option -g default-command "reattach-to-user-namespace -l $SHELL" + + # Set status bar + set -g status-bg black + set -g status-fg white + set -g status-interval 5 + set -g status-left "#[fg=green]#H" + set -g status-right "#[fg=yellow]#(date '+%Y-%m-%d %H:%M')" + + # Highlight active window in status bar + setw -g window-status-current-bg red + + # Increase history limit + set -g history-limit 50000 + runcmd: # Generate the en_US.UTF-8 locale - locale-gen en_US.UTF-8