From c0217a5ae696daf1c73610ca652a565dfab7e0f8 Mon Sep 17 00:00:00 2001 From: meliurwen Date: Mon, 18 Sep 2023 08:50:04 +0200 Subject: [PATCH] common-shells: improved handling of 256 color `TERM` in `.alias` and redirecting `stdout` and `stderr` to `/dev/null` when enabling numlock for TTY in `.profile` --- common-shells/.aliases | 4 ++-- common-shells/.profile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common-shells/.aliases b/common-shells/.aliases index dcf5e64..62c1281 100644 --- a/common-shells/.aliases +++ b/common-shells/.aliases @@ -6,7 +6,7 @@ alias upgrade='sudo apt-get update && \ sudo apt-get clean' # System clean upgrade alias diff='diff --color' alias ls='ls --color=tty' -alias mutt='TERM=${TERM}-256color mutt' -alias neomutt='TERM=${TERM}-256color neomutt' +alias mutt='TERM=${TERM%-256color}-256color mutt' +alias neomutt='TERM=${TERM%-256color}-256color neomutt' alias mpv-pip='mpv --profile="pip"' diff --git a/common-shells/.profile b/common-shells/.profile index 9c06c97..5be1aeb 100644 --- a/common-shells/.profile +++ b/common-shells/.profile @@ -18,7 +18,7 @@ if [ "$TERM" = "linux" ]; then setfont "$CONSOLE_FONTD/$CONSOLE_FONT" fi # Enable numlock for TTY - if command -v setleds; then + if command -v setleds > /dev/null 2>&1; then setleds -D +num fi fi