added tiny option to --gpu_shorthand

removes 'Graphics', 'GeForce' and 'Radeon' from output
This commit is contained in:
Andrew Titmuss 2016-03-11 20:48:06 +11:00
parent f845553a80
commit 75a5f3f41a
5 changed files with 30 additions and 16 deletions

4
1.5.md
View File

@ -11,6 +11,10 @@
**Disk Usage**<br \> **Disk Usage**<br \>
- Only display usage of local disks. - Only display usage of local disks.
**GPU**</br>
- Add `tiny` option to shorten output of GPU even further.
- Removes words 'Graphics', 'GeForce' and 'Radeon'
### Ascii ### Ascii
- Kaos: Update ascii logo to the new logo. - Kaos: Update ascii logo to the new logo.

View File

@ -271,7 +271,7 @@ alias fetch2="fetch \
NOTE: This only support Linux with cpufreq. NOTE: This only support Linux with cpufreq.
--kernel_shorthand on/off Shorten the output of kernel --kernel_shorthand on/off Shorten the output of kernel
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off) --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 --gtk_shorthand on/off Shorten output of gtk theme/icons
--gtk2 on/off Enable/Disable gtk2 theme/icons output --gtk2 on/off Enable/Disable gtk2 theme/icons output
--gtk3 on/off Enable/Disable gtk3 theme/icons output --gtk3 on/off Enable/Disable gtk3 theme/icons output

View File

@ -97,7 +97,7 @@ speed_type="max"
# GPU # GPU
# Shorten output of the getgpu funcion # Shorten output of the getgpu funcion
# --gpu_shorthand on/off # --gpu_shorthand on/off/tiny
gpu_shorthand="on" gpu_shorthand="on"

View File

@ -117,7 +117,7 @@ speed_type="max"
# GPU # GPU
# Shorten output of the getgpu funcion # Shorten output of the getgpu funcion
# --gpu_shorthand on/off # --gpu_shorthand on/off/tiny
gpu_shorthand="on" gpu_shorthand="on"
@ -972,17 +972,27 @@ getgpu () {
;; ;;
esac esac
if [ "$gpu_shorthand" == "on" ]; then case "$gpu_shorthand" in
gpu=${gpu// Rev\. ?} "on" | "tiny")
gpu=${gpu//AMD*\/ATI\]/AMD} gpu=${gpu// Rev\. ?}
gpu=${gpu// Tahiti} gpu=${gpu//AMD*\/ATI\]/AMD}
gpu=${gpu// PRO} gpu=${gpu// Tahiti}
gpu=${gpu// OEM} gpu=${gpu// PRO}
gpu=${gpu// Mars} gpu=${gpu// OEM}
gpu=${gpu// Series} gpu=${gpu// Mars}
gpu=${gpu// Controller} gpu=${gpu// Series}
gpu=${gpu/\/*} gpu=${gpu// Controller}
fi gpu=${gpu/\/*}
case "$gpu_shorthand" in
"tiny")
gpu=${gpu/Graphics }
gpu=${gpu/GeForce }
gpu=${gpu/Radeon }
;;
esac
;;
esac
gpu="${gpu}${count}" gpu="${gpu}${count}"
} }
@ -2297,7 +2307,7 @@ usage () { cat << EOF
NOTE: This only support Linux with cpufreq. NOTE: This only support Linux with cpufreq.
--kernel_shorthand on/off Shorten the output of kernel --kernel_shorthand on/off Shorten the output of kernel
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off) --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 --gtk_shorthand on/off Shorten output of gtk theme/icons
--gtk2 on/off Enable/Disable gtk2 theme/icons output --gtk2 on/off Enable/Disable gtk2 theme/icons output
--gtk3 on/off Enable/Disable gtk3 theme/icons output --gtk3 on/off Enable/Disable gtk3 theme/icons output

View File

@ -40,7 +40,7 @@ Shorten the output of kernel
Shorten the output of uptime (tiny, on, off) Shorten the output of uptime (tiny, on, off)
.TP .TP
.B \--gpu_shorthand 'on/off' .B \--gpu_shorthand 'on/off'
Shorten the output of GPU Shorten the output of GPU (tiny, on, off)
.TP .TP
.B \--gtk_shorthand 'on/off' .B \--gtk_shorthand 'on/off'
Shorten output of gtk theme/icons Shorten output of gtk theme/icons