You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
693 B
18 lines
693 B
-- XFCE style autostart system
|
|
local awful = require("awful")
|
|
local gears = require("gears")
|
|
local gfs = gears.filesystem
|
|
local menu_utils = require("menubar.utils")
|
|
local stdir = "/tmp/.awesome_startup/"
|
|
gfs.make_directories(stdir)
|
|
awful.spawn.with_line_callback("find "..gfs.get_xdg_config_home().."autostart/ -name *.desktop",{
|
|
stdout = function(line)
|
|
local data = menu_utils.parse_desktop_file(line)
|
|
if (data.RunHook == "0") or (data.RunHook == nil) then
|
|
if not gfs.file_readable(stdir..line:match("[^/]*$")) then
|
|
io.open(stdir..line:match("[^/]*$"),"w"):close()
|
|
awful.spawn(data.Exec)
|
|
end
|
|
end
|
|
end
|
|
})
|