add tmux config

This commit is contained in:
Максим Тотмин 2025-01-06 16:12:11 +07:00
parent a7e95c3ed1
commit 1da6e2625f
2 changed files with 49 additions and 0 deletions

View 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% "

View 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)"