Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2015
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. --- Automount media
  2. dbus.add_match("system", "interface='media.storage', member='connected'")
  3. dbus.connect_signal("media.storage",
  4. function (...)
  5. local data = {...}
  6. local dbustext = data[2]
  7. local presult = io.popen("udisksctl mount -b " .. dbustext)
  8. local result = presult:read("*all")
  9. presult:close()
  10. if not (result == "" or result == nil) then
  11. naughty.notify({font = "Verdana 14",
  12. title = "udisksctl",
  13. text = result,
  14. height = 100,
  15. width = 400,
  16. timeout = 13})
  17. end
  18. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement