From 2120a6953ce33ab1a999d351eb9ad73d53c3408c Mon Sep 17 00:00:00 2001 From: Maxi Date: Sun, 15 Jun 2025 10:59:26 +0200 Subject: [PATCH] fix: update hostname display in MOTD script and clean up alias definition --- TERMINAL.ALIASES.SH | 5 +---- TERMINAL.MOTD.SH | 12 ++++++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/TERMINAL.ALIASES.SH b/TERMINAL.ALIASES.SH index 835c1f4..af54b85 100755 --- a/TERMINAL.ALIASES.SH +++ b/TERMINAL.ALIASES.SH @@ -43,7 +43,4 @@ alias dce="nvim docker-compose.yml" alias yay="paru" # midnight commander wants to break out of zsh otherwise :^( -alias mc="mc -u" - -# measuring and estimating files -alias countfiletype="find . -type f | awk -F. '{print $NF}' | sort | uniq -c | sort -rn | column -t" +alias mc="mc -u" \ No newline at end of file diff --git a/TERMINAL.MOTD.SH b/TERMINAL.MOTD.SH index 166ce0b..018e153 100755 --- a/TERMINAL.MOTD.SH +++ b/TERMINAL.MOTD.SH @@ -2,16 +2,20 @@ bold=$(tput bold) normal=$(tput sgr0) +# just checking up on how to figure out hostname +if command -v hostname; then +else + alias hostname="hostnamectl" +fi + # making sure you are on the right device. :^) printf '%0.s*' {1..80} echo -echo "you are" ${bold}$(whoami)${normal} "on" ${bold}$(hostname)${normal} "which is running" ${bold}$(uname -s -r)${normal}"." - +echo "you are" ${bold}$(whoami)${normal} "on" ${bold}$(hostname -s)${normal} "which is running" ${bold}$(uname -s -r)${normal}"." # keep your sanity, maximilian. -# displaying a random image from my motd folder. viu -b -t -w 80 $DOTFILES_PATH/PICTURES/MOTD.PNG # (non)motivational lines from music, tv shows, movies and books. whatever i found fitting to remind me. echo ${bold}$(shuf -n1 $DOTFILES_PATH/MOTD.LINES.MD)${normal} printf '%0.s*' {1..80} -echo \ No newline at end of file +echo