68 lines
3.7 KiB
Bash
68 lines
3.7 KiB
Bash
setw -g mouse on
|
|
setw -g mode-keys vi
|
|
|
|
set -g pane-border-status top
|
|
set -g pane-border-lines double
|
|
set -g pane-border-indicators arrows
|
|
set -g pane-active-border-style "bg=color226 fg=color0"
|
|
|
|
set -g repeat-time 1000
|
|
set -s set-clipboard on
|
|
set -sg escape-time 5
|
|
set -sa terminal-features ',xterm-256color:RGB'
|
|
set -g destroy-unattached on
|
|
|
|
set -g @minimal-tmux-expanded-icon " "
|
|
set -g @minimal-tmux-show-expanded-icons-for-all-tabs true
|
|
set -g @minimal-tmux-status-right-extra ""
|
|
if-shell 'command -v termux-battery-status' {
|
|
set -ag @minimal-tmux-status-right-extra "#[fg=color150]#[bg=color150,fg=black]BAT: #(termux-battery-status | jq -r \".level\")#[fg=color150,bg=default]#[bg=default] "
|
|
}
|
|
if-shell 'command -v playerctl' {
|
|
set -ag @minimal-tmux-status-right-extra "#[fg=color150]#[bg=color150,fg=black]#(playerctl metadata --format '{{artist}} - {{title}}' || echo 'No player')#[fg=color150,bg=default]#[bg=default] "
|
|
}
|
|
if-shell 'upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -q "energy-rate"' {
|
|
set -ag @minimal-tmux-status-right-extra "#[fg=color150]#[bg=color150,fg=black]Power:#(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep "energy-rate" | awk '{print $2}')W#[fg=color150,bg=default]#[bg=default] "
|
|
}
|
|
if-shell 'upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -q "energy-rate"' {
|
|
set -ag @minimal-tmux-status-right-extra "#[fg=color150]#[bg=color150,fg=black]Battery:#(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep "percentage" | awk '{print $2}')(#(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep "time" | awk '{print $4 $5}'))#[fg=color150,bg=default]#[bg=default] "
|
|
}
|
|
set -ag @minimal-tmux-status-right-extra "#[fg=color150]#[bg=color150,fg=black]CPU:#(uptime | awk -F'load average:' '{ print \$2 }' | cut -d',' -f1)#[fg=color150,bg=default]#[bg=default] "
|
|
set -ag @minimal-tmux-status-right-extra "#[fg=color150]#[bg=color150,fg=black]RAM:#(free -h | awk '/^Mem:/ {print \$3 \"/\" \$2}')#[fg=color150,bg=default]#[bg=default] "
|
|
if-shell 'command -v nvidia-smi' {
|
|
set -ag @minimal-tmux-status-right-extra "#[fg=color150]#[bg=color150,fg=black]GPU: #(nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits)%#[fg=color150,bg=default]#[bg=default] "
|
|
}
|
|
set -ag @minimal-tmux-status-right-extra "#[fg=color150]#[bg=color150,fg=black]#(date +"%Y-%m-%dT%H:%M")#[fg=color150,bg=default]#[bg=default]"
|
|
set -g @minimal-tmux-status-left-extra "#{pane_title}"
|
|
set -g @minimal-tmux-use-arrow true
|
|
set -g @minimal-tmux-right-arrow ""
|
|
set -g @minimal-tmux-left-arrow ""
|
|
set -g @minimal-tmux-left false
|
|
set -g @minimal-tmux-right false
|
|
set -g status-right-length 1024
|
|
set -g status-interval 1
|
|
|
|
set -g @fingers-pattern-filelc '(([.\w\-~\$@]+)?(/[.\w\-@]+)+/?(\:\d+){0,2})'
|
|
|
|
bind h select-pane -L
|
|
bind j select-pane -D
|
|
bind k select-pane -U
|
|
bind l select-pane -R
|
|
bind -n C-k send-keys -R \; clear-history
|
|
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection-no-clear -x
|
|
bind -n M-f run -b "#{@fingers-cli} start #{pane_id} --patterns filelc --main-action 'xargs nvim_remote'"
|
|
bind c new-window -c "#{pane_current_path}"
|
|
bind % split-window -h -c "#{pane_current_path}"
|
|
bind '"' split-window -v -c "#{pane_current_path}"
|
|
bind -T copy-mode-vi v send-keys -X begin-selection
|
|
bind -T copy-mode-vi y send-keys -X copy-selection-no-clear\; display-message 'Copied!'
|
|
bind s command-prompt -p "send pane to:" "join-pane -t '%%'"
|
|
bind -n M-x copy-mode
|
|
|
|
unbind -n MouseDown3Pane
|
|
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'niksingh710/minimal-tmux-status'
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
set -g @plugin 'Morantron/tmux-fingers'
|
|
run -b '~/.tmux/plugins/tpm/tpm'
|