tmux/uptime
This commit is contained in:
parent
f97f6a0fcd
commit
405473c8c5
1 changed files with 18 additions and 4 deletions
22
sh/tmux.sh
22
sh/tmux.sh
|
@ -45,6 +45,23 @@ rwx_tmux_servers() {
|
||||||
IFS=\"\${ifs}\"
|
IFS=\"\${ifs}\"
|
||||||
echo \"\${text}\"
|
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}" "\
|
rwx_file_write "${file}" "\
|
||||||
# ╭────────╮
|
# ╭────────╮
|
||||||
|
@ -187,10 +204,7 @@ set-option -g status-format[3] '\
|
||||||
#[bg=default] \
|
#[bg=default] \
|
||||||
}\
|
}\
|
||||||
#[align=right]\
|
#[align=right]\
|
||||||
#[fg=yellow]\
|
#[bg=##282828]#(sh -c \". ${script}; rwx_tmux_uptime\")\
|
||||||
#[bg=##181818] \
|
|
||||||
#[bg=##282828]#(uptime --since)\
|
|
||||||
#[bg=##181818] \
|
|
||||||
'
|
'
|
||||||
|
|
||||||
# line 5
|
# line 5
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue