feat: add tmux and tmuxp

Also add the respective configurations.
This commit is contained in:
Joao P Dubas 2023-10-11 11:25:13 +00:00
parent 2c083afa56
commit 742b5307ee
6 changed files with 156 additions and 0 deletions

View File

@ -59,6 +59,8 @@ RUN apt-get update \
python3-openssl \
sudo \
tk-dev \
tmux \
tmuxp \
unixodbc-dev \
unzip \
uuid-dev \

99
config/tmux/tmux.conf Normal file
View File

@ -0,0 +1,99 @@
# Based on:
# https://github.com/henrik/dotfiles/blob/master/tmux.conf
# Remap Prefix to C-a
unbind C-b
set -g prefix C-a
# Improve pane split
bind | split-window -h
bind - split-window -v
# Improve pane move
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Improve window move
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Improve resize pane
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Enable vim keys
set-window-option -g mode-keys vi
# Make [shift]-arrows, [ctrl]-arrows, etc work in vim
set -g xterm-keys on
# Attempt to fixes slows [esc] issues
set -s escape-time 0
# Disable mouse
# set -g mode-mouse off
# Status bar styling and content
set -g status-bg black
set -g status-fg white
# set -g status-left "#$"
# Highlight the active window in the status bar
set-window-option -g window-status-current-bg yellow
set-window-option -g window-status-current-fg black
# Don't prompt to kill panes/windows
bind-key x kill-pane
bind-key & kill-window
# Reload tmux conf
unbind r
bind r source-file ~/.tmux.conf\; display "Reloaded conf."
# Full color for vim
set -g default-terminal "screen-256color"
#### COLOUR (Solarized 256)
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
# list plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'Morantron/tmux-fingers'
set -g @plugin 'tmux-plugins/tmux-yank'
run '~/.tmux/plugins/tpm/tpm'
# buffer size
set -g history-limit 50000

23
config/tmuxp/dev.yml Normal file
View File

@ -0,0 +1,23 @@
---
session_name: dev
start_directory: /opt/work
windows:
- window_name: main
layout: even-vertical
focus: true
panes:
- focus: true
- pane
- window_name: support
layout: even-vertical
start_directory: support
panes:
- shell_command:
- docker compose exec pgcli bash
- pane
- window_name: local
layout: even-vertical
start_directory: local
panes:
- pane
- pane

15
config/tmuxp/personal.yml Normal file
View File

@ -0,0 +1,15 @@
session_name: personal
start_directory: /opt/personal
windows:
- window_name: labs
focus: true
layout: even-vertical
start_directory: labs/
panes:
- focus: true
- pane
- window_name: ide
layout: even-vertical
panes:
- focus: true
- pane

15
config/tmuxp/work Normal file
View File

@ -0,0 +1,15 @@
session_name: personal
start_directory: /opt/personal
windows:
- window_name: labs
focus: true
layout: even-vertical
start_directory: labs/
panes:
- focus: true
- pane
- window_name: ide
layout: even-vertical
panes:
- focus: true
- pane

View File

@ -12,6 +12,8 @@ services:
- 'home_cache:/home/coder/.cache'
- 'home_local_share:/home/coder/.local/share'
- './config/rtx:/home/coder/.config/rtx'
- './config/tmux:/home/coder/.config/tmux'
- './config/tmuxp:/home/coder/.config/tmuxp'
- './config/nvim/lua/custom:/home/coder/.config/nvim/lua/custom'
volumes: