[ADD] Tmux configuration w/ plugins installation

This commit is contained in:
Bruno BELANYI 2020-08-21 18:02:25 +02:00
parent 8422c4ff2d
commit 66409f779a
3 changed files with 47 additions and 0 deletions

1
.gitignore vendored
View file

@ -6,3 +6,4 @@ vim/.vim/spell/
vim/.vim/view/ vim/.vim/view/
# Miscellaneous desktop files # Miscellaneous desktop files
desktop/ desktop/
tmux/.config/tmux/plugins

View file

@ -11,6 +11,7 @@ CLI_PACKAGES := \
shell \ shell \
ssh \ ssh \
tin \ tin \
tmux \
vim \ vim \
zsh \ zsh \
@ -50,6 +51,7 @@ CLI_DEPENDENCIES := \
community/stack \ community/stack \
community/stow \ community/stow \
community/tig \ community/tig \
community/tmux \
community/udiskie \ community/udiskie \
community/zsh-completions \ community/zsh-completions \
core/archlinux-keyring \ core/archlinux-keyring \
@ -154,6 +156,12 @@ stow-tin: tin
rm -rf $(STOW_TARGET)/.tin rm -rf $(STOW_TARGET)/.tin
ln -s $(realpath tin/.tin) $(STOW_TARGET)/.tin ln -s $(realpath tin/.tin) $(STOW_TARGET)/.tin
stow-tmux: tmux
$(STOW) $<
[ -d ~/.config/tmux/plugins/tpm ] || \
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm;
~/.config/tmux/plugins/tpm/bin/install_plugins
stow-vim: vim stow-vim: vim
$(STOW) $< $(STOW) $<
vim +PlugInstall vim +PlugInstall
@ -179,6 +187,10 @@ unstow-system-X:
unstow-tin: unstow-tin:
rm -f $(STOW_TARGET)/.tin rm -f $(STOW_TARGET)/.tin
unstow-tmux:
$(STOW) -D tmux
rm -rf ~/.config/tmux/plugins/
# Development related installations # Development related installations
.PHONY: rust .PHONY: rust
rust: rust:

View file

@ -0,0 +1,34 @@
# Don't use login shell
set -g default-command "${SHELL}"
# Better Vim mode
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
# Change where plugins are downloaded
set-environment -g TMUX_PLUGIN_MANAGER_PATH '/home/ambroisie/.config/tmux/plugins/'
# TPM itself
set -g @plugin 'tmux-plugins/tpm'
# Minimum viable configuration
set -g @plugin 'tmux-plugins/tmux-sensible'
# Show when prefix has been pressed
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# Open high-lighted files in copy mode
set -g @plugin 'tmux-plugins/tmux-open'
# Better pane management
set -g @plugin 'tmux-plugins/tmux-pain-control'
# Suggested in `man tmux`, and added by tmux-sensible, with wrong file...
bind-key R source-file ~/.config/tmux/tmux.conf \; \
display-message "source-file done"
# Show when I'm in prefix mode in status bar
set -g status-right '#{prefix_highlight} %a %Y-%m-%d %H:%M'
# Also show when I'm in copy or sync mode
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_show_sync_mode 'on'
# Initialize TPM
run '~/.config/tmux/plugins/tpm/tpm'