Skip to content

Commit

Permalink
Fixed hostname layer. 1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
q60 committed Jun 19, 2021
1 parent a570cb3 commit abeaf6c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion disfetch
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ l="\x1B[1m" # bold text
###########################################
# getting needed information #
###########################################
# getting hostname
if [ -f /etc/hostname ];
then
HOSTNAME=$(cat /etc/hostname)
else
HOSTNAME=$(uname -n)
fi
# getting OS name
if [ -f /etc/os-release ];
then
Expand Down Expand Up @@ -438,7 +445,7 @@ esac
###########################################
# adding only existing layers to info #
###########################################
INFO+=("$motif$(whoami)$r @ $motif$(cat /etc/hostname)$r")
INFO+=("$motif$(whoami)$r @ $motif$HOSTNAME$r")
[[ $OS ]] && INFO+=("${motif}OS:$r $OS")
[[ $KERNEL ]] && INFO+=("${motif}KERNEL:$r $KERNEL")
[[ $ARCH ]] && INFO+=("${motif}ARCH:$r $ARCH")
Expand Down

0 comments on commit abeaf6c

Please sign in to comment.