fetch

A MSYS2-compatible sys-info prompt
Log | Files | Refs | README | LICENSE

commit 3f8093e2cbf8dde709021efee5fff9cced231652
parent 724bd45b9299b85d417814c604083070f5d8d03b
Author: Byron Torres <b@torresjrjr>
Date:   Mon, 16 Nov 2020 01:24:13 +0000

Add date, adjust spacing

Diffstat:
Mfetch | 23++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/fetch b/fetch @@ -4,6 +4,7 @@ printf '...\r' ## Get variables +date=$(date) shell=${SHELL##*/} user=${USER} host=$(hostname) @@ -18,11 +19,11 @@ sshd_pid=${sshd_pid:---} if ps | grep tmux >/dev/null then tmux_sessions=$( - tmux ls \ - | sed \ - -e 's/(created[^)]*)//' -e 's/(attached)/@/g' \ - -e 's/windows/w/g' -e 's/ //g' \ - | paste -s + tmux ls \ + | sed \ + -e 's/(created[^)]*)//' -e 's/(attached)/@/' \ + -e 's/windows/w/' -e 's/ //g' \ + | paste -s ) else tmux_sessions='--' @@ -50,12 +51,12 @@ ${c2} ${d}${c0} ## Create status status="\ -${c5}${user}@${host} -${c6}os: ${c0}${os} -${c6}kernel: ${c0}${kernel_name} ${kernel_release} -${c6}shell: ${c0}${shell} -${c6}sshd: ${c0}${sshd_pid} -${c6}tmux: ${c0}${tmux_sessions} +${c5}${user}@${host}${c3} ${date} +${c6}os: ${c0}${os} +${c6}kernel: ${c0}${kernel_name} ${kernel_release} +${c6}shell: ${c0}${shell} +${c6}sshd: ${c0}${sshd_pid} +${c6}tmux: ${c0}${tmux_sessions} " ## Print fetch