diff --git a/scripts/getInfo b/scripts/getInfo index c7edc55..700a73e 100755 --- a/scripts/getInfo +++ b/scripts/getInfo @@ -1,6 +1,6 @@ #!/bin/bash -version=2.45.5 +version=2.45.6 date="25/11/2017" projet="simpledeb" contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/" @@ -1723,9 +1723,10 @@ fi_systeme(){ # 25/11/2017 if [[ "$initDaemon" == "systemd" && $( f__which systemd ) ]]; then initDaemon=$( systemd --version ) initDaemon=${initDaemon%%[[:space:]]\+*} - initDaemon=${initDaemon/systemd/systemd version} + initDaemon=${initDaemon/systemd /systemd v} fi - serverX="$XDG_SESSION_TYPE" # normalement retourne wayland + initDaemon=${initDaemon^} + serverX="${XDG_SESSION_TYPE^}" # normalement retourne wayland [ "$wayland" ] && serverX="$wayland" # au cas où [ "$serverX" ] || serverX="n/a" [ "$ENV_DISPLAY" ] && serverX+=":no DISPLAY" @@ -2575,11 +2576,11 @@ figet_dm(){ #v1 25/11/2017 for idm in $dm_list; do if grep -iq "bin/$idm$" <<< "$ps"; then # if [ "${ps/*"$idm"*/test}" == "test" ]; then # pb: doublon gdm/gdm3 fun & speed? grepless (remplacement $idm et alentours, si idm présent, valeur test) - fg_dsp_mngr+="$idm " - fg_dsp_mngr_actif="$idm" + fg_dsp_mngr+="${idm^} " + fg_dsp_mngr_actif="${idm^}" elif [[ -e /var/run/$idm".pid" || -e /var/run/$idm".pid" || -e /run/$idm || -e /run/$idm || -d /run/$idm/ || -d /var/run/$idm/ ]]; then - fg_dsp_mngr+="$idm " - fg_dsp_mngr_actif="$idm" + fg_dsp_mngr+="${idm^} " + fg_dsp_mngr_actif="${idm^}" fi done fg_dsp_mngr=${fg_dsp_mngr% } # supression espace final @@ -2591,6 +2592,7 @@ figet_dm(){ #v1 25/11/2017 fg_dsp_mngr="(startx)" fg_dsp_mngr_actif="(startx)" fi + fg_dsp_mngr_actif=${fg_dsp_mngr_actif^} if [[ -z "$fg_dsp_mngr_actif" && $(type -p systemctl) ]]; then fg_dsp_mngr_actif=$(grep 'Main PID' <<< $(systemctl status display-manager)) fg_dsp_mngr_actif=${fg_dsp_mngr_actif##* } # conservation dernier champs ifs ' ' @@ -2598,7 +2600,7 @@ figet_dm(){ #v1 25/11/2017 fg_dsp_mngr_actif=${fg_dsp_mngr_actif/\)/} # suppression ) [ ${fg_dsp_mngr// } ] || fg_dsp_mngr="$fg_dsp_mngr_actif" fi - [ ${fg_dsp_mngr// } ] || fg_dsp_mngr="n/a" + [ "$fg_dsp_mngr" ] || fg_dsp_mngr="n/a" [ "$fg_dsp_mngr_actif" ] || fg_dsp_mngr_actif="n/a" } @@ -2969,17 +2971,18 @@ figet_shell(){ #v2 25/11/2017 # thanks neofetch local shell ish # shell en cours fg_shell=${SHELL##*/} # suppression jusqu'au dernier /, pas de chemin + fg_shell=${fg_shell,,} case ${shell:=$fg_shell} in # shell nul, donc assigné avec $fg_shell bash ) - shell+=" ${BASH_VERSION%-*}" # BASH_VERSION: 4.4.12(1)-release, suppression -* final + shell=${BASH_VERSION%-*} # BASH_VERSION: 4.4.12(1)-release, suppression -* final ;; mksh | ksh ) - shell+=" "$( "$SHELL" -c 'printf "%s" "$KSH_VERSION"' ) + shell=" "$( "$SHELL" -c 'printf "%s" "$KSH_VERSION"' ) shell=${shell/ * KSH} # suppression ' * KSH' shell=${shell/version} # suppression 'version' ;; * ) - shell+=" "$( $SHELL --version 2>/dev/null ) + shell=" "$( $SHELL --version 2>/dev/null ) ;; esac shell=${shell/$fg_shell} # suppression ' nomDuShell' @@ -2988,7 +2991,7 @@ figet_shell(){ #v2 25/11/2017 # thanks neofetch shell=${shell/options*} shell=${shell/\(*\)} shell=${shell/ / } # suppression espace double - fg_shell+="${shell^}" + fg_shell="${fg_shell^} $shell" # shells installés détectés if [ -e "/etc/shells" ]; then # by-pass sinon soucis sous fedora et openSuse? for ish in $( f_grep_file "/etc/shells" "nofile" ); do # élimine lignes vides et commentées @@ -3189,6 +3192,7 @@ figet_wm(){ #v 25/11/2017 thanks neofetch compositor=${compositor/\"} # suppression premier" compositor=${compositor/\"*} # suppression 2e " avec éventuels caractères suivants compositor="(Marco v$compositor)" + fg_wm=${fg_wm/ (marco)} fi [ "$compositor" ] && fg_wm="$fg_wm $compositor" fg_wm=${fg_wm^} # caractère 1 en majuscule diff --git a/scripts/getInfo_changelog.md b/scripts/getInfo_changelog.md index d1bfd19..c08e655 100644 --- a/scripts/getInfo_changelog.md +++ b/scripts/getInfo_changelog.md @@ -4,7 +4,7 @@ * ! f__requis (debOnly), fscript_install, f__scandir -## 2.45.5 25/11/2017 +## 2.45.6 25/11/2017 * nouveau: gestion no $DISPLAY * révision: version bash en test et affichage