We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a13ddc0 commit a81435eCopy full SHA for a81435e
widgets/fs_all.lua
@@ -23,11 +23,14 @@ local unit = { ["mb"] = 1024, ["gb"] = 1024^2 }
23
24
-- {{{ Filesystem widget type
25
local function worker(format, warg)
26
- -- Fallback to listing local filesystems
27
- if warg then warg = "" else warg = "-l" end
+ local cmd = "LC_ALL=C df -kP"
+ if not warg then
28
+ -- List only local filesystems by default
29
+ cmd = cmd .. " -l"
30
+ end
31
32
local fs_info = {} -- Get data from df
- local f = io.popen("LC_ALL=C df -kP " .. helpers.shellquote(warg))
33
+ local f = io.popen(cmd)
34
35
for line in f:lines() do -- Match: (size) (used)(avail)(use%) (mount)
36
local s = string.match(line, "^.-[%s]([%d]+)")
0 commit comments