mirror of
https://github.com/hykilpikonna/hyfetch.git
synced 2026-05-06 05:25:31 -05:00
[F] poor cat
This commit is contained in:
parent
cc5d7570fb
commit
43e1dc1067
10
neofetch
10
neofetch
|
|
@ -1526,7 +1526,7 @@ get_distro() {
|
|||
;;
|
||||
|
||||
QNX)
|
||||
distro=$(cat /pps/services/deviceproperties | awk -F'::' '$1 == "device_os" { print $2 }')
|
||||
distro=$(awk -F'::' '$1 == "device_os" { print $2 }' /pps/services/deviceproperties)
|
||||
distro="${distro} ($(cat /base/etc/os.version))"
|
||||
;;
|
||||
esac
|
||||
|
|
@ -1876,7 +1876,7 @@ get_model() {
|
|||
;;
|
||||
|
||||
QNX)
|
||||
model=$(cat /pps/services/deviceproperties | awk -F'::' '/modelname/ {m=$2} /modelnumber/ {n=$2} END {print m" ("n")"}')
|
||||
model=$(awk -F'::' '/modelname/ {m=$2} /modelnumber/ {n=$2} END {print m" ("n")"}' /pps/services/deviceproperties)
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
@ -4253,7 +4253,7 @@ get_resolution() {
|
|||
;;
|
||||
|
||||
"QNX")
|
||||
resolution=$(cat /pps/services/deviceproperties | awk -F'::' '$1 == "screen_res" { print $2 }')
|
||||
resolution=$(awk -F'::' '$1 == "screen_res" { print $2 }' /pps/services/deviceproperties)
|
||||
;;
|
||||
|
||||
*)
|
||||
|
|
@ -5292,8 +5292,8 @@ get_battery() {
|
|||
;;
|
||||
|
||||
"QNX")
|
||||
battery="$(cat /pps/system/BattMgr/status | sed -n 's/.*"StateOfCharge":\([0-9]*\).*/\1/p')%"
|
||||
state="$(cat /pps/system/BattMgr/status | sed -n 's/.*"ChargerStatus":"\([^"]*\)".*/\1/p' )"
|
||||
battery="$(sed -n 's/.*"StateOfCharge":\([0-9]*\).*/\1/p' /pps/system/BattMgr/status)%"
|
||||
state="$(sed -n 's/.*"ChargerStatus":"\([^"]*\)".*/\1/p' /pps/system/BattMgr/status )"
|
||||
[[ "$state" == "CHARGING" ]] && battery_state="charging"
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user