Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding options to allow disk outputs to always be in a specific unit. #2558

Merged
merged 3 commits into from
Oct 8, 2023

Conversation

SWarrener
Copy link
Contributor

This PR allows the user to force the disk output to always be in a specific unit, and not automatically change unit as the size in question changes. See below for a few example configs, which should demonstrate this change.

"disk": {
	"interval": 30,
	"format": "{specific_free:0.2f} GB out of {specific_total:0.2f} GB available. Alternatively {free} out of {total} available",
	"unit": "GB"
	// 1434.25 GB out of 2000.00 GB available. Alternatively 1.4TiB out of 1.9TiB available.
}
"disk": {
	"interval": 30,
	"format": "{specific_free:0.2f} GB out of {specific_total:0.2f} GB available. Alternatively {free} out of {total} available",
	"unit": "GB"
	// 0.25 GB out of 2000.00 GB available. Alternatively 241.3MiB out of 1.9TiB available.
}

I have added new options instead of updating existing ones to ensure I don't change anyone's existing config.
Supported specific units are: B, kB, kiB, MB, MiB, GB, GiB, TB, TiB

@Alexays Alexays merged commit 30cc88a into Alexays:master Oct 8, 2023
Syndelis added a commit to Syndelis/Waybar that referenced this pull request Oct 9, 2023
this file was edited in Alexays#2558 but not linted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants