tmux/uptime

This commit is contained in:
Marc Beninca 2025-06-30 03:52:26 +02:00
parent f97f6a0fcd
commit 405473c8c5
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -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