From 04d37437d821f0278394d01fdb8667c1fb208c96 Mon Sep 17 00:00:00 2001 From: Dylan Date: Fri, 29 Jan 2016 10:26:32 +1100 Subject: [PATCH] Added 'kernel_shorthand', set it to 'off' to print more kernel info --- 1.1.md | 5 +++++ README.md | 1 + fetch | 21 ++++++++++++++++----- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/1.1.md b/1.1.md index bc0810ed..66509755 100644 --- a/1.1.md +++ b/1.1.md @@ -3,9 +3,14 @@ - If `w3m` or `imagemagick` aren't installed we gracefully fallback to no image mode. - Fix padding escape codes on BSD systems. - 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 +**Kernel:** + +- Added `kernel_shorthand` to print less or more kernel info + **Distro:** - Added support for showing Max OS X build version. diff --git a/README.md b/README.md index d4f91794..4f17db58 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,7 @@ alias fetch2="fetch \ Possible values: current, min, max, bios, scaling_current, scaling_min, scaling_max NOTE: This only support Linux with cpufreq. + --kernel_shorthand Shorten the output of kernel --uptime_shorthand Shorten the output of uptime (tiny, on, off) --gpu_shorthand on/off Shorten the output of GPU --gtk_shorthand on/off Shorten output of gtk theme/icons diff --git a/fetch b/fetch index 82d2bdf2..c3ea4b8b 100755 --- a/fetch +++ b/fetch @@ -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 # --osx_buildversion on/off @@ -206,13 +212,13 @@ prompt_height=1 # }}} +# Image Options {{{ + + # Image Source # --image wall, shuffle, ascii, /path/to/img, off image="wall" -# Image Options {{{ - - # Thumbnail directory imgtempdir="$HOME/.fetchimages" @@ -429,7 +435,10 @@ gettitle () { # Kernel {{{ 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, scaling_current, scaling_min, scaling_max NOTE: This only support Linux with cpufreq. + --kernel_shorthand Shorten the output of kernel --uptime_shorthand Shorten the output of uptime (tiny, on, off) --gpu_shorthand on/off Shorten the output of GPU --gtk_shorthand on/off Shorten output of gtk theme/icons @@ -1776,6 +1786,7 @@ while [ "$1" ]; do # Info --osx_buildversion) osx_buildversion="$2" ;; --speed_type) speed_type="$2" ;; + --kernel_shorthand) kernel_shorthand="$2" ;; --uptime_shorthand) uptime_shorthand="$2" ;; --gpu_shorthand) gpu_shorthand="$2" ;; --gtk_shorthand) gtk_shorthand="$2" ;;