added tmux-ressurect and updated readme

This commit is contained in:
Adam French [sc21a2f]
2024-10-11 09:58:54 +01:00
parent 0a46521b78
commit a5053d0264
2 changed files with 24 additions and 1 deletions

View File

@@ -7,8 +7,13 @@ A collection of Linux scripts and configs for use across multiple machines.
When referring to `{repo_dir}`, use absolute paths (e.g., `~/scripts`). When referring to `{repo_dir}`, use absolute paths (e.g., `~/scripts`).
### tmux Configuration ### tmux Configuration
This config uses tmux plugin manager to add session save / reloading with tmux-ressurect.
Before using the config, please download the plugin manager with:
```
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
```
Add to `~/.tmux.conf`: Then to use the config file, add to `~/.tmux.conf`:
``` ```
source {repo_dir}/tmux.conf source {repo_dir}/tmux.conf
``` ```
@@ -43,6 +48,8 @@ include {repo_dir}/i3config
|------------|-------------| |------------|-------------|
| <kbd>M-f</kbd> | Prefix key (similar to <kbd>$mod</kbd> in i3) | | <kbd>M-f</kbd> | Prefix key (similar to <kbd>$mod</kbd> in i3) |
| <kbd>Prefix</kbd> + <kbd>Space</kbd> | Send prefix | | <kbd>Prefix</kbd> + <kbd>Space</kbd> | Send prefix |
| <kbd>Prefix</kbd> + <kbd>Ctrl</kbd> + <kbd>s</kbd> | Save session |
| <kbd>Prefix</kbd> + <kbd>Ctrl</kbd> + <kbd>r</kbd> | Restore session |
| <kbd>Prefix</kbd> + <kbd>?</kbd> | List keys | | <kbd>Prefix</kbd> + <kbd>?</kbd> | List keys |
| <kbd>Prefix</kbd> + <kbd>[</kbd> | Enter copy mode | | <kbd>Prefix</kbd> + <kbd>[</kbd> | Enter copy mode |
| <kbd>Prefix</kbd> + <kbd>]</kbd> | Paste buffer | | <kbd>Prefix</kbd> + <kbd>]</kbd> | Paste buffer |

View File

@@ -1,3 +1,15 @@
# Tmux plugins, requires tmux plugin manager
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'
# Config that is very close to a i3 window manager's keybinding. # Config that is very close to a i3 window manager's keybinding.
set -s escape-time 0 set -s escape-time 0
setw -g aggressive-resize on setw -g aggressive-resize on
@@ -104,3 +116,7 @@ bind-key ')' join-pane -t :10
# Kill Selected Pane # Kill Selected Pane
bind-key q kill-pane bind-key q kill-pane
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'