Compare commits
No commits in common. "b80a0a59e8b082ee766ef4d6c8b76eb5218e19cf" and "f4d3d61cd7c501fc0ffd8a4bdea2ab52ae40c627" have entirely different histories.
b80a0a59e8
...
f4d3d61cd7
1 changed files with 34 additions and 39 deletions
73
sh/tmux.sh
73
sh/tmux.sh
|
@ -51,8 +51,6 @@ set-option -g set-titles on
|
||||||
|
|
||||||
# set title to working directory
|
# set title to working directory
|
||||||
set-option -g set-titles-string '\
|
set-option -g set-titles-string '\
|
||||||
#(basename \"\${TMUX}\" | cut --delimiter \",\" --fields \"1\")\
|
|
||||||
- \
|
|
||||||
#{session_name}\
|
#{session_name}\
|
||||||
- \
|
- \
|
||||||
#{window_index}∕#{session_windows} #{window_name}\
|
#{window_index}∕#{session_windows} #{window_name}\
|
||||||
|
@ -82,7 +80,7 @@ set-option -g pane-border-style fg=blue
|
||||||
# ╰────────┴────────╯
|
# ╰────────┴────────╯
|
||||||
|
|
||||||
# status lines
|
# status lines
|
||||||
set-option -g status 2
|
set-option -g status on
|
||||||
|
|
||||||
# background color
|
# background color
|
||||||
set-option -g status-bg '#0D0D0D'
|
set-option -g status-bg '#0D0D0D'
|
||||||
|
@ -93,82 +91,83 @@ set-option -g status-fg white
|
||||||
# line 1
|
# line 1
|
||||||
set-option -g status-format[0] '\
|
set-option -g status-format[0] '\
|
||||||
#{W:\
|
#{W:\
|
||||||
#[bg=##202020]\
|
#[bg=##202020] #[bg=##303030]\
|
||||||
#{?window_zoomed_flag,#[fg=magenta][, }\
|
#{?window_zoomed_flag,#[fg=magenta][, }\
|
||||||
#[bg=##303030]\
|
#[fg=yellow]#{window_index}\
|
||||||
#{?window_active,#[fg=green],\
|
|
||||||
#{?window_activity_flag,#[fg=red],#[fg=yellow]}}\
|
|
||||||
#{window_name}\
|
|
||||||
#[bg=##202020]\
|
|
||||||
#{?window_zoomed_flag,#[fg=magenta]], }\
|
#{?window_zoomed_flag,#[fg=magenta]], }\
|
||||||
|
\
|
||||||
|
#{?window_active,#[fg=green],\
|
||||||
|
#{?window_activity_flag,#[fg=red],#[fg=blue]}}\
|
||||||
|
#{window_name}\
|
||||||
|
#[bg=##303030] #[bg=##202020] \
|
||||||
#[bg=default] \
|
#[bg=default] \
|
||||||
}\
|
}\
|
||||||
#[align=right]\
|
#[align=right]\
|
||||||
#[bg=##202020] #[bg=##303030]\
|
#[bg=##202020] #[bg=##303030] \
|
||||||
#[fg=yellow]%H:%M:%S\
|
#[fg=yellow]%H:%M:%S\
|
||||||
#[bg=##202020]\
|
#[bg=##303030] #[bg=##202020]\
|
||||||
#{?client_prefix,#[fg=green]p, }\
|
#{?client_prefix,#[fg=green]p, }\
|
||||||
'
|
'
|
||||||
|
|
||||||
# line 2
|
# line 2
|
||||||
set-option -g status-format[1] '\
|
set-option -g status-format[1] '\
|
||||||
#{S:\
|
#{S:\
|
||||||
#[bg=##202020] #[bg=##303030]\
|
#[bg=##202020] #[bg=##303030] \
|
||||||
#{?session_many_attached,#[fg=red],\
|
#{?session_many_attached,#[fg=red],\
|
||||||
#{?session_attached,#[fg=magenta],#[fg=yellow]}}\
|
#{?session_attached,#[fg=magenta],#[fg=blue]}}\
|
||||||
#{session_name}\
|
#{session_name}\
|
||||||
#[bg=##202020] \
|
#[bg=##303030] #[bg=##202020] \
|
||||||
#[bg=default] \
|
#[bg=default] \
|
||||||
}\
|
}\
|
||||||
#[fg=yellow]→ #[fg=green]#{session_name} \
|
#[fg=yellow]→ #[fg=green]#{session_name} \
|
||||||
#[align=right]\
|
#[align=right]\
|
||||||
#[bg=##202020] #[bg=##303030]\
|
#[bg=##202020] #[bg=##303030] \
|
||||||
#[fg=yellow]%Y-%m-%d\
|
#[fg=yellow]%Y-%m-%d\
|
||||||
#[bg=##202020] \
|
#[bg=##303030] #[bg=##202020] \
|
||||||
'
|
'
|
||||||
|
|
||||||
# line 3
|
# line 3
|
||||||
set-option -g status-format[2] '\
|
set-option -g status-format[2] '\
|
||||||
#[fg=yellow] \
|
#[fg=cyan]#{pane_current_path}\
|
||||||
#(lsof -U | awk \"/^tmux:.*\\(LISTEN\\)$/ {print \\\$9}\" \
|
|
||||||
| xargs -n \"1\" basename | sed \"s/^/ /;s/\$/ /\" | xargs echo) \
|
|
||||||
→ #[fg=green]\
|
|
||||||
#(basename \"\${TMUX}\" | cut --delimiter \",\" --fields \"1\") \
|
|
||||||
#[align=right]\
|
#[align=right]\
|
||||||
#[bg=##202020] #[bg=##303030]\
|
#[bg=##202020] #[bg=##303030] \
|
||||||
#[fg=yellow]#{host}\
|
#[fg=yellow]#{host}\
|
||||||
#[bg=##202020] \
|
#[bg=##303030] #[bg=##202020] \
|
||||||
'
|
'
|
||||||
|
|
||||||
# line 4
|
# line 4
|
||||||
set-option -g status-format[3] '\
|
set-option -g status-format[3] '\
|
||||||
#{P:\
|
#{P:\
|
||||||
#[bg=##202020] #[bg=##303030]\
|
#[bg=##202020] #[bg=##303030] \
|
||||||
#{?pane_active,#[fg=green],#[fg=yellow]}\
|
#[fg=yellow]#{pane_index}\
|
||||||
|
\
|
||||||
|
#{?pane_active,#[fg=green],#[fg=blue]}\
|
||||||
#{pane_current_command}\
|
#{pane_current_command}\
|
||||||
#[bg=##202020] \
|
#[bg=##303030] #[bg=##202020] \
|
||||||
#[bg=default] \
|
#[bg=default] \
|
||||||
}\
|
}\
|
||||||
#[align=right]\
|
#[align=right]\
|
||||||
#[bg=##202020] #[bg=##303030]\
|
#[bg=##202020] #[bg=##303030] \
|
||||||
#{?uid,#[fg=green],#[fg=red]}\
|
#{?uid,#[fg=green],#[fg=red]}\
|
||||||
#{user}\
|
#{user}\
|
||||||
#[bg=##202020] \
|
#[bg=##303030] #[bg=##202020] \
|
||||||
'
|
'
|
||||||
|
|
||||||
# line 5
|
# line 5
|
||||||
set-option -g status-format[4] '\
|
set-option -g status-format[4] '\
|
||||||
#{P:\
|
#{P:\
|
||||||
#[bg=##202020] #[bg=##303030]\
|
#[bg=##202020] #[bg=##303030] \
|
||||||
#{?pane_active,#[fg=green],#[fg=yellow]}\
|
#[fg=yellow]#{pane_index}\
|
||||||
|
\
|
||||||
|
#{?pane_active,#[fg=green],#[fg=blue]}\
|
||||||
#{pane_width}×#{pane_height}\
|
#{pane_width}×#{pane_height}\
|
||||||
#[bg=##202020] \
|
#[bg=##303030] #[bg=##202020] \
|
||||||
#[bg=default] \
|
#[bg=default] \
|
||||||
}\
|
}\
|
||||||
#[align=right]\
|
#[align=right]\
|
||||||
#[bg=##202020] #[bg=##303030]\
|
#[bg=##202020] #[bg=##303030] \
|
||||||
#[fg=green]#{window_width}×#{window_height}\
|
#[fg=green]#{window_width}×#{window_height}\
|
||||||
#[bg=##202020] \
|
#[bg=##303030] #[bg=##202020] \
|
||||||
'
|
'
|
||||||
|
|
||||||
# refresh period
|
# refresh period
|
||||||
|
@ -222,15 +221,12 @@ bind-key C-w command-prompt { rename-window '%%' }
|
||||||
bind-key h split-window -h
|
bind-key h split-window -h
|
||||||
bind-key v split-window -v
|
bind-key v split-window -v
|
||||||
|
|
||||||
# kill server
|
# toggle mouse
|
||||||
bind-key k kill-server
|
bind-key t set-option -g mouse \\; display-message 'mouse = #{mouse}'
|
||||||
|
|
||||||
# reload configuration
|
# reload configuration
|
||||||
bind-key r source-file ${file} \\; display-message 'source-file ${file}'
|
bind-key r source-file ${file} \\; display-message 'source-file ${file}'
|
||||||
|
|
||||||
# toggle mouse
|
|
||||||
bind-key t set-option -g mouse \\; display-message 'mouse = #{mouse}'
|
|
||||||
|
|
||||||
# swap window
|
# swap window
|
||||||
bind-key M-Left swap-window -t -1
|
bind-key M-Left swap-window -t -1
|
||||||
bind-key M-Right swap-window -t +1
|
bind-key M-Right swap-window -t +1
|
||||||
|
@ -243,7 +239,6 @@ bind-key M-Right swap-window -t +1
|
||||||
# │ command-prompt │ │ │ │ : │
|
# │ command-prompt │ │ │ │ : │
|
||||||
# │ copy-mode │ │ │ │ PPage │
|
# │ copy-mode │ │ │ │ PPage │
|
||||||
# │ detach-client │ F6 │ │ │ d │
|
# │ detach-client │ F6 │ │ │ d │
|
||||||
# │ kill-server │ │ k │ │ │
|
|
||||||
# │ new-session │ │ │ │ │
|
# │ new-session │ │ │ │ │
|
||||||
# │ new-window │ F2 │ │ │ c │
|
# │ new-window │ F2 │ │ │ c │
|
||||||
# │ next-window │ M-Right │ │ │ n │
|
# │ next-window │ M-Right │ │ │ n │
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue