issue #7 fix
This commit is contained in:
parent
4a37fd29e9
commit
d4c3ced229
1 changed files with 6 additions and 5 deletions
|
@ -65,6 +65,7 @@ local function worker(args)
|
||||||
|
|
||||||
function update()
|
function update()
|
||||||
fs_info = {}
|
fs_info = {}
|
||||||
|
fs_now = {}
|
||||||
|
|
||||||
local f = io.popen("LC_ALL=C df -kP")
|
local f = io.popen("LC_ALL=C df -kP")
|
||||||
|
|
||||||
|
@ -85,15 +86,15 @@ local function worker(args)
|
||||||
|
|
||||||
-- chosen partition easy stuff
|
-- chosen partition easy stuff
|
||||||
-- you can however check whatever partition else
|
-- you can however check whatever partition else
|
||||||
used = tonumber(fs_info[partition .. " used_p"])
|
fs_now.used = tonumber(fs_info[partition .. " used_p"]) or 0
|
||||||
available = tonumber(fs_info[partition .. " avail_p"])
|
fs_now.available = tonumber(fs_info[partition .. " avail_p"]) or 0
|
||||||
size_mb = tonumber(fs_info[partition .. " size_mb"])
|
fs_now.size_mb = tonumber(fs_info[partition .. " size_mb"]) or 0
|
||||||
size_gb = tonumber(fs_info[partition .. " size_gb"])
|
fs_now.size_gb = tonumber(fs_info[partition .. " size_gb"]) or 0
|
||||||
|
|
||||||
widget = fs.widget
|
widget = fs.widget
|
||||||
settings()
|
settings()
|
||||||
|
|
||||||
if used >= 99 and not helpers.get_map("fs")
|
if fs_now.used >= 99 and not helpers.get_map("fs")
|
||||||
then
|
then
|
||||||
naughty.notify({
|
naughty.notify({
|
||||||
title = "warning",
|
title = "warning",
|
||||||
|
|
Loading…
Add table
Reference in a new issue