X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/b92942b0e07f4491cf5d96fecee94b1e82675e52..d3cf8f992b0a987122155e72f15ee286ad8f7965:/widgets/fs.lua diff --git a/widgets/fs.lua b/widgets/fs.lua index fab61bd..dbd45bf 100644 --- a/widgets/fs.lua +++ b/widgets/fs.lua @@ -36,17 +36,18 @@ function fs:hide() end end -function fs:show(t_out) +function fs:show(t_out, scr) fs:hide() local f = io.popen(helpers.scripts_dir .. "dfs") - ws = f:read("*a"):gsub("\n*$", "") + ws = f:read("*all"):gsub("\n*$", "") f:close() notification = naughty.notify({ - preset = fs_notification_preset, - text = ws, + preset = fs_notification_preset, + text = ws, timeout = t_out, + screen = scr or 1 }) end @@ -106,8 +107,8 @@ local function worker(args) end end - widget:connect_signal('mouse::enter', function () fs:show(0) end) - widget:connect_signal('mouse::leave', function () fs:hide() end) + fs.widget:connect_signal('mouse::enter', function () fs:show(0, mouse.screen) end) + fs.widget:connect_signal('mouse::leave', function () fs:hide() end) helpers.newtimer(partition, timeout, update)