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

add ratio of disk usage to df widget. #1065

Closed
wants to merge 1 commit into from

Conversation

sux2mfgj
Copy link
Contributor

@sux2mfgj sux2mfgj commented May 4, 2017

This request makes df widget be like image.
disk

Copy link
Member

@flacjacket flacjacket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple minor things, otherwise looks good!

'String format (p: partition, s: size, '
'f: free space, uf: user free space, m: measure)'),
'f: free space, uf: user free space, m: measure) r: ratio (uf/s)'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The close paren after measure should be the furthest right

@@ -68,6 +68,7 @@ def poll(self):
text = ""
else:
text = self.format.format(p=self.partition, s=size, f=free,
uf=self.user_free, m=self.measure)
uf=self.user_free, m=self.measure,
r=(size - self.user_free) / size * 100)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should from __future__ import division so this always works ok.

@sux2mfgj
Copy link
Contributor Author

sux2mfgj commented May 7, 2017

I fixed those!

@flacjacket
Copy link
Member

Thanks for the fixes!

@sux2mfgj sux2mfgj deleted the ratio_add_to_df_py branch May 14, 2017 19:08
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