-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscreen.ini
More file actions
executable file
·46 lines (32 loc) · 1.12 KB
/
screen.ini
File metadata and controls
executable file
·46 lines (32 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
## DISPLAY CONFIGURATION - THIS FILE IS INCLUDED IN VARIOUS *.sh SCRIPTS
## @date 2024-06-15 (last modifications)
## @author [email protected]
STR="$TERM"
echo -e "Local \e[35m" screen.ini "\e[0m is checking TERM variable:" "\e[36m" $STR "\e[0m"
# ENABLING COLORn ENV.VARIABLES ONLY WHEN terminal HAS COLOR POSSIBILITES:
#(see also https://unix.stackexchange.com/questions/450365/check-if-terminal-supports-24-bit-true-color)
export SUB='color'
# Do it only when the terminal description contains the word "color"
if [[ "$STR" == *"$SUB"* ]]; then
export ECHO="echo -e"
export COLOR1="\e[36m"
export COLOR2="\e[35m"
export COLOR3="\e[34m"
export COLOR4="\e[33m"
export COLERR="\e[31m" #RED
export NORMCO="\e[0m"
echo -e ${COLOR1}${SUB}${COLOR4}" is there."$NORMCO
STR=`uname -or`
#echo "UNAME:" $STR
SUB='Linux'
# Do it Only when the system description contains the word "Linux"
if [[ "$STR" == *"$SUB"* ]];
then
echo -e ${COLOR1}${SUB}${COLOR4}" is there."$NORMCO
fi
else
echo -----------------------------
echo Terminal colors unvailable?
echo -----------------------------
fi