Skip to content

Instantly share code, notes, and snippets.

@HayatoDoi
Last active October 24, 2016 11:51
Show Gist options
  • Save HayatoDoi/b75ab6e80b8af3c196ba60a6a3ea903f to your computer and use it in GitHub Desktop.
Save HayatoDoi/b75ab6e80b8af3c196ba60a6a3ea903f to your computer and use it in GitHub Desktop.
# =====================================================
# This program is for the Japanese.
# Therefore, comments are written in Japanese.
# All will be understood by reading the source code.
# =====================================================
# File name : .tmux.conf
# Author : Hayato Doi
# Last Update : 2016/10/22
# Since : 2016/10/17
# Outline : tmuxの設定ファイル
# Update information : ls 等の色を変更
# Copyright (c) 2016, Hayato Doi
# マウスを使用可能にする
set-window-option -g mode-mouse on
# 親端末のTERMがxtermの場合
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# 256色端末を使用する
set -g default-terminal "screen-256color"
# prefixキーをC-aに変更する
set -g prefix C-a
# ウィンドウリストの色を設定する
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
# アクティブなウィンドウを目立たせる
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
# | でペインを縦に分割する
bind | split-window -h
# _ でペインを横に分割する
bind _ split-window -v
# ペインのサイズをhjklで変更
bind -r C-h resize-pane -L 5
bind -r C-j resize-pane -D 5
bind -r C-k resize-pane -U 5
bind -r C-l resize-pane -R 5
# 画面ドラッグ時にコピーモードにする
set-option -g mode-mouse on
# マウスでペインを選択できるようにする
set-option -g mouse-select-pane on
# マウスでウィンドウを切り替えられるようにする
set-option -g mouse-select-window on
# マウスでリサイズできるようにする
set-option -g mouse-resize-pane on
# status line を更新する間隔を 1 秒にする
set-option -g status-interval 1
# window-status を中央揃えで配置する
# set-option -g status-justify "centre"
# status line の背景色を指定する。
set-option -g status-bg "colour238"
# status line の文字色を指定する。
set-option -g status-fg "colour255"
# status-left の最大の長さを指定する。
set-option -g status-left-length 20
# status-left のフォーマットを指定する。
set-option -g status-left "#[fg=colour255,bg=colour241]Session: #S #[default]"
# status-right の最大の長さを指定する。
set-option -g status-right-length 60
# status-right のフォーマットを指定する。
set-option -g status-right "#[fg=colour255,bg=colour241] #h | LA: #(cut -d' ' -f-3 /proc/loadavg) | %m/%d %H:%M:%S#[default]"
# window-status のフォーマットを指定する。
set-window-option -g window-status-format " #I: #W "
# カレントウィンドウの window-status のフォーマットを指定する
set-window-option -g window-status-current-format "#[fg=colour255,bg=colour27,bold] #I: #W #[default]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment