Added launch flag to disable info lines at launch

This commit is contained in:
Dylan 2016-01-13 16:15:01 +11:00
parent afbc03605b
commit d7f5c575d3
2 changed files with 12 additions and 0 deletions

View File

@ -110,6 +110,7 @@ Once you set the var the script will scale the image and padding
usage: ${0##*/} [--colors 1 2 3 4 5] [--kernel "\$\(uname -rs\)"]
Info:
--exclude "OS: getos" Disable an info line at launch
--title string Change the title at the top
--distro string/cmd Manually set the distro
--kernel string/cmd Manually set the kernel

11
fetch
View File

@ -39,6 +39,11 @@ export LANGUAGE=C
#
# Optional info lines that are disabled by default are:
# "getresolution" "getsong" "getvisualstyle"
#
# Info lines enabled by default are:
# "gettitle" "getdistro" "getkernel" "getuptime" "getpackages"
# "getshell" "getresolution" "getwindowmanager" "getgtktheme"
# "getgtkicons" "getcpu" "getmemory" "getcols"
info=(
"gettitle"
"underline"
@ -884,6 +889,7 @@ usage () { cat << EOF
usage: ${0##*/} [--colors 1 2 3 4 5] [--kernel "\$\(uname -rs\)"]
Info:
--exclude "OS: getos" Disable an info line at launch
--title string Change the title at the top
--distro string/cmd Manually set the distro
--kernel string/cmd Manually set the kernel
@ -971,6 +977,7 @@ exit 1
while [ "$1" ]; do
case $1 in
# Info
--exclude) info=("${info[@]/$2}") ;;
--title) title="$2" ;;
--os) os="$2" ;;
--kernel) kernel="$2" ;;
@ -1080,6 +1087,10 @@ printinfo () {
fi
;;
"")
continue
;;
*:*|*)
# Update the var
var=${function/get/}