diff --git a/Dockerfile b/Dockerfile index f20ddc2..b4117c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,6 +59,8 @@ RUN apt-get update \ python3-openssl \ sudo \ tk-dev \ + tmux \ + tmuxp \ unixodbc-dev \ unzip \ uuid-dev \ @@ -130,7 +132,8 @@ ENV SHELL /usr/bin/bash # command line utilities RUN curl https://rtx.pub/install.sh | sh \ - && curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash + && curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash \ + && git clone https://github.com/tmux-plugins/tpm.git ${XDG_CONFIG_HOME}/tmux/plugins/tpm # git configuration COPY ./patch/kickstart.nvim/updates.patch /tmp diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf new file mode 100644 index 0000000..4191da8 --- /dev/null +++ b/config/tmux/tmux.conf @@ -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 + +# buffer size +set -g history-limit 50000 + +# list plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'Morantron/tmux-fingers' +set -g @plugin 'tmux-plugins/tmux-yank' +run '~/.config/tmux/plugins/tpm/tpm' diff --git a/config/tmuxp/dev.yml b/config/tmuxp/dev.yml new file mode 100644 index 0000000..a498974 --- /dev/null +++ b/config/tmuxp/dev.yml @@ -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 diff --git a/config/tmuxp/work.yml b/config/tmuxp/work.yml new file mode 100644 index 0000000..7287328 --- /dev/null +++ b/config/tmuxp/work.yml @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 84086e2..fd8a816 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,11 +9,15 @@ services: entrypoint: sleep command: infinity volumes: + - './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' - 'home_cache:/home/coder/.cache' - 'home_local_share:/home/coder/.local/share' - - './config/rtx:/home/coder/.config/rtx' - - './config/nvim/lua/custom:/home/coder/.config/nvim/lua/custom' + - 'home_plugins_tmux:/home/coder/.config/tmux/plugins' volumes: home_cache: {} home_local_share: {} + home_plugins_tmux: {}