Commit 7c327683 authored by Dylan Araps's avatar Dylan Araps

Kernel: Print kernel name by default

parent 0871c362
...@@ -449,7 +449,8 @@ alias neofetch2="neofetch \ ...@@ -449,7 +449,8 @@ alias neofetch2="neofetch \
NOTE This only works on linux. NOTE This only works on linux.
--distro_shorthand on/off Shorten the output of distro (tiny, on, off) --distro_shorthand on/off Shorten the output of distro (tiny, on, off)
NOTE: This is only possible on Linux, macOS, and Solaris 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) --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 --refresh_rate on/off Whether to display the refresh rate of each monitor
Unsupported on Windows Unsupported on Windows
......
...@@ -55,7 +55,7 @@ printinfo() { ...@@ -55,7 +55,7 @@ printinfo() {
# Kernel # Kernel
# Show more kernel info # Show more kernel info
# --kernel_shorthand on, off # --kernel_shorthand on, off, tiny
kernel_shorthand="on" kernel_shorthand="on"
......
...@@ -267,9 +267,11 @@ gettitle() { ...@@ -267,9 +267,11 @@ gettitle() {
getkernel() { getkernel() {
case "$kernel_shorthand" in case "$kernel_shorthand" in
"on") kernel="$(uname -r)" ;; "on") kernel_flags="-sr" ;;
"off") kernel="$(uname -srm)" ;; "tiny") kernel_flags="-r" ;;
"off") kernel_flags="-srm" ;;
esac esac
kernel="$(uname $kernel_flags)"
} }
# }}} # }}}
...@@ -2886,7 +2888,8 @@ usage() { cat << EOF ...@@ -2886,7 +2888,8 @@ usage() { cat << EOF
NOTE This only works on linux. NOTE This only works on linux.
--distro_shorthand on/off Shorten the output of distro (tiny, on, off) --distro_shorthand on/off Shorten the output of distro (tiny, on, off)
NOTE: This is only possible on Linux, macOS, and Solaris 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) --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 --refresh_rate on/off Whether to display the refresh rate of each monitor
Unsupported on Windows Unsupported on Windows
......
...@@ -53,7 +53,7 @@ Shorten the output of distro (tiny, on, off) ...@@ -53,7 +53,7 @@ Shorten the output of distro (tiny, on, off)
.br .br
NOTE: This is only possible on Linux, macOS, and Solaris NOTE: This is only possible on Linux, macOS, and Solaris
.TP .TP
.B \--kernel_shorthand 'on/off' .B \--kernel_shorthand 'on/off/tiny'
Shorten the output of kernel Shorten the output of kernel
.TP .TP
.B \--uptime_shorthand 'on/off' .B \--uptime_shorthand 'on/off'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment