Skip to content

Instantly share code, notes, and snippets.

@kuchida1981
Created May 8, 2023 14:46
Show Gist options
  • Save kuchida1981/3cabb2ec0c8ef4e032590ddbe335a6e7 to your computer and use it in GitHub Desktop.
Save kuchida1981/3cabb2ec0c8ef4e032590ddbe335a6e7 to your computer and use it in GitHub Desktop.
tmux 設定
# プリフィクスを C-l に変更
set-option -g prefix C-l
unbind-key C-b
bind-key C-l send-prefix
# デフォルトシェルを fish とする
set-option -g default-shell /usr/bin/fish
# r で .tmux.conf を再読み込み
bind r source-file ~/.tmux.conf \; display-message "Reloaded"
# マウス操作を有効にする
set -g mouse on
# 256色表示をサポート
set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",$TERM:Tc"
# # vim風キーバインドをサポート
# setw -g mode-keys vi
# bind-key -t vi-copy v begin-selection
# bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# set -g default-command "reattach-to-user-namespace -l $SHELL"
unbind -T copy-mode-vi Enter
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-pipe "xsel -i --clipboard"
setw -g mode-keys vi
# ステータスバー表示設定
set-option -g status-right '#(get_ssid) #(battery -c tmux) [%Y-%m-%d(%a) %H:%M:%S]'
# ペインの番号の表示時間を長くする
set -g display-panes-time 3000
# ペイン選択をvim風にする
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind c new-window -c '#{pane_current_path}'
bind '"' split-window -c '#{pane_current_path}'
bind % split-window -h -c '#{pane_current_path}'
set-option -g detach-on-destroy off
# enable tpm
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-yank \
tmux-plugins/tmux-open \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-battery \
tmux-plugins/tmux-pain-control \
sainnhe/tmux-fzf \
'
run-shell '~/.tmux/plugins/tpm/tpm'
# set-option -sg escape-time 10
source /usr/share/powerline/bindings/tmux/powerline.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment