diff --git a/.tmux.conf b/.tmux.conf index de5c82fafd44bd1d31d4c14a6963bb81ab96b216..8a8fc7a55fde7505196282e3a700af15ead4f6f4 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,113 +1,75 @@ +# General settings #ZSH=`which zsh` -#set-option -g default-shell $ZSH -#set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $ZSH" +set-option -g default-shell /usr/local/bin/zsh set -g default-terminal "screen-256color" - -setw -g automatic-rename off +set -g history-limit 100000 +# --------- binding keys # Change prefix key to Ctrl+a unbind C-b set -g prefix C-a - -# reload ~/.tmux.conf using PREFIX r bind r source-file ~/.tmux.conf \; display "Reloaded!" bind-key c new-window -c "#{pane_current_path}" -# utf-8 settings -#set -g status-utf8 on -#setw -g utf8 on - -# Make mouse useful in copy mode -#setw -g mode-mouse on - # key bindings for splitting unbind % -#bind | split-window -h # Horizontal bind v split-window -h -c "#{pane_current_path}" unbind '"' -#bind - split-window -v # Vertical bind h split-window -v -c "#{pane_current_path}" - bind-key -n C-S-Left swap-window -t -1 bind-key -n C-S-Right swap-window -t +1 - # key binding for nested tmux #unbind q bind a send-prefix - -# History -set -g history-limit 100000 +#-------------------------- # Terminal emulator window title -set -g set-titles on -set -g set-titles-string '#S:#I.#P #W' ####################### zenburn setw -g clock-mode-colour colour117 -setw -g mode-attr bold -setw -g mode-fg colour117 -setw -g mode-bg colour238 set -g status-bg colour235 set -g status-fg colour248 -set -g status-attr dim - -# set -g status-right '#[fg=colour174]#(mpc) #[fg=colour187,bold]%H:%M:%S' -# set -g status-right-length 80 -setw -g window-status-current-fg colour223 -setw -g window-status-current-bg colour237 -setw -g window-status-current-attr bold -set -g message-attr bold -set -g message-fg colour117 -set -g message-bg colour235 ################################ -#set -g status-right '#[fg=colour174,bold]⚡#(/usr/local/bin/battery -a) #[fg=colour187,bold] ⌛ %m/%d/%Y|%H:%M #[default]' -# set -g status-right '#(/usr/local/bin/battery -t)' -# set -g status-left '📅 #(gcalcli --nostarted --calendar "" agenda --nocolor | cut -d " " -f 4- | head -2 | tail -1 | sed "s/^ *//g" | sed "s/ / /g" | cut -c1-19)' -#set -g status-left '📅 #[fg=color187,bright]#(gcalcli --nostarted --calendar "" agenda --nocolor | cut -d " " -f 4- | head -2 | tail -1 | sed "s/^ *//g" | sed "s/ / /g" | cut -c1-50)' -#(whoami)@#H -#set -g status-left '#(/usr/local/bin/battery -t -p)#[fg=colour187,bold]%H:%M | %d/%m/%Y 📅' +set -g status-left '#(/usr/local/bin/battery -t) #(~/.tmuxDir/getProc.sh)' +#set -g status-right "#(~/.tmuxDir/itunes_status.sh) #[fg=#57575e]│ #[fg=white]%d/%m/%Y %H:%M " +set -g status-right "#[fg=grey]%d/%m | %H:%M " -#set -g status-right "#(~/.tmuxDir/getProc.sh) " -# #[fg=colour187,bold] (%H:%M) %d-%b-%y' -# set -g status-right '#[fg=blue,bold]#H#[default] #[fg=blue,bold][CPU=#(getCpuUsage.sh) MEM=#(getMemUsage.sh)]#[default]' -# #[fg=colour187,bold]%d/%m/%Y -# set -g status-right '#[fg=colour187,bold] %d/%m/%Y | %H:%M #(rainbarf --remaining --rgb)' -#set-option -g status-right '#(/usr/local/bin/tmux-cpu #[fg=:color]:percent#[default]") %H:%M %d-%b-%y' -##(~/.tmuxDir/getCPU.sh) -# #(tmux-mem-cpu-load --interval 2 --colors)#[default] +# -- display ------------------------------------------------------------------- +set -g window-status-current-format '#{?pane_in_mode,#[fg=white#,bg=black],#[fg=red#,bg=white]}#W #I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})#F' -# ⌛ #[fg=colour190,bold]%H:%M #[fg=colour187,bold] #(/usr/local/bin/battery -t) +set -g base-index 1 # start windows numbering at 1 +setw -g pane-base-index 1 # make pane numbering consistent with windows +setw -g automatic-rename on # rename window to reflect current program +set -g renumber-windows on # renumber windows when a window is closed -set -g status-left '#(~/.tmuxDir/getProc.sh)' -set -g status-right "#(~/.tmuxDir/itunes_status.sh) #[fg=#57575e]│ #[fg=white]%d/%m/%Y %H:%M " +set -g display-panes-time 800 # slightly longer pane indicators display time +set -g display-time 1000 # slightly longer status messages display time +set -g status-interval 10 # redraw status line every 10 seconds +set -g set-titles on +set -g set-titles-string '#S:#I.#P #W' + +# clear both screen and history +bind -n C-l send-keys C-l \; run 'sleep 0.1' \; clear-history + +# activity +set -g monitor-activity on +set -g visual-activity off +set -g bell-action none #------------------------------ set-option -g status-position top set-option -g status on set-option -g status-interval 5 -#setw -g c0-change-trigger 10 -#setw -g c0-change-interval 100 -#set-option -g status-utf8 on set-option -g status-justify "centre" -set-option -g status-left-length 90 -set-option -g status-right-length 350 +set-option -g status-left-length 60 +set-option -g status-right-length 100 #------------------------------ -# Notifying if other windows has activities -set -g visual-activity on -setw -g monitor-activity on -setw -g window-status-activity-attr bold #,blink,underscore - # window options #set -g mouse-select-pane on setw -g automatic-rename -# Don't actually ring the bell (but still set the window attributes in -# the status bar so we know that a bell rang) -set -g bell-action none - - # Easier pane resize keybindings. bind-key -n C-M-u resize-pane -U 1 bind-key -n C-M-d resize-pane -D 1 @@ -178,12 +140,3 @@ bind-key -n C-M-r resize-pane -R 1 # bind-key -t emacs-copy C-Up scroll-up # bind-key -t emacs-copy C-Down scroll-down - - -#set -g window-status-format '#I:#F' -#set -g window-status-current-format '#I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})#F' -setw -g window-status-format "#I:#W" -#setw -g window-status-current-format " #F#I:#W#F " -# don't rename windows automatically -set-option -g allow-rename off -set-option -g status-interval 5