screen resolution added to dispSysInfos

This commit is contained in:
Francois B 2018-03-22 12:48:27 +01:00
parent 7ab13b3e37
commit 12c9864754

View file

@ -557,17 +557,22 @@ function usage () {
} }
function dispSysInfos () { function dispSysInfos () {
# CPU Architecture
printf $BOLDVERT"Architecture : "$NORMAL printf $BOLDVERT"Architecture : "$NORMAL
uname -m uname -m
# Current user homedir
printf $BOLDVERT"User (userdir) :"$NORMAL" $myHomedir\n" printf $BOLDVERT"User (userdir) :"$NORMAL" $myHomedir\n"
# Linux Distro Name
printf $BOLDVERT"OS : "$NORMAL printf $BOLDVERT"OS : "$NORMAL
lsb_release -d | awk -F':' '{print $2}' | awk -F'\t' '{print $2}' lsb_release -d | awk -F':' '{print $2}' | awk -F'\t' '{print $2}'
# Kernel version
printf $BOLDVERT"Kernel : "$NORMAL printf $BOLDVERT"Kernel : "$NORMAL
uname -r uname -r
# Desktop Name
printf $BOLDVERT"Desktop : "$NORMAL printf $BOLDVERT"Desktop : "$NORMAL
case $XDG_CURRENT_DESKTOP in case $XDG_CURRENT_DESKTOP in
"ENLIGHTENMENT") "ENLIGHTENMENT")
@ -604,6 +609,12 @@ function dispSysInfos () {
;; ;;
esac esac
# Screen Resolution
printf $BOLDVERT"Screen resolution : "$NORMAL
xdpyinfo | sed -n 's/.*dim.* \([0-9]*x[0-9]*\) .*/\1/pg' | tr '\n' ' '
printf "\n"
# Type of Shell
printf $BOLDVERT"Shell : "$NORMAL printf $BOLDVERT"Shell : "$NORMAL
shellType=$(ps -p $PPID -o cmd --no-heading) shellType=$(ps -p $PPID -o cmd --no-heading)
shellType=${shellType/-} shellType=${shellType/-}