X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/72556c9cd181c7cc269fdd164c09d8059684f431..e43585e94796926ceec3639bc71c0ed9bc62ae43:/widgets/fs.lua?ds=sidebyside diff --git a/widgets/fs.lua b/widgets/fs.lua index 951f0cc..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,7 +107,7 @@ local function worker(args) end end - fs.widget:connect_signal('mouse::enter', function () fs:show(0) 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)