i wonder if this works
This commit is contained in:
parent
5461ac49d4
commit
a6dc86b28c
|
@ -589,30 +589,4 @@ local startupApps = {
|
||||||
'keepassxc',
|
'keepassxc',
|
||||||
}
|
}
|
||||||
|
|
||||||
local run_once = function(cmd)
|
awful.spawn.once(startupApps)
|
||||||
local findme = cmd
|
|
||||||
local firstspace = cmd:find(' ')
|
|
||||||
if firstspace then
|
|
||||||
findme = cmd:sub(0, firstspace - 1)
|
|
||||||
end
|
|
||||||
awful.spawn.easy_async_with_shell(
|
|
||||||
string.format('pgrep -u $USER -x %s > /dev/null || (%s)', findme, cmd),
|
|
||||||
function(stdout, stderr)
|
|
||||||
-- Debugger
|
|
||||||
if not stderr or stderr == '' or not debug_mode then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
naughty.notification({
|
|
||||||
app_name = 'Start-up Applications',
|
|
||||||
title = '<b>Oof! Error detected when starting an application!</b>',
|
|
||||||
message = stderr:gsub('%\n', ''),
|
|
||||||
timeout = 20,
|
|
||||||
icon = require('beautiful').awesome_icon
|
|
||||||
})
|
|
||||||
end
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
for _, app in ipairs(startupApps) do
|
|
||||||
run_once(app)
|
|
||||||
end
|
|
||||||
|
|
Loading…
Reference in a new issue