Merge branch 'master' of github.com:dylanaraps/neofetch
This commit is contained in:
commit
679aa306fb
2 changed files with 54 additions and 14 deletions
48
neofetch
48
neofetch
|
@ -4047,18 +4047,9 @@ color() {
|
||||||
|
|
||||||
stdout() {
|
stdout() {
|
||||||
image_backend="off"
|
image_backend="off"
|
||||||
unset subtitle_color
|
unset subtitle_color colon_color info_color underline_color bold title_color at_color \
|
||||||
unset colon_color
|
text_padding zws reset color_blocks get_line_break bar_color_elapsed bar_color_total \
|
||||||
unset info_color
|
c1 c2 c3 c4 c5 c6 c7 c8
|
||||||
unset underline_color
|
|
||||||
unset bold
|
|
||||||
unset title_color
|
|
||||||
unset at_color
|
|
||||||
unset text_padding
|
|
||||||
unset zws
|
|
||||||
unset reset
|
|
||||||
unset color_blocks
|
|
||||||
unset get_line_break
|
|
||||||
}
|
}
|
||||||
|
|
||||||
err() {
|
err() {
|
||||||
|
@ -4256,7 +4247,7 @@ decode_url() {
|
||||||
# FINISH UP
|
# FINISH UP
|
||||||
|
|
||||||
usage() { printf "%s" "\
|
usage() { printf "%s" "\
|
||||||
Usage: neofetch --option \"value\" --option \"value\"
|
Usage: neofetch func_name --option \"value\" --option \"value\"
|
||||||
|
|
||||||
Neofetch is a CLI system information tool written in BASH. Neofetch
|
Neofetch is a CLI system information tool written in BASH. Neofetch
|
||||||
displays information about your system next to an image, your OS logo,
|
displays information about your system next to an image, your OS logo,
|
||||||
|
@ -4267,6 +4258,23 @@ NOTE: Every launch flag has a config option.
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
INFO:
|
INFO:
|
||||||
|
func_name Specify a function name (second part of info() from config) to
|
||||||
|
quickly display only that function's information.
|
||||||
|
|
||||||
|
Example: neofetch uptime --uptime_shorthand tiny
|
||||||
|
|
||||||
|
Example: neofetch uptime disk wm memory
|
||||||
|
|
||||||
|
This can be used in bars and scripts like so:
|
||||||
|
|
||||||
|
memory=\"\$(neofetch memory)\"; memory=\"\${memory##*: }\"
|
||||||
|
|
||||||
|
For multiple outputs at once (each line of info in an array):
|
||||||
|
|
||||||
|
IFS=\$'\\n' read -d \"\" -ra info < <(neofetch memory uptime wm)
|
||||||
|
|
||||||
|
info=(\"\${info[@]##*: }\")
|
||||||
|
|
||||||
--disable infoname Allows you to disable an info line from appearing
|
--disable infoname Allows you to disable an info line from appearing
|
||||||
in the output. 'infoname' is the function name from the
|
in the output. 'infoname' is the function name from the
|
||||||
'print_info()' function inside the config file.
|
'print_info()' function inside the config file.
|
||||||
|
@ -4713,6 +4721,19 @@ get_args() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_simple() {
|
||||||
|
while [[ "$1" ]]; do
|
||||||
|
[[ $(type -t "get_$1") == function ]] && {
|
||||||
|
get_distro
|
||||||
|
stdout
|
||||||
|
simple=1
|
||||||
|
info "$1" "$1"
|
||||||
|
}
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
((simple)) && exit
|
||||||
|
}
|
||||||
|
|
||||||
get_distro_ascii() {
|
get_distro_ascii() {
|
||||||
# This function gets the distro ascii art and colors.
|
# This function gets the distro ascii art and colors.
|
||||||
#
|
#
|
||||||
|
@ -8710,6 +8731,7 @@ main() {
|
||||||
eval "$config"
|
eval "$config"
|
||||||
|
|
||||||
get_args "$@"
|
get_args "$@"
|
||||||
|
get_simple "$@"
|
||||||
[[ "$verbose" != "on" ]] && exec 2>/dev/null
|
[[ "$verbose" != "on" ]] && exec 2>/dev/null
|
||||||
get_distro
|
get_distro
|
||||||
get_bold
|
get_bold
|
||||||
|
|
20
neofetch.1
20
neofetch.1
|
@ -4,7 +4,7 @@
|
||||||
Neofetch \- A fast, highly customizable system info script
|
Neofetch \- A fast, highly customizable system info script
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B neofetch
|
.B neofetch
|
||||||
\fI\,--option "value" --option "value"\/\fR
|
\fI\,func_name --option "value" --option "value"\/\fR
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Neofetch is a CLI system information tool written in BASH. Neofetch
|
Neofetch is a CLI system information tool written in BASH. Neofetch
|
||||||
displays information about your system next to an image, your OS logo,
|
displays information about your system next to an image, your OS logo,
|
||||||
|
@ -14,6 +14,24 @@ NOTE: Every launch flag has a config option.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.SS "INFO:"
|
.SS "INFO:"
|
||||||
.TP
|
.TP
|
||||||
|
func_name
|
||||||
|
Specify a function name (second part of info() from config) to
|
||||||
|
quickly display only that function's information.
|
||||||
|
.IP
|
||||||
|
Example: neofetch uptime \fB\-\-uptime_shorthand\fR tiny
|
||||||
|
.IP
|
||||||
|
Example: neofetch uptime disk wm memory
|
||||||
|
.IP
|
||||||
|
This can be used in bars and scripts like so:
|
||||||
|
.IP
|
||||||
|
memory="$(neofetch memory)"; memory="${memory##*: }"
|
||||||
|
.IP
|
||||||
|
For multiple outputs at once (each line of info in an array):
|
||||||
|
.IP
|
||||||
|
IFS=$'\en' read \fB\-d\fR "" \fB\-ra\fR info < <(neofetch memory uptime wm)
|
||||||
|
.IP
|
||||||
|
info=("${info[@]##*: }")
|
||||||
|
.TP
|
||||||
\fB\-\-disable\fR infoname
|
\fB\-\-disable\fR infoname
|
||||||
Allows you to disable an info line from appearing
|
Allows you to disable an info line from appearing
|
||||||
in the output. 'infoname' is the function name from the
|
in the output. 'infoname' is the function name from the
|
||||||
|
|
Loading…
Reference in a new issue