mirror of
https://github.com/polybar/polybar.git
synced 2026-03-31 12:37:15 +00:00
feat(memory): Tokens that switch between MiB and GiB (#2488)
* feat:add tokens to display memory in MiB when GiB val <= 1.0 (#2472) * fix: correct swap_used calculation * fix: pass variable by reference rather than by value * fix: add precision arguments to filesize_gib_mib(); better condition * doc: add #2472 to CHANGELOG * fix: missing default argument values * Apply suggestions from code review Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
This commit is contained in:
@ -96,6 +96,7 @@ namespace string_util {
|
||||
string floating_point(double value, size_t precision, bool fixed = false, const string& locale = "");
|
||||
string filesize_mib(unsigned long long kibibytes, size_t precision = 0, const string& locale = "");
|
||||
string filesize_gib(unsigned long long kibibytes, size_t precision = 0, const string& locale = "");
|
||||
string filesize_gib_mib(unsigned long long kibibytes, size_t precision_mib = 0, size_t precision_gib = 0, const string& locale = "");
|
||||
string filesize(unsigned long long kbytes, size_t precision = 0, bool fixed = false, const string& locale = "");
|
||||
|
||||
hash_type hash(const string& src);
|
||||
|
||||
Reference in New Issue
Block a user