From 75b665e1537efa3a836f852f6f65b8a64c633180 Mon Sep 17 00:00:00 2001 From: GaugeK Date: Wed, 19 Aug 2020 05:27:15 +1000 Subject: [PATCH] add field to print newline --- README.md | 2 +- fet.sh | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a90f40f..7dd25c4 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ fetch written in POSIX shell with no external commands ### Customization `fet.sh` can be configured using environment variables, for example: ``` -$ info='os wm sh' fet.sh +$ info='n os wm sh n' fet.sh ``` Supported options are: - `accent` (0-7) diff --git a/fet.sh b/fet.sh index f673250..c20b609 100755 --- a/fet.sh +++ b/fet.sh @@ -114,9 +114,9 @@ print() { read -r host < /proc/sys/kernel/hostname -echo -for i in ${info:-user os sh wm up gtk cpu mem host kern pkgs term col}; do +for i in ${info:-n user os sh wm up gtk cpu mem host kern pkgs term col n}; do case $i in + n) echo;; os) print os "$ID";; sh) print sh "${SHELL##*/}";; wm) print wm "$wm";; @@ -132,4 +132,3 @@ for i in ${info:-user os sh wm up gtk cpu mem host kern pkgs term col}; do col) col;; esac done -echo