fetch

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

commit 4e6dc2a15a640fddc27d0b5d18d8d7a32f6f88b6
parent 53cde5e488b63464f3ccc84e5c3505812f388056
Author: Byron Torres <b@torresjrjr>
Date:   Fri, 29 Jan 2021 12:00:22 +0000

Improve _title() and _sshd()

Diffstat:
Mfetch | 10++--------
1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/fetch b/fetch @@ -40,19 +40,13 @@ palette() { ## Statuslines -_title() { - user="${USER}" - host=$(hostname) - date=$(date -R) - printf "$1" "${user}" "${host}" "${date}" -} +_title() { printf "$1" "$(whoami)" "$(hostname)" "$(date -R)" ;} _os() { printf "$1" "$(uname -o)" ;} _kernel() { printf "$1" "$(uname -sr)" ;} _shell() { printf "$1" "${SHELL}" ;} _sshd() { sshd_pid=$(ps | grep sshd | awk '{print $1}' | paste -s) - sshd_pid=${sshd_pid:---} - printf "$1" "${sshd_pid}" + printf "$1" "${sshd_pid:---}" } _tmux() { if ps | grep tmux >/dev/null