我在 OSX(brewed tmux)上运行 Tmux,每次启动计算机时,第一的当我启动 tmux 时,它挂起。执行 CTRL + T 检查它的 SIGINFO,让我“等待..”。为了解决这个问题,我需要终止该进程,然后再次运行它,第二次,它工作正常。
第二次运行 tmux 后,我无法重现该问题。一切似乎都运转良好。
我正在使用 Tmux电源线。这是我的 tmux.conf
注意:如果我确实想重现问题,我需要重新启动计算机。
# start with window 1 (instead of 0)
set -g base-index 1
# start with pane 1
set -g pane-base-index 1
# modify prefix
unbind C-b
set -g prefix C-x
bind C-x send-prefix
# source config file
bind r source-file ~/.tmux.conf
#set-option -g status on
#set-option -g status-interval 2
#set-option -g status-utf8 on
#set-option -g status-justify "centre"
#set-option -g status-left-length 60
#set-option -g status-right-length 125
source "$HOME/.virtualenvs/pyenv/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf"
# set-option -g default-command 'command -v reattach-to-user-namespace >/dev/null && exec reattach-to-user-namespace -l "$SHELL" || exec "$SHELL"'
set-option -g default-command "reattach-to-user-namespace -l zsh"
set -g default-terminal "screen-256color"
set-option -g message-bg colour233 # gray
set-option -g message-fg colour247 # gray
# allow terminal scrolling
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
# copy mode
#unbind [
#bind Escape copy-mode
#unbind ]
#bind ] paste-buffer
#set-option -g default-command "reattach-to-user-namespace -l zsh"
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
# use vi mode
setw -g mode-keys vi
# set -g status-keys vi
# use mouse in copy mode
setw -g mode-mouse on
# splitting and current path (same to binding c
unbind %
bind h split-window -h -c "#{pane_current_path}"
unbind '"'
bind v split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# window switching
unbind n
bind = next-window
#unbind p
bind - previous-window
bind -n C-Right next-window
bind -n C-Left previous-window
# with mouse (click on pretty little boxes)
set -g mouse-select-window on
# colon :
bind : command-prompt
# clear scroll-back
bind -n C-k clear-history
# panes
#set -g pane-border-fg black
#set -g pane-active-border-fg brightred
#set -g pane-active-border-attr blink
# resize panes with mouse (drag borders)
set -g mouse-select-pane on
set -g mouse-resize-pane on
# border color
set-option -g pane-active-border-fg blue
# status line
#set -g status-utf8 on
#set -g status-justify left
#set -g status-bg black
#set -g status-fg green
#set -g status-interval 2
#set-option -g status-right '#H #[fg=colour]%I:%M #[fg=colour14]%d.%m.%Y'
# messaging
#set -g message-fg red
#set -g message-bg black
#set -g message-command-fg red
#set -g message-command-bg brightblack
#window mode
#setw -g mode-bg colour6
#setw -g mode-fg colour0
# window status
#setw -g window-status-format " #F#I:#W#F " */
#setw -g window-status-current-format " #F#I:#W#F "
#setw -g window-status-format "#[fg=black]#[bg=brightblack] #I #[bg=black]#[fg=brightblack] #W "
#setw -g window-status-current-format "#[bg=green]#[fg=black] #I #[fg=green]#[bg=black] #W "
#setw -g window-status-current-bg black
#setw -g window-status-current-fg green
#setw -g window-status-current-attr dim
#setw -g window-status-bg green
#setw -g window-status-fg black
#setw -g window-status-attr reverse
#setw -g window-status-content-bg colour0
#setw -g window-status-content-fg green
#setw -g window-status-content-attr bold,blink,reverse
#set-option -g status-right '#[fg=colour3]#[#(osascript ~/itunes.scpt)] #H #[fg=colour]%I:%M #[fg=colour13]%m/%d/%Y'
#set -g status-right-length
#set -g status-right '#[fg=black]#[bg=black] #(~/Workspace/itunes-current-track-tmux.sh) #H #[fg=yellow]%H:%M #[fg=magenta]%m/%d/%Y'
#setw -g window-status-content-attr bold,reverse
# Info on right (requires stlarch-terminusmod font)
#set -g status-right-length 60
#set -g status-right '#[fg=brightblue]ßÜ #[fg=brightyellow]#(tmux_upspeed)/#(tmux_downspeed) #[fg=colour7]| #[fg=brightblue]ª #[fg=brightyellow]#(sensors | grep temp1 | cut -d+ -f2 | cut -d. -f1) #[fg=colour7]| #[fg=brightblue]ï #[fg=brightyellow]#(acpi -b | cut -d" " -f4 | cut -d"%" -f1) #[fg=colour7]| #[fg=brightred]#(cut -d " " -f 1-3 /proc/loadavg) #[fg=colour7]| #[fg=brightgreen]%a %H:%M'
# Info on left (I don't have a session display for now)
#set -g status-left ''
# loud or quiet?
#iset-option -g visual-activity on
#set-option -g visual-bell off
#set-option -g visual-content off
#set-option -g visual-silence off
#set-window-option -g monitor-activity off
#set-window-option -g monitor-content on
#set-option -g bell-action none
# To install tpm
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @tpm_plugins " \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-copycat \
tmux-plugins/tmux-yank \
"
# Other examples:
# github_username/plugin_name \
# [email protected]/user/plugin \
# [email protected]/user/plugin \
# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run-shell ~/.tmux/plugins/tpm/tpm
# tmux clock
#set -g clock-mode-colour red
# some key-binding changes
#bind x kill-pane
#bind X next-layout
#bind Z previous-layout