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
--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

View File

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

View File

@ -123,7 +123,7 @@ cpu_shorthand="off"
# GPU
# Shorten output of the getgpu funcion
# --gpu_shorthand on/off
# --gpu_shorthand on/off/tiny
gpu_shorthand="on"
@ -1000,7 +1000,8 @@ getgpu () {
;;
esac
if [ "$gpu_shorthand" == "on" ]; then
case "$gpu_shorthand" in
"on" | "tiny")
gpu=${gpu// Rev\. ?}
gpu=${gpu//AMD*\/ATI\]/AMD}
gpu=${gpu// Tahiti}
@ -1010,7 +1011,16 @@ getgpu () {
gpu=${gpu// Series}
gpu=${gpu// Controller}
gpu=${gpu/\/*}
fi
case "$gpu_shorthand" in
"tiny")
gpu=${gpu/Graphics }
gpu=${gpu/GeForce }
gpu=${gpu/Radeon }
;;
esac
;;
esac
gpu="${gpu}${count}"
}
@ -2327,7 +2337,7 @@ usage () { cat << EOF
Possible values: name, speed, tiny, on, off
--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

View File

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