# cat << ►_◄ > /dev/null # # -- general --------------------------------------------------------------- # # set default shell set -g default-shell $SHELL # colors set -g default-terminal "screen-256color" # xterm keys setw -g xterm-keys on # use emacs-style key bindings in the status line set -g status-keys emacs # GNU-Screen compatible prefix set -g prefix C-q bind C-q send-prefix # suppress repeat set -g repeat-time 0 # boost history set -g history-limit 5000 # reload configuration bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced' # -- display --------------------------------------------------------------- # # start windows numbering at 1 set -g base-index 1 # rename window to reflect current program setw -g automatic-rename on # renumber windows when a window is closed set -g renumber-windows on # set terminal title set -g set-titles on set -g set-titles-string '#h ❐ #S ● #I #W' # -- navigation ------------------------------------------------------------ # # navigation between windows and panes bind Space last-window bind -r h select-pane -L bind -r j select-pane -D bind -r k select-pane -U bind -r l select-pane -R # create a new window or pane with current directory bind '"' split-window -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}" bind c new-window -c "#{pane_current_path}" # -- 8< -------------------------------------------------------------------- # # powerline theme run 'cut -c3- ~/.tmux.conf | sh -s powerline_theme' # toggle mouse bind m run 'cut -c3- ~/.tmux.conf | sh -s toggle_mouse' # # ►_◄ # # # exit the script if any statement returns a non-true return value # set -e # # powerline_theme() { # # separators # left_separator='' # left_separator_black='' # right_separator='' # right_separator_black='' # session_symbol='' # # # panes # pane_border_fg=colour238 # light gray # pane_active_border_fg=colour39 # light blue # # tmux set -g pane-border-style fg=$pane_border_fg \; set -g pane-active-border-style fg=$pane_active_border_fg # # uncomment for fat borders # # tmux set -ga pane-border-style bg=$pane_border_fg \; set -ga pane-active-border-style bg=$pane_active_border_fg # # display_panes_active_colour=colour39 # light blue # display_panes_colour=colour39 # light blue # tmux set -g display-panes-active-colour $display_panes_active_colour \; set -g display-panes-colour $display_panes_colour # # # messages # message_fg=colour16 # black # message_bg=colour226 # yellow # message_attr=bold # tmux set -g message-style fg=$message_fg,bg=$message_bg,$message_attr # # message_command_fg=colour16 # black # message_command_bg=colour160 # light yellow # tmux set -g message-command-style fg=$message_command_fg,bg=$message_command_bg,$message_attr # # # windows mode # mode_fg=colour16 # black # mode_bg=colour226 # yellow # mode_attr=bold # tmux setw -g mode-style fg=$mode_fg,bg=$mode_bg,$mode_attr # # # status line # status_fg=colour253 # white # status_bg=colour232 # dark gray # tmux set -g status-style fg=$status_fg,bg=$status_bg # # session_fg=colour16 # black # session_bg=colour226 # yellow # status_left="#[fg=$session_fg,bg=$session_bg,bold] ❐ #S #[fg=$session_bg,bg=$status_bg,nobold]$left_separator_black" # if [ x"`tmux -q -L tmux_theme_status_left_test -f /dev/null new-session -d \; show -g -v status-left \; kill-session`" = x"[#S] " ] ; then # status_left="$status_left " # fi # tmux set -g status-left-length 32 \; set -g status-left "$status_left" # # window_status_fg=colour245 # light gray # window_status_bg=colour232 # dark gray # window_status_format="#I #W" # tmux setw -g window-status-style fg=$window_status_fg,bg=$window_status_bg \; setw -g window-status-format "$window_status_format" # # window_status_current_fg=colour16 # black # window_status_current_bg=colour39 # light blue # window_status_current_format="#[fg=$window_status_bg,bg=$window_status_current_bg]$left_separator_black#[fg=$window_status_current_fg,bg=$window_status_current_bg,bold] #I $left_separator #W #[fg=$window_status_current_bg,bg=$status_bg,nobold]$left_separator_black" # tmux setw -g window-status-current-format "$window_status_current_format" # tmux set -g status-justify left # # window_status_activity_fg=default # window_status_activity_bg=default # window_status_activity_attr=underscore # tmux setw -g window-status-activity-style fg=$window_status_activity_fg,bg=$window_status_activity_bg,$window_status_activity_attr # # window_status_bell_fg=colour226 # yellow # window_status_bell_bg=default # window_status_bell_attr=blink,bold # tmux setw -g window-status-bell-style fg=$window_status_bell_fg,bg=$window_status_bell_bg,$window_status_bell_attr # # window_status_last_fg=colour39 # light blue # window_status_last_attr=default # tmux setw -g window-status-last-style $window_status_last_attr,fg=$window_status_last_fg # # time_fg=colour16 # black # time_bg=colour39 # light blue # host_fg=colour16 # black # host_bg=colour226 # yellow # status_right="#[fg=$time_bg,nobold]$right_separator_black#[fg=$time_fg,bg=$time_bg,nobold] %H:%M #[fg=$host_bg,nobold]$right_separator_black#[fg=$host_fg,bg=$host_bg,nobold] #(whoami)@#h " # tmux set -g status-right-length 64 \; set -g status-right "$status_right" # # # clock # clock_mode_colour=colour39 # light blue # tmux setw -g clock-mode-colour $clock_mode_colour # } # # toggle_mouse() { # old=$(tmux show -g | grep "mouse " | cut -d' ' -f2) # new="" # # if [ "$old" = "on" ] ; then # new="off" # else # new="on" # fi # # tmux set -g mouse $new \;\ # bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M" \;\ # bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M" \;\ # display "mouse: $new" # } # # $@