mirror of https://framagit.org/kyodev/kyopages.git
getInfo 2.6.2
This commit is contained in:
parent
cba0bfdf17
commit
dc84aa20d9
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
version=2.6.1
|
||||
version=2.6.2
|
||||
date="14/10/2017"
|
||||
projet="simpledeb"
|
||||
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
|
||||
|
@ -370,10 +370,10 @@ fi_disk(){ # 14/10/2017
|
|||
[ "$part_fix_tot" ] || figet_disk # appel figet_disk si pas déjà fait par fi_systeme
|
||||
text+='```\n'
|
||||
text+="$part_fix_tot \n" # espaces des partitions montées
|
||||
[ "$(grep -c . <<< $disk_fix)" -gt 1 ] && pluriel=s || unset pluriel
|
||||
text+="$(printf '%-18s: %s' "disque$pluriel fixe$pluriel" "$disk_fix") \n" # devices fixes
|
||||
[ "$(grep -c . <<< $disk_hotplug)" -gt 1 ] && pluriel=s || unset pluriel
|
||||
text+="$(printf '%-18s: %s' "disque$pluriel amovible$pluriel" "$disk_hotplug") \n\n" # devices hotplug
|
||||
[ "$(gawk '{print NF}' <<< $disk_fix)" -gt 1 ] && pluriel="s" || unset pluriel
|
||||
text+="$(printf '%-17s: %s' "disque$pluriel fixe$pluriel" "$disk_fix") \n" # devices fixes
|
||||
[ "$(gawk '{print NF}' <<< $disk_hotplug)" -gt 1 ] && pluriel="s" || unset pluriel
|
||||
text+="$(printf '%-17s: %s' "disque$pluriel amovible$pluriel" "$disk_hotplug") \n\n" # devices hotplug
|
||||
text+="$disk_detail \n" # caractéristiques des disques trouvés
|
||||
text+='```\n\n'
|
||||
text+="**types de disque** \n\n"
|
||||
|
@ -992,7 +992,7 @@ figet_batt(){ # 14/10/2017
|
|||
[ "$alert_batt_alarm" == "0" ] && unset alert_batt_alarm || alert_batt_alarm="$ibat: $alert_batt_alarm"
|
||||
# calculs
|
||||
batt_sante="$(gawk '$1 != "na" && $2 != "" && $2 != "0" {printf "%.1f", $1/$2*100}' <<< "$batt_capa_full $batt_capa_design")"
|
||||
if [[ "$batt_status" == "Full" || "$batt_status" == "Unknow" ]]; then
|
||||
if [[ "$batt_status" == "Full" || "$batt_status" == "Unknown" ]]; then
|
||||
batt_restant="totalement chargée"
|
||||
elif [ "$batt_status" == "Discharging" ]; then # alt: [ "$batt_alim" == "0" ]
|
||||
batt_restant="en décharge, reste approximativement: "
|
||||
|
@ -1027,7 +1027,7 @@ figet_batt(){ # 14/10/2017
|
|||
batt_detail+="les pleines charges et les voltages sont incohérents, ou batterie$pluriels "
|
||||
batt_detail+="mal gérée$pluriel ou batterie$pluriels HS "
|
||||
fi
|
||||
if [ "$(awk '{printf "%d", $1}' <<< $batt_sante)" -lt 50 ] && [[ "$batt_status" == "Full" || "$batt_status" == "Unknow" ]]; then
|
||||
if [ "$(awk '{printf "%d", $1}' <<< $batt_sante)" -lt 50 ] && [[ "$batt_status" == "Full" || "$batt_status" == "Unknown" ]]; then
|
||||
batt_detail+="batterie$pluriel mal chargée$pluriel: mauvais état"$' \n'
|
||||
else
|
||||
batt_detail+=$' \n'
|
||||
|
@ -1895,8 +1895,8 @@ unset k
|
|||
for j in $options; do
|
||||
case $j in
|
||||
-t | --test )
|
||||
# prg_1
|
||||
fi_disk
|
||||
prg_1
|
||||
fi_batt
|
||||
# prg_3
|
||||
exit ;; # test seulement
|
||||
-c* | all )
|
||||
|
|
|
@ -9,9 +9,14 @@
|
|||
* réseau réviser
|
||||
* bug temp cpu (neofetch)
|
||||
|
||||
POWER_SUPPLY_STATUS=Unknown
|
||||
<tosh> pleine charge effective: 4 000mAh, pleine charge théorique: 4 000mAh => 100.0% (indicateur)
|
||||
<tosh>
|
||||
<tosh> les pleines charges et les voltages sont incohérents, ou batterie mal gérée ou batterie HS
|
||||
<tosh> pas de complètement chargé??
|
||||
---
|
||||
|
||||
## 2.6.1 14/10/2017
|
||||
## 2.6.2 14/10/2017
|
||||
|
||||
* révision: figet_batt: +batt_volt_now, réécriture avec gawk majoritaire, alertes batterie
|
||||
* révision: f__scandir
|
||||
|
|
Loading…
Reference in New Issue