Merge pull request #133 from iandrewt/gpu_shorthand-tiny

added tiny option to --gpu_shorthand
This commit is contained in:
Dylan Araps 2016-03-11 20:59:22 +11:00
commit 679346df39
4 changed files with 26 additions and 16 deletions

View File

@ -283,7 +283,7 @@ alias fetch2="fetch \
Possible values: name, speed, tiny, on, off Possible values: name, speed, tiny, on, off
--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

@ -102,7 +102,7 @@ cpu_shorthand="off"
# 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

@ -123,7 +123,7 @@ cpu_shorthand="off"
# 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"
@ -1000,17 +1000,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}"
} }
@ -2327,7 +2337,7 @@ usage () { cat << EOF
Possible values: name, speed, tiny, on, off Possible values: name, speed, tiny, on, off
--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

@ -45,7 +45,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