add tmux config
This commit is contained in:
parent
a7e95c3ed1
commit
1da6e2625f
11
rockethype/config/tmux/statusbar
Executable file
11
rockethype/config/tmux/statusbar
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
##CPU loading
|
||||
CPULOAD=$(top -bn1 | sed -n '/Cpu/p' | awk '{print $2}' | sed 's/..,//')
|
||||
|
||||
##RAM usege
|
||||
RAMLOAD=$(free | grep Mem | awk '{print $3/$2 * 100.0}' | cut -d. -f1)
|
||||
|
||||
echo \
|
||||
"| $CPULOAD% |" \
|
||||
" $RAMLOAD% "
|
||||
38
rockethype/config/tmux/tmux.conf
Normal file
38
rockethype/config/tmux/tmux.conf
Normal file
@ -0,0 +1,38 @@
|
||||
# tmux cozy config
|
||||
set -g mouse on
|
||||
|
||||
# Set the default terminal mode to 256color mode
|
||||
set -g default-terminal "screen-256color"
|
||||
set -g status-style fg=black,bg=blue
|
||||
|
||||
# Start windows and panes at 1, not 0
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||
set -g @plugin 'thewtex/tmux-mem-cpu-load'
|
||||
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
|
||||
# set vi-mode
|
||||
set-window-option -g mode-keys vi
|
||||
# keybindings
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||
|
||||
unbind C-b
|
||||
set -g prefix C-Space
|
||||
bind C-Space send-prefix
|
||||
bind '"' split-window -v -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
|
||||
set -g status-interval 1
|
||||
set-option -g status-left "[ #S]"
|
||||
set-option -g status-right "#(~/.config/tmux/statusbar)"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user