neofetch: Added --title_fqdn. Closes #1397
This commit is contained in:
parent
8f03e7082f
commit
eaa4b35ee4
19
neofetch
19
neofetch
|
@ -85,6 +85,16 @@ print_info() {
|
||||||
info cols
|
info cols
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Title
|
||||||
|
|
||||||
|
|
||||||
|
# Hide/Show Fully qualified domain name.
|
||||||
|
#
|
||||||
|
# Default: 'off'
|
||||||
|
# Values: 'on', 'off'
|
||||||
|
# Flag: --title_fqdn
|
||||||
|
title_fqdn="off"
|
||||||
|
|
||||||
|
|
||||||
# Kernel
|
# Kernel
|
||||||
|
|
||||||
|
@ -1277,7 +1287,12 @@ get_model() {
|
||||||
|
|
||||||
get_title() {
|
get_title() {
|
||||||
user=${USER:-$(id -un || printf %s "${HOME/*\/}")}
|
user=${USER:-$(id -un || printf %s "${HOME/*\/}")}
|
||||||
hostname=${HOSTNAME:-$(hostname)}
|
|
||||||
|
case $title_fqdn in
|
||||||
|
on) hostname=$(hostname -f) ;;
|
||||||
|
*) hostname=${HOSTNAME:-$(hostname)} ;;
|
||||||
|
esac
|
||||||
|
|
||||||
title=${title_color}${bold}${user}${at_color}@${title_color}${bold}${hostname}
|
title=${title_color}${bold}${user}${at_color}@${title_color}${bold}${hostname}
|
||||||
length=$((${#user} + ${#hostname} + 1))
|
length=$((${#user} + ${#hostname} + 1))
|
||||||
}
|
}
|
||||||
|
@ -4634,6 +4649,7 @@ INFO:
|
||||||
|
|
||||||
NOTE: You can supply multiple args. eg. 'neofetch --disable cpu gpu'
|
NOTE: You can supply multiple args. eg. 'neofetch --disable cpu gpu'
|
||||||
|
|
||||||
|
--title_fqdn on/off Hide/Show Fully Qualified Domain Name in title.
|
||||||
--package_managers on/off Hide/Show Package Manager names . (on, tiny, off)
|
--package_managers on/off Hide/Show Package Manager names . (on, tiny, off)
|
||||||
--os_arch on/off Hide/Show OS architecture.
|
--os_arch on/off Hide/Show OS architecture.
|
||||||
--speed_type type Change the type of cpu speed to display.
|
--speed_type type Change the type of cpu speed to display.
|
||||||
|
@ -4873,6 +4889,7 @@ get_args() {
|
||||||
while [[ "$1" ]]; do
|
while [[ "$1" ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
# Info
|
# Info
|
||||||
|
"--title_fqdn") title_fqdn="$2" ;;
|
||||||
"--package_managers") package_managers="$2" ;;
|
"--package_managers") package_managers="$2" ;;
|
||||||
"--os_arch") os_arch="$2" ;;
|
"--os_arch") os_arch="$2" ;;
|
||||||
"--cpu_cores") cpu_cores="$2" ;;
|
"--cpu_cores") cpu_cores="$2" ;;
|
||||||
|
|
Reference in New Issue