From 7c327683a80b87f593a41c9770f51fd5f895bc86 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 29 Oct 2016 14:33:36 +1100 Subject: [PATCH] Kernel: Print kernel name by default --- README.md | 3 ++- config/config | 2 +- neofetch | 9 ++++++--- neofetch.1 | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b7b492a1..ddbadbef 100644 --- a/README.md +++ b/README.md @@ -449,7 +449,8 @@ alias neofetch2="neofetch \ NOTE This only works on linux. --distro_shorthand on/off Shorten the output of distro (tiny, on, off) NOTE: This is only possible on Linux, macOS, and Solaris - --kernel_shorthand on/off Shorten the output of kernel + --kernel_shorthand Shorten the output of kernel + Takes: on, tiny, off --uptime_shorthand on/off Shorten the output of uptime (tiny, on, off) --refresh_rate on/off Whether to display the refresh rate of each monitor Unsupported on Windows diff --git a/config/config b/config/config index 15b98e72..dc19fde9 100644 --- a/config/config +++ b/config/config @@ -55,7 +55,7 @@ printinfo() { # Kernel # Show more kernel info -# --kernel_shorthand on, off +# --kernel_shorthand on, off, tiny kernel_shorthand="on" diff --git a/neofetch b/neofetch index 0a1c6847..81262213 100755 --- a/neofetch +++ b/neofetch @@ -267,9 +267,11 @@ gettitle() { getkernel() { case "$kernel_shorthand" in - "on") kernel="$(uname -r)" ;; - "off") kernel="$(uname -srm)" ;; + "on") kernel_flags="-sr" ;; + "tiny") kernel_flags="-r" ;; + "off") kernel_flags="-srm" ;; esac + kernel="$(uname $kernel_flags)" } # }}} @@ -2886,7 +2888,8 @@ usage() { cat << EOF NOTE This only works on linux. --distro_shorthand on/off Shorten the output of distro (tiny, on, off) NOTE: This is only possible on Linux, macOS, and Solaris - --kernel_shorthand on/off Shorten the output of kernel + --kernel_shorthand Shorten the output of kernel + Takes: on, tiny, off --uptime_shorthand on/off Shorten the output of uptime (tiny, on, off) --refresh_rate on/off Whether to display the refresh rate of each monitor Unsupported on Windows diff --git a/neofetch.1 b/neofetch.1 index a5aec131..5ab210cc 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -53,7 +53,7 @@ Shorten the output of distro (tiny, on, off) .br NOTE: This is only possible on Linux, macOS, and Solaris .TP -.B \--kernel_shorthand 'on/off' +.B \--kernel_shorthand 'on/off/tiny' Shorten the output of kernel .TP .B \--uptime_shorthand 'on/off'