diff --git a/sh/tmux.sh b/sh/tmux.sh index a437b23..8c5770a 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -27,41 +27,19 @@ rwx_tmux_servers() { \" for path in \${paths}; do name=\"\$(basename \"\${path}\")\" - text=\"\${text}\\ -#[fg=default]\\ -#[bg=default] \\ -\" if [ \"\${active}\" = \"\${name}\" ]; then text=\"\${text}#[fg=green]\" else text=\"\${text}#[fg=yellow]\" fi text=\"\${text}\\ -#[bg=##181818] \\ -#[bg=##282828]\${name}\\ -#[bg=##181818] \\ -\" +#[bg=##181818] #[bg=##282828]\\ +\${name}\\ +#[bg=##181818] #[bg=default]#[fg=default] \" done IFS=\"\${ifs}\" echo \"\${text}\" } -rwx_tmux_uptime() { - local since=\"\$(uptime --since)\" - local date=\"\$(echo \"\${since}\" | awk '{print \$1}')\" - local time=\"\$(echo \"\${since}\" | awk '{print \$2}')\" - echo \"\\ -#[fg=yellow]\\ -#[bg=##181818] \\ -#[bg=##282828]\${date}\\ -#[bg=##181818] \\ -#[fg=default]\\ -#[bg=default] \\ -#[fg=yellow]\\ -#[bg=##181818] \\ -#[bg=##282828]\${time}\\ -#[bg=##181818] \\ -\" -} " rwx_file_write "${file}" "\ # ╭────────╮ @@ -106,12 +84,12 @@ set-option -g set-titles on # set title to working directory set-option -g set-titles-string '\ #(sh -c \". ${script}; rwx_tmux_server\")\ - → \ + → \ #{session_name}\ - → \ -#{window_name} (#{window_index}∕#{session_windows})\ - → \ -#{pane_current_command} (#{pane_index}∕#{window_panes})\ + → \ +#{window_name} (#{window_index}∕#{session_windows})\ + → \ +#{pane_current_command} (#{pane_index}∕#{window_panes})\ ' # ╭────────┬──────╮ @@ -154,16 +132,10 @@ set-option -g status-format[0] '\ #[bg=##181818]#{?window_zoomed_flag,#[fg=magenta]], }\ #[fg=default]\ #[bg=default] \ -} \ +}\ #[align=right]\ #[fg=yellow]\ #[bg=##181818] \ -#[bg=##282828]%Y-%m-%d\ -#[bg=##181818] \ -#[fg=default]\ -#[bg=default] \ -#[fg=yellow]\ -#[bg=##181818] \ #[bg=##282828]%H:%M:%S\ #[bg=##181818]#{?client_prefix,#[fg=green]p, }\ ' @@ -171,28 +143,32 @@ set-option -g status-format[0] '\ # line 2 set-option -g status-format[1] '\ #{S:\ -#{?session_many_attached,#[fg=red],\ -#{?session_attached,#[fg=green],#[fg=yellow]}}\ +#{?session_many_attached,#[fg=magenta],\ +#{?session_attached,#[fg=red],#[fg=yellow]}}\ #[bg=##181818] \ #[bg=##282828]#{session_name}\ #[bg=##181818] \ #[fg=default]\ #[bg=default] \ -} \ +}\ +#[fg=white]→\ +#[fg=default] \ +#[fg=green]\ +#[bg=##181818] \ +#[bg=##282828]#{session_name}\ +#[bg=##181818] \ #[align=right]\ -#(sh -c \". ${script}; rwx_tmux_servers\")\ +#[fg=yellow]\ +#[bg=##181818] \ +#[bg=##282828]%Y-%m-%d\ +#[bg=##181818] \ ' # line 3 set-option -g status-format[2] '\ -#[fg=cyan]#{pane_current_path}\ -#[fg=default]\ -#[bg=default] \ -#[align=right]\ #[fg=yellow]\ -#[bg=##181818] \ -#[bg=##282828]#{session_name}\ -#[bg=##181818] \ +#(sh -c \". ${script}; rwx_tmux_servers\")\ +#[fg=cyan]#{pane_current_path}\ ' # line 4 @@ -204,9 +180,12 @@ set-option -g status-format[3] '\ #[bg=##181818] \ #[fg=default]\ #[bg=default] \ -} \ +}\ #[align=right]\ -#(sh -c \". ${script}; rwx_tmux_uptime\")\ +#[fg=yellow]\ +#[bg=##181818] \ +#[bg=##282828]#{host}\ +#[bg=##181818] \ ' # line 5 @@ -218,24 +197,18 @@ set-option -g status-format[4] '\ #[bg=##181818] \ #[fg=default]\ #[bg=default] \ -} \ +}\ +#[fg=white]=\ +#[fg=default] \ #[fg=green]\ #[bg=##181818] \ #[bg=##282828]#{window_width}×#{window_height}\ #[bg=##181818] \ -#[fg=default]\ -#[bg=default] \ #[align=right]\ #{?uid,#[fg=green],#[fg=red]}\ #[bg=##181818] \ #[bg=##282828]#{user}\ #[bg=##181818] \ -#[fg=default]\ -#[bg=default] \ -#[fg=yellow]\ -#[bg=##181818] \ -#[bg=##282828]#{host}\ -#[bg=##181818] \ ' # refresh period