From: Andre Klärner Date: Thu, 10 Apr 2014 10:28:20 +0000 (+0200) Subject: ask df for a specific filesystem X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/1bfc3bae68ac72ab3bf1754984cc8c6d7d5a247e?ds=sidebyside;hp=-c ask df for a specific filesystem POSIX df supports requesting a single filesystem, so doing so will ensure that df can only get stuck if the filesystem we requested is in a hung state. --- 1bfc3bae68ac72ab3bf1754984cc8c6d7d5a247e diff --git a/widgets/fs.lua b/widgets/fs.lua index 7406e05..4d9d278 100644 --- a/widgets/fs.lua +++ b/widgets/fs.lua @@ -67,7 +67,7 @@ local function worker(args) fs_info = {} fs_now = {} - local f = io.popen("LC_ALL=C df -kP") + local f = io.popen("LC_ALL=C df -kP " .. partition) for line in f:lines() do -- Match: (size) (used)(avail)(use%) (mount) local s = string.match(line, "^.-[%s]([%d]+)")