Fix try for #171, changed some clang-format settings
This commit is contained in:
parent
c04a553d2f
commit
258357ac51
2 changed files with 85 additions and 84 deletions
|
@ -13,4 +13,5 @@ AllowShortIfStatementsOnASingleLine: true
|
|||
AllowShortLoopsOnASingleLine: true
|
||||
ColumnLimit: 0
|
||||
MaxEmptyLinesToKeep: 1
|
||||
PointerAlignment: Left
|
||||
...
|
||||
|
|
12
uwufetch.c
12
uwufetch.c
|
@ -470,7 +470,7 @@ void print_info(struct configuration *config_flags, struct info *user_info) {
|
|||
terminal_cursor_move, NORMAL, BOLD, NORMAL,
|
||||
user_info->shell);
|
||||
#if defined(__APPLE__) && !defined(TARGET_OS_IPHONE)
|
||||
if (show_pkgs)
|
||||
if (config_flags->show_pkgs)
|
||||
system(
|
||||
"ls $(brew --cellar) | wc -l | awk -F' ' '{print \" \x1b[34mw "
|
||||
" w \x1b[0m\x1b[1mPKGS\x1b[0m \"$1 \" (brew)\"}'");
|
||||
|
@ -533,7 +533,7 @@ void write_cache(struct info *user_info) {
|
|||
if (cache_fp == NULL) return;
|
||||
// writing all info to the cache file
|
||||
#ifdef __APPLE__
|
||||
uptime = uptime_apple();
|
||||
user_info->uptime = uptime_apple();
|
||||
#else
|
||||
#ifdef __FREEBSD__
|
||||
uptime = uptime_freebsd();
|
||||
|
@ -661,7 +661,7 @@ void print_cache(struct configuration *config_flags, struct info *user_info) {
|
|||
|
||||
// Total ram
|
||||
sysctlbyname("hw.memsize", &mem_buffer, &mem_buffer_len, NULL, 0);
|
||||
ram_used = ((mem_wired + mem_active + mem_compressed) * 4 / 1024);
|
||||
user_info->ram_used = ((mem_wired + mem_active + mem_compressed) * 4 / 1024);
|
||||
|
||||
#endif // __APPLE__
|
||||
print_ascii(user_info);
|
||||
|
@ -730,7 +730,7 @@ struct info get_info()
|
|||
#endif
|
||||
host_model_info = popen("sysctl -a " HOSTCTL, "r");
|
||||
while (fgets(line, sizeof(line), host_model_info))
|
||||
if (sscanf(line, HOSTCTL ": %[^\n]", host_model)) break;
|
||||
if (sscanf(line, HOSTCTL ": %[^\n]", user_info->host_model)) break;
|
||||
#endif // _WIN32
|
||||
FILE* host_model_version =
|
||||
fopen("/sys/devices/virtual/dmi/id/product_version", "r");
|
||||
|
@ -975,8 +975,8 @@ struct info get_info()
|
|||
// Total
|
||||
sysctlbyname("hw.memsize", &mem_buffer, &mem_buffer_len, NULL, 0);
|
||||
|
||||
ram_used = ((mem_wired + mem_active + mem_compressed) * 4 / 1024);
|
||||
ram_total = mem_buffer / 1024 / 1024;
|
||||
user_info->ram_used = ((mem_wired + mem_active + mem_compressed) * 4 / 1024);
|
||||
user_info->ram_total = mem_buffer / 1024 / 1024;
|
||||
#endif
|
||||
|
||||
/* ---------- gpu ---------- */
|
||||
|
|
Loading…
Reference in a new issue