Linux

ed2f623e :Anonymous 2017-07-01 16:26
>>98f37793
ふう。とりあえずなんとか使えるように設定しなおした。
```

# 設定ファイルをリロードする
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# 256色端末を使用する tmux -2 オプションを付ける事。
set -g default-terminal "screen-256color"

# utf8を有効にする
set-window-option -g utf8 on
# バックスクロール行数を増やす
set -g history-limit 10000
# マウス操作
# 有効にするとマウスキャレットで選択できなくなる
# さらにtmux Ver2.1からは mode-mouse on だけになる。
#set -g mouse-select-pane on
#set -g mouse-select-window on
#set -g mouse-resize-pane on
#set -g mode-mouse on
# マウス関連(デフォルトはOFFにしておいて、prefix+mで切替える)http://bit.ly/1N6URvr
set-option -gw mode-mouse off
bind-key m \
if-shell "tmux show-options -gw mode-mouse | grep off" "set-option -gq mouse-utf8 on" "set-option -gq mouse-utf8 off" \;\
if-shell "tmux show-options -gw mode-mouse | grep off" "set-option -gq mouse-resize-pane on" "set-option -gq mouse-resize-pane off" \;\
if-shell "tmux show-options -gw mode-mouse | grep off" "set-option -gq mouse-select-pane on" "set-option -gq mouse-select-pane off" \;\
if-shell "tmux show-options -gw mode-mouse | grep off" "set-option -gq mouse-select-window on" "set-option -gq mouse-select-window off" \;\
if-shell "tmux show-options -gw mode-mouse | grep off" "set-option -gw mode-mouse on" "set-option -gw mode-mouse off"

# Set the prefix to ^t.
unbind C-b
set -g prefix ^t
bind a send-prefix

# screen ^C c
unbind ^C
bind ^C new-window
unbind c
bind c new-window

# detach ^D d
unbind ^D
bind ^D detach

# displays *
unbind *
bind * list-clients

# next window sp n t ^t
unbind t
bind ^t next-window
unbind " "
bind " " next-window
unbind n
bind n next-window


# コピーモード バックスクロール
unbind [
bind [ copy-mode \; display "Copy mode!"


# title A
unbind A
bind A command-prompt "rename-window %%"

# other ^A
unbind ^A
bind ^A last-window

# prev ^H ^P p ^?
unbind ^H
bind ^H previous-window
unbind ^P
bind ^P previous-window
unbind p
bind p previous-window
unbind BSpace
bind BSpace previous-window

# windows ^W w
unbind ^W
bind ^W list-windows
unbind w
bind w list-windows

# quit \
unbind '\'
bind '\' confirm-before "kill-server"

# kill K k
unbind K
bind K kill-window
unbind k
bind k confirm-before -p "kill-window #W? (y/n)" kill-window

# redisplay ^L l
unbind ^L
bind ^L refresh-client
unbind l
bind l refresh-client

# ペインまわり
# split -v |
unbind |
bind | split-window
unbind 0
bind 0 kill-pane
# 横に分割
unbind 2
bind 2 split-window -v
# 縦に分割
unbind 3
bind 3 split-window -h



# :kB: focus up
unbind Tab
bind Tab select-pane -t:.+
unbind BTab
bind BTab select-pane -t:.-

# " windowlist -b
#unbind '"'
#bind '"' choose-window


# キーストロークのディレイを減らす
set -sg escape-time 1
# ウィンドウのインデックスを1から始める
set -g base-index 1
# ペインのインデックスを1から始める
setw -g pane-base-index 1

# ステータスバーの色を設定する
set -g status-bg white
set -g status-fg black

# ウィンドウリストの色を設定する
setw -g window-status-fg gray
setw -g window-status-bg default
setw -g window-status-attr dim
# アクティブなウィンドウを目立たせる
setw -g window-status-current-fg red
setw -g window-status-current-bg white
setw -g window-status-current-attr bright

# ペインボーダーの色を設定する
set -g pane-border-fg green
set -g pane-border-bg black
# アクティブなペインを目立たせる
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow

# status-left の最大の長さを指定する。
#set-option -g status-left-length 20
# status-left のフォーマットを指定する。
#set-option -g status-left "#[fg=colour255,bg=colour241]Session: #S #[default]"

# window-status のフォーマットを指定する。
set-window-option -g window-status-format " #I: #W "
# カレントウィンドウの window-status のフォーマットを指定する
#set-window-option -g window-status-current-format " #I: #W #[default]"

# status-right の最大の長さを指定する。
set-option -g status-right-length 60
# status-right のフォーマットを指定する。
set-option -g status-right " #(lsb_release -a|grep Release|cut -f 2) [avg #(cut -d' ' -f-1 /proc/loadavg)][%Y-%m-%d %H:%M]#[default]"

```
Powered by shinGETsu.