From 06b317220a16ec510c0e092f860396f840642a29 Mon Sep 17 00:00:00 2001 From: ipu Date: Sun, 24 Nov 2024 12:09:06 +0300 Subject: [PATCH] add tmux config --- tmux/.config/tmuxinator/algo.yml | 51 +++++++++++++++++ tmux/.config/tmuxinator/bootdev-cpp.yml | 51 +++++++++++++++++ .../tmuxinator/bootdev-static-site-gen.yml | 53 ++++++++++++++++++ tmux/.config/tmuxinator/work-ape.yml | 55 +++++++++++++++++++ tmux/.tmux.conf | 19 +++++++ tmux/.tmux/plugins/tmux-gruvbox | 1 + tmux/.tmux/plugins/tmux-resurrect | 1 + tmux/.tmux/plugins/tmux-sensible | 1 + tmux/.tmux/plugins/tpm | 1 + 9 files changed, 233 insertions(+) create mode 100644 tmux/.config/tmuxinator/algo.yml create mode 100644 tmux/.config/tmuxinator/bootdev-cpp.yml create mode 100644 tmux/.config/tmuxinator/bootdev-static-site-gen.yml create mode 100644 tmux/.config/tmuxinator/work-ape.yml create mode 100644 tmux/.tmux.conf create mode 160000 tmux/.tmux/plugins/tmux-gruvbox create mode 160000 tmux/.tmux/plugins/tmux-resurrect create mode 160000 tmux/.tmux/plugins/tmux-sensible create mode 160000 tmux/.tmux/plugins/tpm diff --git a/tmux/.config/tmuxinator/algo.yml b/tmux/.config/tmuxinator/algo.yml new file mode 100644 index 0000000..693e71e --- /dev/null +++ b/tmux/.config/tmuxinator/algo.yml @@ -0,0 +1,51 @@ +# /home/ipu/.config/tmuxinator/algo.yml + +name: algo +root: ~/Code/my/algo/ + +# Optional tmux socket +# socket_name: foo + +# Note that the pre and post options have been deprecated and will be replaced by +# project hooks. + +# Project hooks + +# Runs on project start, always +# on_project_start: command + +# Run on project start, the first time +# on_project_first_start: command + +# Run on project start, after the first time +# on_project_restart: command + +# Run on project exit ( detaching from tmux session ) +# on_project_exit: command + +# Run on project stop +# on_project_stop: command + +# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. +# pre_window: rbenv shell 2.0.0-p247 + +# Pass command line options to tmux. Useful for specifying a different tmux.conf. +# tmux_options: -f ~/.tmux.mac.conf + +# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. +# tmux_command: byobu + +# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. +# startup_window: editor + +# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. +# startup_pane: 1 + +# Controls whether the tmux session should be attached to automatically. Defaults to true. +# attach: false + +windows: + - editor: + - nvimp . + - shell: + - diff --git a/tmux/.config/tmuxinator/bootdev-cpp.yml b/tmux/.config/tmuxinator/bootdev-cpp.yml new file mode 100644 index 0000000..2660ea2 --- /dev/null +++ b/tmux/.config/tmuxinator/bootdev-cpp.yml @@ -0,0 +1,51 @@ +# /home/ipu/.config/tmuxinator/bootdev-cpp.yml + +name: bootdev-cpp +root: ~/Code/my/bootdev/cpp/ + +# Optional tmux socket +# socket_name: foo + +# Note that the pre and post options have been deprecated and will be replaced by +# project hooks. + +# Project hooks + +# Runs on project start, always +# on_project_start: command + +# Run on project start, the first time +# on_project_first_start: command + +# Run on project start, after the first time +# on_project_restart: command + +# Run on project exit ( detaching from tmux session ) +# on_project_exit: command + +# Run on project stop +# on_project_stop: command + +# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. +# pre_window: rbenv shell 2.0.0-p247 + +# Pass command line options to tmux. Useful for specifying a different tmux.conf. +# tmux_options: -f ~/.tmux.mac.conf + +# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. +# tmux_command: byobu + +# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. +# startup_window: editor + +# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. +# startup_pane: 1 + +# Controls whether the tmux session should be attached to automatically. Defaults to true. +# attach: false + +windows: + - editor: + - nvim . + - shell: + - diff --git a/tmux/.config/tmuxinator/bootdev-static-site-gen.yml b/tmux/.config/tmuxinator/bootdev-static-site-gen.yml new file mode 100644 index 0000000..5140dfd --- /dev/null +++ b/tmux/.config/tmuxinator/bootdev-static-site-gen.yml @@ -0,0 +1,53 @@ +# /home/ipu/.config/tmuxinator/bootdev-static-site-gen.yml + +name: bootdev-static-site-gen +root: ~/Code/my/bootdev/static-site-gen/ + +# Optional tmux socket +# socket_name: foo + +# Note that the pre and post options have been deprecated and will be replaced by +# project hooks. + +# Project hooks + +# Runs on project start, always +# on_project_start: command + +# Run on project start, the first time +# on_project_first_start: command + +# Run on project start, after the first time +# on_project_restart: command + +# Run on project exit ( detaching from tmux session ) +# on_project_exit: command + +# Run on project stop +# on_project_stop: command + +# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. +# pre_window: poetry shell + +# Pass command line options to tmux. Useful for specifying a different tmux.conf. +# tmux_options: -f ~/.tmux.mac.conf + +# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. +# tmux_command: byobu + +# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. +# startup_window: editor + +# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. +# startup_pane: 1 + +# Controls whether the tmux session should be attached to automatically. Defaults to true. +# attach: false + +windows: + - editor: + - poetry run nvim . + - zsh: + - poetry shell + - git: + - lazygit diff --git a/tmux/.config/tmuxinator/work-ape.yml b/tmux/.config/tmuxinator/work-ape.yml new file mode 100644 index 0000000..6cf9309 --- /dev/null +++ b/tmux/.config/tmuxinator/work-ape.yml @@ -0,0 +1,55 @@ +# /home/ipu/.config/tmuxinator/work-ape.yml + +name: work-ape +root: ~/Code/work/ape/ + +# Optional tmux socket +# socket_name: foo + +# Note that the pre and post options have been deprecated and will be replaced by +# project hooks. + +# Project hooks + +# Runs on project start, always +# on_project_start: command + +# Run on project start, the first time +# on_project_first_start: command + +# Run on project start, after the first time +# on_project_restart: command + +# Run on project exit ( detaching from tmux session ) +# on_project_exit: command + +# Run on project stop +# on_project_stop: command + +# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. +# pre_window: rbenv shell 2.0.0-p247 + +# Pass command line options to tmux. Useful for specifying a different tmux.conf. +# tmux_options: -f ~/.tmux.mac.conf + +# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. +# tmux_command: byobu + +# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. +# startup_window: editor + +# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. +# startup_pane: 1 + +# Controls whether the tmux session should be attached to automatically. Defaults to true. +# attach: false + +windows: + - server: + - ssh ape + - editor-app: + - cd app + - nvimp . + - git: + - cd app + - lazygit diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf new file mode 100644 index 0000000..783de04 --- /dev/null +++ b/tmux/.tmux.conf @@ -0,0 +1,19 @@ +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'egel/tmux-gruvbox' +set -g @tmux-gruvbox 'dark' + +run '~/.tmux/plugins/tpm/tpm' + +# set window count from 1 +set -g base-index 1 +setw -g pane-base-index 1 + + +# remap prefix from 'C-b' to 'C-a' +unbind C-b +set-option -g prefix C-a +bind-key C-a send-prefix + diff --git a/tmux/.tmux/plugins/tmux-gruvbox b/tmux/.tmux/plugins/tmux-gruvbox new file mode 160000 index 0000000..245e314 --- /dev/null +++ b/tmux/.tmux/plugins/tmux-gruvbox @@ -0,0 +1 @@ +Subproject commit 245e31430fb7298e02ef0d4030905b49d0385746 diff --git a/tmux/.tmux/plugins/tmux-resurrect b/tmux/.tmux/plugins/tmux-resurrect new file mode 160000 index 0000000..cff343c --- /dev/null +++ b/tmux/.tmux/plugins/tmux-resurrect @@ -0,0 +1 @@ +Subproject commit cff343cf9e81983d3da0c8562b01616f12e8d548 diff --git a/tmux/.tmux/plugins/tmux-sensible b/tmux/.tmux/plugins/tmux-sensible new file mode 160000 index 0000000..25cb91f --- /dev/null +++ b/tmux/.tmux/plugins/tmux-sensible @@ -0,0 +1 @@ +Subproject commit 25cb91f42d020f675bb0a2ce3fbd3a5d96119efa diff --git a/tmux/.tmux/plugins/tpm b/tmux/.tmux/plugins/tpm new file mode 160000 index 0000000..99469c4 --- /dev/null +++ b/tmux/.tmux/plugins/tpm @@ -0,0 +1 @@ +Subproject commit 99469c4a9b1ccf77fade25842dc7bafbc8ce9946