1
0
mirror of https://gittea.dev/nova/th.git synced 2025-10-22 02:40:15 -04:00

now printing left storage & related refactoring

This commit is contained in:
nova
2025-09-24 22:20:07 +02:00
parent 14948ba573
commit fb1af6d2d2
3 changed files with 53 additions and 12 deletions

View File

@@ -1,10 +1,12 @@
#define SETTINGS_LINE_NUMBERS 2 /* 0 is disabled, 1 is enabled, 2 is relative */
/* {{{ */
#ifndef CONFIG_GUARD
#define CONFIG_GUARD
#include "defines.h"
#include "sorting.h"
#include "interactions.h"
#define SETTINGS_LINE_NUMBERS 2 /* 0 is disabled, 1 is enabled, 2 is relative */
/* }}} */
static const mimetype mimetype_default_cmd[] = {
/* mimetype shell command
@@ -93,9 +95,17 @@ static const binding key_binding[] = {
{ "a", toggle_hidden_files, NULL, "toggle hidden files" },
{ "\x7F", toggle_hidden_files, NULL, "toggle hidden files" }, /* backspace key */
};
static const char size_unit[] = { 'B', 'K', 'M', 'G', 'T', 'P' }; /* this defines the maximum size unit, deleting everything except B results in all sizes being displayed in byte */
static const char ui_btm_text_storage_left[] = "total free";
static const char ui_btm_current_dir_size[] = "sum of dir";
/* {{{ */
static const unsigned long binding_count = sizeof(key_binding) / sizeof(binding);
static const unsigned long mimetype_default_count = sizeof(mimetype_default_cmd) / sizeof(mimetype);
static const unsigned long file_extension_default_count = sizeof(file_extension_default_cmd) / sizeof(extension);
static const char size_unit_count = (sizeof(size_unit) / sizeof(size_unit[0])) - 1;
#else
static const mimetype mimetype_default_cmd[];
static const extension file_extension_default_cmd[];
@@ -103,5 +113,7 @@ static const binding key_binding[];
static const unsigned long binding_count;
static const unsigned long mimetype_default_count;
static const unsigned long file_extension_default_count;
static const char size_unit[];
static const char size_unit_count;
#endif
/* }}} */