Add tmux configuration
This commit is contained in:
parent
a00e0126f6
commit
f1284412e4
6 changed files with 95 additions and 12 deletions
12
Makefile
12
Makefile
|
@ -1,4 +1,4 @@
|
||||||
.PHONY: help git lftp npm nvim ssh sway urxvt wallpapers zsh clean
|
.PHONY: help git lftp npm nvim ssh sway tmux urxvt wallpapers zsh clean
|
||||||
|
|
||||||
.DEFAULT: help
|
.DEFAULT: help
|
||||||
|
|
||||||
|
@ -10,13 +10,14 @@ help:
|
||||||
@echo "nvim > neovim config & plugins"
|
@echo "nvim > neovim config & plugins"
|
||||||
@echo "ssh > safe-ish ssh config"
|
@echo "ssh > safe-ish ssh config"
|
||||||
@echo "sway > minimal tiling wm for naughty computers"
|
@echo "sway > minimal tiling wm for naughty computers"
|
||||||
|
@echo "tmux > tmux config"
|
||||||
@echo "urxvt > terminal colours & keyboard settings"
|
@echo "urxvt > terminal colours & keyboard settings"
|
||||||
@echo "wallpapers > system wallpapers"
|
@echo "wallpapers > system wallpapers"
|
||||||
@echo "zsh > shell, aliases and cool stuff"
|
@echo "zsh > shell, aliases and cool stuff"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " mostly, i'm just lazy"
|
@echo " mostly, i'm just lazy"
|
||||||
|
|
||||||
all: git lftp npm nvim ssh sway urxvt wallpapers zsh
|
all: git lftp npm nvim ssh sway tmux urxvt wallpapers zsh
|
||||||
|
|
||||||
git:
|
git:
|
||||||
@stow -t ~/ git
|
@stow -t ~/ git
|
||||||
|
@ -40,6 +41,10 @@ ssh:
|
||||||
sway:
|
sway:
|
||||||
@stow -t ~/ sway
|
@stow -t ~/ sway
|
||||||
|
|
||||||
|
tmux:
|
||||||
|
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm
|
||||||
|
@stow -t ~/ tmux
|
||||||
|
|
||||||
urxvt:
|
urxvt:
|
||||||
@stow -t ~/ urxvt
|
@stow -t ~/ urxvt
|
||||||
|
|
||||||
|
@ -52,10 +57,11 @@ zsh:
|
||||||
@stow -t ~/ zsh
|
@stow -t ~/ zsh
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@stow -D git lftp npm nvim ssh sway urxvt zsh
|
@stow -D git lftp npm nvim ssh sway tmux urxvt zsh
|
||||||
@rm -rf ~/.config/git \
|
@rm -rf ~/.config/git \
|
||||||
~/.config/lftp ~/.local/share/lftp \
|
~/.config/lftp ~/.local/share/lftp \
|
||||||
~/.config/npm ~/.cache/npm ~/.local/share/npm \
|
~/.config/npm ~/.cache/npm ~/.local/share/npm \
|
||||||
~/.config/nvim \
|
~/.config/nvim \
|
||||||
~/.config/sway \
|
~/.config/sway \
|
||||||
|
~/.config/tmux \
|
||||||
~/.oh-my-zsh
|
~/.oh-my-zsh
|
||||||
|
|
|
@ -52,3 +52,4 @@
|
||||||
* nvim
|
* nvim
|
||||||
* unzip
|
* unzip
|
||||||
* rxvt-unicode
|
* rxvt-unicode
|
||||||
|
* tmux
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
call plug#begin()
|
call plug#begin()
|
||||||
|
|
||||||
" Plugins
|
|
||||||
Plug 'vim-airline/vim-airline'
|
Plug 'vim-airline/vim-airline'
|
||||||
Plug 'vim-airline/vim-airline-themes'
|
Plug 'vim-airline/vim-airline-themes'
|
||||||
|
|
||||||
" Themes
|
|
||||||
Plug 'sickill/vim-monokai'
|
Plug 'sickill/vim-monokai'
|
||||||
|
|
||||||
" Git
|
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'airblade/vim-gitgutter'
|
||||||
|
|
||||||
" Config
|
|
||||||
Plug 'tpope/vim-sensible'
|
Plug 'tpope/vim-sensible'
|
||||||
Plug 'chrisbra/sudoedit.vim'
|
Plug 'chrisbra/sudoedit.vim'
|
||||||
|
Plug 'scrooloose/nerdtree'
|
||||||
|
"Plug 'ntpeters/vim-better-whitespace'
|
||||||
|
"Plug 'nathanaelkane/vim-indent-guides'
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
@ -22,6 +18,17 @@ set encoding=utf-8
|
||||||
" View line numbers
|
" View line numbers
|
||||||
set number
|
set number
|
||||||
|
|
||||||
|
" Display
|
||||||
|
set tabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
"set expandtab
|
||||||
|
"set softtabstop=4
|
||||||
|
|
||||||
|
" Show tabs & trailing space
|
||||||
|
"set listchars=tab:»·,trail:·
|
||||||
|
set listchars=tab:▸\ ,trail:·,eol:¬
|
||||||
|
set list
|
||||||
|
|
||||||
" Configure vim-airline
|
" Configure vim-airline
|
||||||
let g:airline_theme='simple'
|
let g:airline_theme='simple'
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
|
@ -29,6 +36,22 @@ set laststatus=2
|
||||||
" Configure vim-monokai with syntax highlighting
|
" Configure vim-monokai with syntax highlighting
|
||||||
colorscheme monokai
|
colorscheme monokai
|
||||||
syntax enable
|
syntax enable
|
||||||
|
let g:load_doxygen_syntax=1
|
||||||
|
|
||||||
" Enable clipboard yanking
|
" Configure vim-indent-guides with suitable colours
|
||||||
|
"let g:indent_guides_auto_colors=0
|
||||||
|
"hi IndentGuidesOdd ctermbg=235
|
||||||
|
"hi IndentGuidesEven ctermbg=237
|
||||||
|
" Also load on startup
|
||||||
|
"let g:indent_guides_enable_on_vim_startup=1
|
||||||
|
|
||||||
|
"Use system clipboard
|
||||||
set clipboard+=unnamedplus
|
set clipboard+=unnamedplus
|
||||||
|
|
||||||
|
" Disable UDLR keys (prefer HJKL)
|
||||||
|
noremap <Up> <NOP>
|
||||||
|
noremap <Down> <NOP>
|
||||||
|
noremap <Left> <NOP>
|
||||||
|
noremap <Right> <NOP>
|
||||||
|
|
||||||
|
" TODO: commenting plugin -> commentary/tcomment/nerdcommenter
|
||||||
|
|
42
tmux/.config/tmux/tmux.conf
Normal file
42
tmux/.config/tmux/tmux.conf
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
# remap prefix from 'C-b' to 'C-a'
|
||||||
|
unbind C-b
|
||||||
|
set -g prefix C-a
|
||||||
|
bind C-a send-prefix
|
||||||
|
|
||||||
|
# Enable mouse mode
|
||||||
|
set -g mouse on
|
||||||
|
|
||||||
|
# Stop renaming windows automatically
|
||||||
|
set-option -g allow-rename off
|
||||||
|
|
||||||
|
# Display
|
||||||
|
# Status Bar
|
||||||
|
set-option -g status-position top
|
||||||
|
|
||||||
|
set -g base-index 1 # start window numbering at 1
|
||||||
|
set -g pane-base-index 1 # make pane numbering consistent with windows
|
||||||
|
set -g renumber-windows on #renumber windows when window closed
|
||||||
|
|
||||||
|
# TMUX plugin manager
|
||||||
|
# Conform to XDG Base Directory specification
|
||||||
|
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins'
|
||||||
|
|
||||||
|
#List of plugins
|
||||||
|
set -g @tpm_plugins ' \
|
||||||
|
tmux-plugins/tpm \
|
||||||
|
tmux-plugins/tmux-yank \
|
||||||
|
tmux-plugins/tmux-sensible \
|
||||||
|
tmux-plugins/tmux-pain-control \
|
||||||
|
'
|
||||||
|
|
||||||
|
# Other examples:
|
||||||
|
# set -g @plugin 'github_username/plugin_name'
|
||||||
|
# set -g @plugin 'git@github.com/user/plugin'
|
||||||
|
# set -g @plugin 'git@bitbucket.com/user/plugin'
|
||||||
|
|
||||||
|
# Install TPM if not already installed
|
||||||
|
if "test ! -d ~/.config/tmux/plugins/tpm" \
|
||||||
|
"run 'git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm'"
|
||||||
|
|
||||||
|
# Initialise TMUX plugin manager (always keep at bottom)
|
||||||
|
run ~/.config/tmux/plugins/tpm/tpm
|
|
@ -31,6 +31,9 @@ URxvt.scrollBar: false
|
||||||
URxvt.internalBorder: 0
|
URxvt.internalBorder: 0
|
||||||
|
|
||||||
! Perl Extensions: Clickable URLs + Simple Tabs
|
! Perl Extensions: Clickable URLs + Simple Tabs
|
||||||
URxvt.perl-ext-common: default,matcher,tabbed
|
! URxvt.perl-ext-common: default,matcher,tabbed
|
||||||
|
|
||||||
|
! Perl Extensions: Clickable URLs
|
||||||
|
URxvt.perl-ext-common: default,matcher
|
||||||
URxvt.url-launcher: /usr/bin/xdg-open
|
URxvt.url-launcher: /usr/bin/xdg-open
|
||||||
URxvt.matcher.button: 1
|
URxvt.matcher.button: 1
|
||||||
|
|
8
zsh/.oh-my-zsh/custom/tmux.zsh
Normal file
8
zsh/.oh-my-zsh/custom/tmux.zsh
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Conform to XDG Base Directory specification
|
||||||
|
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
|
||||||
|
alias tmux='tmux -f ~/.config/tmux/tmux.conf'
|
||||||
|
|
||||||
|
# Connect to remote tmux session via SSH
|
||||||
|
ssh-tmux(){
|
||||||
|
ssh -t $@ "tmux attach || tmux new";
|
||||||
|
}
|
Loading…
Reference in a new issue