Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 51 lines (38 sloc) 1.76 KB
# variables
is_macos='uname | grep -q Darwin'
# setup mouse and proper terminal scrolling
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
# enabling vi mode
set-window-option -g mode-keys vi
# setup key bindings
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
# copy and paste using macOS clipboard
if-shell "$is_macos" "set -g default-command 'reattach-to-user-namespace -l zsh'"
if-shell "$is_macos" "bind-key -T copy-mode-vi y copy-pipe 'reattach-to-user-namespace pbcopy'"
if-shell "$is_macos" "bind-key -T copy-mode-vi MouseDragEnd1Pane copy-pipe 'reattach-to-user-namespace pbcopy'"
# setup statusbar design
set -g status-justify left
set -g status-bg default
set -g status-fg colour12
set -g status-interval 2
set -g status-right-length 200
set -g status-right "▶ #{spotify_song} ↑ #{uptime} ⇅ #{cpu} ☰ #{ram} ∴ #{ip} ↯ #{battery_level} ⧖ #(date '+%a, %b %d, %H:%M') "
# tmux plugins
# note: type prefix + I to install plugins (prefix = Ctrl+b)
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-urlview'
set -g @plugin 'pwittchen/tmux-plugin-battery'
set -g @plugin 'pwittchen/tmux-plugin-uptime'
set -g @plugin 'pwittchen/tmux-plugin-cpu'
set -g @plugin 'pwittchen/tmux-plugin-ram'
set -g @plugin 'pwittchen/tmux-plugin-ip'
set -g @plugin 'pwittchen/tmux-plugin-spotify'
# plugins customization
set -g @sidebar-tree-command 'tree -C'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
# see more at:
run '~/.tmux/plugins/tpm/tpm'