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

A potential error in fs widget #7

Closed
geekpi opened this issue Oct 2, 2013 · 1 comment
Closed

A potential error in fs widget #7

geekpi opened this issue Oct 2, 2013 · 1 comment

Comments

@geekpi
Copy link
Contributor

geekpi commented Oct 2, 2013

In rc.lua.copland of awesome-copycats project , 'used' may be a nil value and attempt to compare with number

fshomeupd = lain.widgets.fs({
    partition = "/home",
    settings  = function()
        if used < 90 then
            diskbar:set_color(beautiful.fg_normal)
        else
            diskbar:set_color("#EB8F8F")
        end
        diskbar:set_value(used / 100)
    end
})
@lcpz
Copy link
Owner

lcpz commented Oct 2, 2013

You should have provided an example, or told how to reproduce this. Anyway I introduced a fallback.

Update lain module, and awesome-copycats as well.

Now used is fs_now.used. Same change is applied to available, size_mb and size_gb.

@lcpz lcpz closed this as completed Oct 2, 2013
lcpz pushed a commit that referenced this issue Oct 2, 2013
lcpz pushed a commit that referenced this issue Aug 5, 2015
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

No branches or pull requests

2 participants