KittyKatt / screenFetch

Fetches system/theme information in terminal for Linux desktop screenshots.
GNU General Public License v3.0
3.81k stars 453 forks source link

free command parsing error in Chinese operating system #731

Open ZhengweiHou opened 2 years ago

ZhengweiHou commented 2 years ago

I'm submitting a ... (check one with "x")

[x] bug report
[ ] new distro request

Bug report

=> search Github for a similar issue or PR before submitting
=> download the latest revision from Github and check if the bug is still present
   -> https://github.com/KittyKatt/screenFetch/raw/master/screenfetch-dev
=> Show us the output of: screenfetch -v
➜  ~ screenfetch 
:: Finding distro...found as 'Manjaro 21.1.0'
:: Finding hostname and user...found as 'xxxx@manjaro-xps'
:: Finding kernel version...found as 'x86_64 Linux 5.13.1-3-MANJARO'
:: Finding current uptime...found as '3h 6m'
:: Finding current package count...found as '1365'
:: Finding current shell...found as 'zsh 5.8'
:: Finding current resolution(s)...found as '2560x1600'
:: Finding desktop environment...found as 'KDE 5.84.0 / Plasma 5.22.3'
:: Finding window manager...found as 'KWin'
:: Finding window manager theme...found as 'Not Found'
:: Finding GTK2 theme...found as 'Breath'
:: Finding GTK3 theme...found as 'Breath'
:: Finding icon theme...found as 'breath2'
:: Finding user font...found as ''
:: Finding current CPU...found as '11th Gen Intel Core i7-1185G7 @ 8x 4.8GHz [62.0°C]'
:: Finding current disk usage...found as '174G / 1023G (18%%)'
:: Finding current GPU...found as 'Mesa Intel(R) Xe Graphics (TGL GT2)'
/usr/bin/screenfetch:行18051: -:语法错误: 需要操作数 (错误符号是 "-")

 ██████████████████  ████████     xxxx@manjaro-xps
 ██████████████████  ████████     OS: Manjaro 21.1.0 Pahvo
 ██████████████████  ████████     Kernel: x86_64 Linux 5.13.1-3-MANJARO
 ██████████████████  ████████     Uptime: 3h 6m
 ████████            ████████     Packages: 1365
 ████████  ████████  ████████     Shell: zsh 5.8
 ████████  ████████  ████████     Resolution: 2560x1600
 ████████  ████████  ████████     DE: KDE 5.84.0 / Plasma 5.22.3
 ████████  ████████  ████████     WM: KWin
 ████████  ████████  ████████     GTK Theme: Breath [GTK2/3]
 ████████  ████████  ████████     Icon Theme: breath2
 ████████  ████████  ████████     Disk: 174G / 1023G (18%)
 ████████  ████████  ████████     CPU: 11th Gen Intel Core i7-1185G7 @ 8x 4.8GHz [62.0°C]
 ████████  ████████  ████████     GPU: Mesa Intel(R) Xe Graphics (TGL GT2)
                                  RAM: -

我是中文版系统

➜  ~ free -b
               total        used        free      shared  buff/cache   available
内存:33367707648  5735673856 17018621952  1911304192 10613411840 25382223872
交换:34788601856           0 34788601856

you can fix it by screenfetch-dev line:18050:

mem=$(free -b | awk -F ':|:' 'NR==2{print $2}' | awk '{print $1"-"$6}')
ZhengweiHou commented 2 years ago

Similar bug #727 #710

gnaggnoyil commented 2 years ago

Possibly duplicate: #704