From 75a5f3f41ac76787a15ea822889ba81e3aa93417 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Fri, 11 Mar 2016 20:48:06 +1100 Subject: [PATCH] added tiny option to --gpu_shorthand removes 'Graphics', 'GeForce' and 'Radeon' from output --- 1.5.md | 4 ++++ README.md | 2 +- config/config | 2 +- neofetch | 36 +++++++++++++++++++++++------------- neofetch.1 | 2 +- 5 files changed, 30 insertions(+), 16 deletions(-) diff --git a/1.5.md b/1.5.md index e6d829b2..00a4bac3 100644 --- a/1.5.md +++ b/1.5.md @@ -11,6 +11,10 @@ **Disk Usage**
- Only display usage of local disks. +**GPU**
+- Add `tiny` option to shorten output of GPU even further. +- Removes words 'Graphics', 'GeForce' and 'Radeon' + ### Ascii - Kaos: Update ascii logo to the new logo. diff --git a/README.md b/README.md index f7bcf776..77b1df3c 100644 --- a/README.md +++ b/README.md @@ -271,7 +271,7 @@ alias fetch2="fetch \ NOTE: This only support Linux with cpufreq. --kernel_shorthand on/off Shorten the output of kernel --uptime_shorthand on/off Shorten the output of uptime (tiny, on, off) - --gpu_shorthand on/off Shorten the output of GPU + --gpu_shorthand on/off Shorten the output of GPU (tiny, on, off) --gtk_shorthand on/off Shorten output of gtk theme/icons --gtk2 on/off Enable/Disable gtk2 theme/icons output --gtk3 on/off Enable/Disable gtk3 theme/icons output diff --git a/config/config b/config/config index 2fa40574..ab9a1332 100644 --- a/config/config +++ b/config/config @@ -97,7 +97,7 @@ speed_type="max" # GPU # Shorten output of the getgpu funcion -# --gpu_shorthand on/off +# --gpu_shorthand on/off/tiny gpu_shorthand="on" diff --git a/neofetch b/neofetch index c1be7cec..c94fe63b 100755 --- a/neofetch +++ b/neofetch @@ -117,7 +117,7 @@ speed_type="max" # GPU # Shorten output of the getgpu funcion -# --gpu_shorthand on/off +# --gpu_shorthand on/off/tiny gpu_shorthand="on" @@ -972,17 +972,27 @@ getgpu () { ;; esac - if [ "$gpu_shorthand" == "on" ]; then - gpu=${gpu// Rev\. ?} - gpu=${gpu//AMD*\/ATI\]/AMD} - gpu=${gpu// Tahiti} - gpu=${gpu// PRO} - gpu=${gpu// OEM} - gpu=${gpu// Mars} - gpu=${gpu// Series} - gpu=${gpu// Controller} - gpu=${gpu/\/*} - fi + case "$gpu_shorthand" in + "on" | "tiny") + gpu=${gpu// Rev\. ?} + gpu=${gpu//AMD*\/ATI\]/AMD} + gpu=${gpu// Tahiti} + gpu=${gpu// PRO} + gpu=${gpu// OEM} + gpu=${gpu// Mars} + gpu=${gpu// Series} + gpu=${gpu// Controller} + gpu=${gpu/\/*} + + case "$gpu_shorthand" in + "tiny") + gpu=${gpu/Graphics } + gpu=${gpu/GeForce } + gpu=${gpu/Radeon } + ;; + esac + ;; + esac gpu="${gpu}${count}" } @@ -2297,7 +2307,7 @@ usage () { cat << EOF NOTE: This only support Linux with cpufreq. --kernel_shorthand on/off Shorten the output of kernel --uptime_shorthand on/off Shorten the output of uptime (tiny, on, off) - --gpu_shorthand on/off Shorten the output of GPU + --gpu_shorthand on/off Shorten the output of GPU (tiny, on, off) --gtk_shorthand on/off Shorten output of gtk theme/icons --gtk2 on/off Enable/Disable gtk2 theme/icons output --gtk3 on/off Enable/Disable gtk3 theme/icons output diff --git a/neofetch.1 b/neofetch.1 index f623f32c..607e33c6 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -40,7 +40,7 @@ Shorten the output of kernel Shorten the output of uptime (tiny, on, off) .TP .B \--gpu_shorthand 'on/off' -Shorten the output of GPU +Shorten the output of GPU (tiny, on, off) .TP .B \--gtk_shorthand 'on/off' Shorten output of gtk theme/icons