Compare commits
11 commits
f4d3d61cd7
...
b80a0a59e8
Author | SHA1 | Date | |
---|---|---|---|
b80a0a59e8 | |||
2f4f3a0131 | |||
de0371cebc | |||
daa0afd3d8 | |||
31fa93b117 | |||
2e6542208d | |||
34ea5a0369 | |||
8726dded45 | |||
79d1879edb | |||
3b28e8ed14 | |||
77bcdd5aac |
1 changed files with 38 additions and 33 deletions
55
sh/tmux.sh
55
sh/tmux.sh
|
@ -51,6 +51,8 @@ set-option -g set-titles on
|
|||
|
||||
# set title to working directory
|
||||
set-option -g set-titles-string '\
|
||||
#(basename \"\${TMUX}\" | cut --delimiter \",\" --fields \"1\")\
|
||||
- \
|
||||
#{session_name}\
|
||||
- \
|
||||
#{window_index}∕#{session_windows} #{window_name}\
|
||||
|
@ -80,7 +82,7 @@ set-option -g pane-border-style fg=blue
|
|||
# ╰────────┴────────╯
|
||||
|
||||
# status lines
|
||||
set-option -g status on
|
||||
set-option -g status 2
|
||||
|
||||
# background color
|
||||
set-option -g status-bg '#0D0D0D'
|
||||
|
@ -91,21 +93,20 @@ set-option -g status-fg white
|
|||
# line 1
|
||||
set-option -g status-format[0] '\
|
||||
#{W:\
|
||||
#[bg=##202020] #[bg=##303030]\
|
||||
#[bg=##202020]\
|
||||
#{?window_zoomed_flag,#[fg=magenta][, }\
|
||||
#[fg=yellow]#{window_index}\
|
||||
#{?window_zoomed_flag,#[fg=magenta]], }\
|
||||
\
|
||||
#[bg=##303030]\
|
||||
#{?window_active,#[fg=green],\
|
||||
#{?window_activity_flag,#[fg=red],#[fg=blue]}}\
|
||||
#{?window_activity_flag,#[fg=red],#[fg=yellow]}}\
|
||||
#{window_name}\
|
||||
#[bg=##303030] #[bg=##202020] \
|
||||
#[bg=##202020]\
|
||||
#{?window_zoomed_flag,#[fg=magenta]], }\
|
||||
#[bg=default] \
|
||||
}\
|
||||
#[align=right]\
|
||||
#[bg=##202020] #[bg=##303030]\
|
||||
#[fg=yellow]%H:%M:%S\
|
||||
#[bg=##303030] #[bg=##202020]\
|
||||
#[bg=##202020]\
|
||||
#{?client_prefix,#[fg=green]p, }\
|
||||
'
|
||||
|
||||
|
@ -114,60 +115,60 @@ set-option -g status-format[1] '\
|
|||
#{S:\
|
||||
#[bg=##202020] #[bg=##303030]\
|
||||
#{?session_many_attached,#[fg=red],\
|
||||
#{?session_attached,#[fg=magenta],#[fg=blue]}}\
|
||||
#{?session_attached,#[fg=magenta],#[fg=yellow]}}\
|
||||
#{session_name}\
|
||||
#[bg=##303030] #[bg=##202020] \
|
||||
#[bg=##202020] \
|
||||
#[bg=default] \
|
||||
}\
|
||||
#[fg=yellow]→ #[fg=green]#{session_name} \
|
||||
#[align=right]\
|
||||
#[bg=##202020] #[bg=##303030]\
|
||||
#[fg=yellow]%Y-%m-%d\
|
||||
#[bg=##303030] #[bg=##202020] \
|
||||
#[bg=##202020] \
|
||||
'
|
||||
|
||||
# line 3
|
||||
set-option -g status-format[2] '\
|
||||
#[fg=cyan]#{pane_current_path}\
|
||||
#[fg=yellow] \
|
||||
#(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]\
|
||||
#[bg=##202020] #[bg=##303030]\
|
||||
#[fg=yellow]#{host}\
|
||||
#[bg=##303030] #[bg=##202020] \
|
||||
#[bg=##202020] \
|
||||
'
|
||||
|
||||
# line 4
|
||||
set-option -g status-format[3] '\
|
||||
#{P:\
|
||||
#[bg=##202020] #[bg=##303030]\
|
||||
#[fg=yellow]#{pane_index}\
|
||||
\
|
||||
#{?pane_active,#[fg=green],#[fg=blue]}\
|
||||
#{?pane_active,#[fg=green],#[fg=yellow]}\
|
||||
#{pane_current_command}\
|
||||
#[bg=##303030] #[bg=##202020] \
|
||||
#[bg=##202020] \
|
||||
#[bg=default] \
|
||||
}\
|
||||
#[align=right]\
|
||||
#[bg=##202020] #[bg=##303030]\
|
||||
#{?uid,#[fg=green],#[fg=red]}\
|
||||
#{user}\
|
||||
#[bg=##303030] #[bg=##202020] \
|
||||
#[bg=##202020] \
|
||||
'
|
||||
|
||||
# line 5
|
||||
set-option -g status-format[4] '\
|
||||
#{P:\
|
||||
#[bg=##202020] #[bg=##303030]\
|
||||
#[fg=yellow]#{pane_index}\
|
||||
\
|
||||
#{?pane_active,#[fg=green],#[fg=blue]}\
|
||||
#{?pane_active,#[fg=green],#[fg=yellow]}\
|
||||
#{pane_width}×#{pane_height}\
|
||||
#[bg=##303030] #[bg=##202020] \
|
||||
#[bg=##202020] \
|
||||
#[bg=default] \
|
||||
}\
|
||||
#[align=right]\
|
||||
#[bg=##202020] #[bg=##303030]\
|
||||
#[fg=green]#{window_width}×#{window_height}\
|
||||
#[bg=##303030] #[bg=##202020] \
|
||||
#[bg=##202020] \
|
||||
'
|
||||
|
||||
# refresh period
|
||||
|
@ -221,12 +222,15 @@ bind-key C-w command-prompt { rename-window '%%' }
|
|||
bind-key h split-window -h
|
||||
bind-key v split-window -v
|
||||
|
||||
# toggle mouse
|
||||
bind-key t set-option -g mouse \\; display-message 'mouse = #{mouse}'
|
||||
# kill server
|
||||
bind-key k kill-server
|
||||
|
||||
# reload configuration
|
||||
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
|
||||
bind-key M-Left swap-window -t -1
|
||||
bind-key M-Right swap-window -t +1
|
||||
|
@ -239,6 +243,7 @@ bind-key M-Right swap-window -t +1
|
|||
# │ command-prompt │ │ │ │ : │
|
||||
# │ copy-mode │ │ │ │ PPage │
|
||||
# │ detach-client │ F6 │ │ │ d │
|
||||
# │ kill-server │ │ k │ │ │
|
||||
# │ new-session │ │ │ │ │
|
||||
# │ new-window │ F2 │ │ │ c │
|
||||
# │ next-window │ M-Right │ │ │ n │
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue