dotfiles/dot_tmux.conf

106 lines
4 KiB
Text

#
# tmux configuration
# Version: 1.0
# Date: 2021-02-21 19:32:35 +0100
#
# Copyright 2021, Oliver Weyhmueller <oliver@weyhmueller.de>
#new-session -A -t 0
set -g prefix C-a
unbind C-b
unbind Space
set -g base-index 1
setw -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display-message "Reloaded!"
bind C-a send-prefix
bind | split-window -h
bind - split-window -v
bind C-x setw synchronize-panes
set -g mouse on
set -g status-fg white
set -g status-bg colour232
set -g status-position top
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*:Tc"
#set-option history-limit 3000
setw -g window-status-format "#[fg=colour242]#I #W"
setw -g window-status-current-format "#[fg=colour247]#I #W"
setw -g window-status-last-style fg=brightblue
setw -g window-status-activity-style fg=green
setw -g window-status-bell-style fg=blue
setw -g window-status-separator ' | '
set -g status-left-length 120
set -g status-right-length 192
set -g status-left "#[fg=black]#[bg=blue] #S#[fg=blue,bg=green]#[bg=green,fg=black]W#I/#{session_windows} P#P/#{window_panes}#{?pane_synchronized,#[fg=green]#[bg=red]#[fg=colour232]#[bg=red]ALL#[fg=red]#[bg=yellow],#[fg=green]#[bg=cyan]#[fg=colour232]#[bg=cyan]one#[fg=green]#[bg=yellow]}#[fg=black,bg=yellow]#W#[fg=yellow,bg=colour232] "
set -g status-right "#{prefix_highlight} #[fg=colour242] | #[fg=colour254]#{ip} #[fg=colour242]| #[fg=colour245]#{wifi_ssid} #{wifi_icon} #{online_status} #[fg=colour242]| #[fg=colour247]%H:%M #[fg=colour245]%F #[fg=green]#[bg=colour232]#[fg=black]#[bg=green]#U@#H #[fg=green,bg=color232]"
set-option -g allow-rename off
setw -g automatic-rename off
set -g pane-active-border-style 'bg=default fg=white'
set -g pane-border-style 'bg=default fg=brightblue'
setw -g pane-border-format "#{pane_title}: #{pane_current_command}#{?#{!=:#{pane_current_command},ssh}, #{pane_current_path},} (#{pane_width}x#{pane_height})"
setw -g pane-border-status top
set -g message-style 'bg=default fg=white bright'
setw -g monitor-activity on
set -g visual-activity off
setw -g mode-keys vi
setw -g main-pane-width 120
# set -g default-command "tmux rename-window zsh; reattach-to-user-namespace -l $SHELL"
set -g default-shell /bin/zsh
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind C-p choose-buffer
unbind -T copy-mode-vi MouseDragEnd1Pane
bind -T copy-mode-vi MouseDown1Pane select-pane \;\
send-keys -X copy-pipe "zsh -c 'source ~/.cache/zsh4humans/v5/ohmyzsh/ohmyzsh/lib/clipboard.zsh; clipcopy" \;\
send-keys -X clear-selection
#bind -t vi-copy 'v' begin-selection
#bind -t vi-copy 'y' copy-selection
set -g @prefix_highlight_fg 'colour04' # default is 'colour231'
set -g @prefix_highlight_bg 'default' # default is 'colour04'
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_copy_mode_attr 'fg=yellow,bg=default' # default is 'fg=default,bg=yellow'
set -g @prefix_highlight_prefix_prompt 'Wait'
set -g @prefix_highlight_copy_prompt 'Copy'
bind -n C-x setw synchronize-panes
bind C-c run "zsh -c 'source ~/.cache/zsh4humans/v5/ohmyzsh/ohmyzsh/lib/clipboard.zsh; tmux show-buffer | clipcopy'"
bind C-v run "zsh -c 'source ~/.cache/zsh4humans/v5/ohmyzsh/ohmyzsh/lib/clipboard.zsh; tmux set-buffer \"$(clippaste)\"; tmux paste-buffer'"
set -g @continuum-restore 'on'
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'iterm,fullscreen'
set -g @resurrect-capture-pane-contents 'on'
set -g @online_icon "#[fg=green]"
set -g @offline_icon "#[fg=red]"
set -g @route_to_ping "blofeld.nc.w9r.de"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-online-status'
set -g @plugin 'tmux-plugins/tmux-urlview'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'weyhmueller/tmux-spotify'
set -g @plugin 'soyuka/tmux-current-pane-hostname'
set -g @plugin 'weyhmueller/tmux-plugin-ip'
set -g @plugin 'gmoe/tmux-wifi-macos'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-logging'
run '~/.tmux/plugins/tpm/tpm'