Skip to content

Instantly share code, notes, and snippets.

@willywos
Created October 8, 2016 05:12
Show Gist options
  • Save willywos/e67424e42410da91a1952ebdb3f0b96d to your computer and use it in GitHub Desktop.
Save willywos/e67424e42410da91a1952ebdb3f0b96d to your computer and use it in GitHub Desktop.
My tmux configurations, it's literally the best tmux eveeeer.
###########################
# Configuration
###########################
# use UTF8
set -g utf8
set-window-option -g utf8 on
# set shell
set -g default-shell /bin/zsh
set-option -g default-shell /bin/zsh
# use 256 term for pretty colors
# set -g default-terminal "xterm-256color"
# increase scroll-back history
set -g history-limit 5000
# use vim key bindings
setw -g mode-keys vi
# enable mouse
setw -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
# enable mouse to select a pane
# set -g mouse-select-pane on
# decrease command delay (increases vim responsiveness)
set -sg escape-time 1
# increase repeat time for repeatable commands
set -g repeat-time 1000
# start window index at 1
set -g base-index 0
# start pane index at 1
setw -g pane-base-index 0
# highlight window when it has new activity
setw -g monitor-activity on
set -g visual-activity on
# re-number windows when one is closed
set -g renumber-windows on
# enable pbcopy and pbpaste
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/blob/master/README.md
# set-option -g default-command "reattach-to-user-namespace -l zsh"
###########################
# Key Bindings
###########################
# tmux prefix
unbind C-b
set -g prefix C-j
# copy with 'enter' or 'y' and send to mac os clipboard: http://goo.gl/2Bfn8
# unbind -t vi-copy Enter
# bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
# bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# paste
# unbind C-p
# bind C-p paste-buffer
# window splitting
unbind %
bind | split-window -h
unbind '"'
bind - split-window -v
# quickly switch panes
unbind ^J
bind ^J select-pane -t :.+
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
###########################
# Status Bar
###########################
# enable UTF-8 support in status bar
set -g status-utf8 on
# set refresh interval for status bar
set -g status-interval 30
# center the status bar
set -g status-justify left
# show session, window, pane in left status bar
set -g status-left-length 40
set-option -g status-left '#[fg=white]⚡️ willywos ⚡️ #[fg=green]'
set-option -g status-right '#H #[fg=green]%I:%M #[fg=aqua]%m.%d.%Y'
###########################
# Colors
###########################
# color status bar
set -g status-bg black
set -g status-fg cyan
# highlight current window
set-window-option -g window-status-current-fg magenta
set-window-option -g window-status-current-bg black
# set color of active pane
set -g pane-border-fg magenta
set -g pane-border-bg black
set -g pane-active-border-fg cyan
set -g pane-active-border-bg black
@isknurul007
Copy link

Hello,
When I select some text using mouse, I can see that text inside paste buffer but I cannot paste it.
How do I paste something that is in my paste buffer..

I just want copy by selecting the text and paste it on the terminal...

Please help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment