diff --git a/sh/tmux.sh b/sh/tmux.sh index 625d187..38853bd 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -45,6 +45,23 @@ rwx_tmux_servers() { 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}" "\ # ╭────────╮ @@ -187,10 +204,7 @@ set-option -g status-format[3] '\ #[bg=default] \ }\ #[align=right]\ -#[fg=yellow]\ -#[bg=##181818] \ -#[bg=##282828]#(uptime --since)\ -#[bg=##181818] \ +#[bg=##282828]#(sh -c \". ${script}; rwx_tmux_uptime\")\ ' # line 5