motd fixes

This commit is contained in:
Brian Zalewski 2023-11-27 21:40:44 +00:00
parent 8a53a33c3f
commit f39ed01079
4 changed files with 94 additions and 73 deletions

View file

@ -359,6 +359,7 @@ softwareGroups:
- emoj
- fdupes
- fig
- figlet
- filebrowser
- fm
- gitmoji-cli
@ -380,6 +381,7 @@ softwareGroups:
- jqp
- just
- litecli
- lolcat
- marp
- mods
- mycli

View file

@ -202,29 +202,31 @@ generate_bar_disk() {
}
print_banner() {
### Fancy banner
if [ ! -f "${XDG_CACHE_HOME:-$HOME/.cache}/hey-banner-printed" ]; then
if command -v lolcat >/dev/null && command -v figlet >/dev/null; then
figlet "Hey" | lolcat -f
if command -v lolcat > /dev/null && command -v figlet > /dev/null; then
figlet "Hey, wsg?" | lolcat -f
printf "\\n"
mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}"
touch "${XDG_CACHE_HOME:-$HOME/.cache}/hey-banner-printed"
elif command -v figlet > /dev/null; then
figlet "Hey, wsg?"
printf "\\n"
elif command -v figlet >/dev/null; then
printf "\\n%s\\n" "$(figlet -t -f "$BANNER_FONTPATH" " Hey")"
printf "\\n"
fi
mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}"
touch "${XDG_CACHE_HOME:-$HOME/.cache}/hey-banner-printed"
else
if command -v neofetch > /dev/null; then
neofetch
fi
fi
### Information section
if command -v neofetch > /dev/null; then
neofetch
else
## non-neofetch
printf "\\n"
printf " \\033[1;37mHostname:\\033[0m %s\\n" "$(hostname)"
printf "\\n"
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" = "debian" ]; then
banner_distro_icon="$BANNER_DEBIAN_ICON"
banner_distro_color="$BANNER_DEBIAN_COLOR"
@ -255,7 +257,6 @@ print_banner() {
banner_distro_version="Version Unknown"
fi
fi
banner_distro_space="$(generate_space "$banner_distro_name" 13)"
if [ "$(hostname)" = 'dom0' ]; then
# Qubes dom0
@ -282,6 +283,7 @@ print_banner() {
# fi
fi
fi
fi
}
print_processor() {

View file

@ -125,7 +125,7 @@ fi
### McFly
export MCFLY_PROMPT=""
if [ -d /Applications ] && [ -d /System ]; then
if [ "$(defaults read -g AppleInterfaceStyle)" != "Dark" ]; then
if [ "$(defaults read -g AppleInterfaceStyle 2> /dev/null)" != "Dark" ]; then
export MCFLY_LIGHT=TRUE
fi
fi

View file

@ -519,6 +519,23 @@ softwarePackages:
brew: ansifilter
choco: ansifilter
port: ansifilter
figlet:
_bin: figlet
_github: https://github.com/cmatsuoka/figlet
_name: Figlet
apt: figlet
dnf: figlet
pacman: figlet
zypper: figlet
choco: figlet
brew: figlet
lolcat:
_bin: lolcat
_github: https://github.com/busyloop/lolcat
_name: lolcat
brew: lolcat
choco: lolcat
snap: lolcat
android-commandlinetools:
_deps:
- java