fetch

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

commit 63eee1df2b80ab73f94d8d7f252fdb05a76307f4
parent d606d3dca5130f638183840375c6f22c46d41ff2
Author: Byron Torres <b@torresjrjr>
Date:   Fri, 29 Jan 2021 11:00:34 +0000

Format code, add email

Diffstat:
Mfetch | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/fetch b/fetch @@ -1,16 +1,16 @@ #!/bin/sh # A fetch for MSYS2 on Windows. -# @torresjrjr +# @torresjrjr <b@torresjrjr.com> ## Colours and cursor util + c0=$(printf '\e[0m' ) c1=$(printf '\e[31m'); c2=$(printf '\e[32m') c3=$(printf '\e[33m'); c4=$(printf '\e[34m') c5=$(printf '\e[35m'); c6=$(printf '\e[36m') c7=$(printf '\e[37m'); c8=$(printf '\e[38m') - reposition_cursor() { printf '\r' for i in $(seq ${graphic_y}); do printf '\e[A'; done @@ -22,6 +22,7 @@ padding() { ## Graphic + graphic_y=7 # height graphic_x=15 # width @@ -44,6 +45,7 @@ palette() { ## Statuslines + _title() { user="${USER}" host=$(hostname) @@ -76,6 +78,7 @@ _tmux() { ## Status + status() { padding; _title "${c5}%s@%s${c3} %s\n" padding; _os "${c6}os: ${c0}%s\n" @@ -83,11 +86,12 @@ status() { padding; _shell "${c6}shell: ${c0}%s\n" padding; _sshd "${c6}sshd: ${c0}%s\n" padding; _tmux "${c6}tmux: ${c0}%s\n" - #padding; palette +# padding; palette } ## Run + main() { graphic reposition_cursor @@ -96,5 +100,3 @@ main() { } main - -# @torresjrjr