Added 'kernel_shorthand', set it to 'off' to print more kernel info

This commit is contained in:
Dylan 2016-01-29 10:26:32 +11:00
parent fcd4bad3c5
commit 04d37437d8
3 changed files with 22 additions and 5 deletions

5
1.1.md
View File

@ -3,9 +3,14 @@
- If `w3m` or `imagemagick` aren't installed we gracefully fallback to no image mode. - If `w3m` or `imagemagick` aren't installed we gracefully fallback to no image mode.
- Fix padding escape codes on BSD systems. - Fix padding escape codes on BSD systems.
- Swap escape codes from `\e` to `\033` for consistency. - Swap escape codes from `\e` to `\033` for consistency.
- We only move the cursor to the bottom of the terminal in w3m/iterm2 rendering modes.
### Info ### Info
**Kernel:**
- Added `kernel_shorthand` to print less or more kernel info
**Distro:** **Distro:**
- Added support for showing Max OS X build version. - Added support for showing Max OS X build version.

View File

@ -180,6 +180,7 @@ alias fetch2="fetch \
Possible values: current, min, max, bios, Possible values: current, min, max, bios,
scaling_current, scaling_min, scaling_max scaling_current, scaling_min, scaling_max
NOTE: This only support Linux with cpufreq. NOTE: This only support Linux with cpufreq.
--kernel_shorthand Shorten the output of kernel
--uptime_shorthand Shorten the output of uptime (tiny, on, off) --uptime_shorthand 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
--gtk_shorthand on/off Shorten output of gtk theme/icons --gtk_shorthand on/off Shorten output of gtk theme/icons

21
fetch
View File

@ -87,8 +87,14 @@ printinfo () {
} }
# Distro # Kernel
# Show more kernel info
# --kernel_shorthand on/off
kernel_shorthand="on"
# Distro
# Mac OS X hide/show build version # Mac OS X hide/show build version
# --osx_buildversion on/off # --osx_buildversion on/off
@ -206,13 +212,13 @@ prompt_height=1
# }}} # }}}
# Image Options {{{
# Image Source # Image Source
# --image wall, shuffle, ascii, /path/to/img, off # --image wall, shuffle, ascii, /path/to/img, off
image="wall" image="wall"
# Image Options {{{
# Thumbnail directory # Thumbnail directory
imgtempdir="$HOME/.fetchimages" imgtempdir="$HOME/.fetchimages"
@ -429,7 +435,10 @@ gettitle () {
# Kernel {{{ # Kernel {{{
getkernel() { getkernel() {
kernel="$(uname -r)" case "$kernel_shorthand" in
"on") kernel="$(uname -r)" ;;
"off") kernel="$(uname -srm)" ;;
esac
} }
# }}} # }}}
@ -1684,6 +1693,7 @@ usage () { cat << EOF
Possible values: current, min, max, bios, Possible values: current, min, max, bios,
scaling_current, scaling_min, scaling_max scaling_current, scaling_min, scaling_max
NOTE: This only support Linux with cpufreq. NOTE: This only support Linux with cpufreq.
--kernel_shorthand Shorten the output of kernel
--uptime_shorthand Shorten the output of uptime (tiny, on, off) --uptime_shorthand 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
--gtk_shorthand on/off Shorten output of gtk theme/icons --gtk_shorthand on/off Shorten output of gtk theme/icons
@ -1776,6 +1786,7 @@ while [ "$1" ]; do
# Info # Info
--osx_buildversion) osx_buildversion="$2" ;; --osx_buildversion) osx_buildversion="$2" ;;
--speed_type) speed_type="$2" ;; --speed_type) speed_type="$2" ;;
--kernel_shorthand) kernel_shorthand="$2" ;;
--uptime_shorthand) uptime_shorthand="$2" ;; --uptime_shorthand) uptime_shorthand="$2" ;;
--gpu_shorthand) gpu_shorthand="$2" ;; --gpu_shorthand) gpu_shorthand="$2" ;;
--gtk_shorthand) gtk_shorthand="$2" ;; --gtk_shorthand) gtk_shorthand="$2" ;;