Skip to content

Commit

Permalink
thingino: adjust banner layout, add uptime.
Browse files Browse the repository at this point in the history
  • Loading branch information
themactep committed Jan 14, 2025
1 parent 0c13149 commit 5b93cf4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions overlay/lower/etc/profile
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ alias ver=". /etc/profile"
if [ "$PS1" ]; then
[ -f /etc/os-release ] && . /etc/os-release
[ -f /etc/banner ] && echo -e "$(cat /etc/banner)"
printf "%65s\n" "$network_hostname"
printf "\e[38;5;240m%65s\e[0m\n" "$IMAGE_ID, $BUILD_ID"
printf "\e[38;5;244m%65s\e[0m\n" "$IMAGE_ID"
printf "\e[38;5;244m%65s\e[0m\n" "$BUILD_ID"
printf "\n%65s\n" "$mac as ${if4:-$if6}"
[ -n "$ip6" ] && printf "%65s\n" "$ip6 (IPv6)"
[ -n "$ip4" ] && printf "%65s\n" "$ip4 (IPv4)"
[ -z "$ip4$ip6" ] && printf "%65s\n" "No IP address"
printf "%65s\n\n" "${if4:-$if6} [$mac]"
printf "\n\e[38;5;130m%65s\e[0m\n\n" "$(uptime)"

if [ "$(id -u)" -eq 0 ]; then
export PS1="\[\e[38;5;172m\]\u\[\e[m\]@\[\e[38;5;153m\]\h\[\e[m\]\[\e[38;5;214m\] \W\[\e[m\]\\# "
export PS1="\[\e[38;5;208m\]\u\[\e[m\]@\[\e[38;5;153m\]\h\[\e[m\]\[\e[38;5;214m\] \W\[\e[m\]\\# "
else
export PS1='\u@\h:\w\$ '
fi
Expand Down

0 comments on commit 5b93cf4

Please sign in to comment.