Reformat
This commit is contained in:
parent
d2889af874
commit
832ccc693e
22
init.lua
22
init.lua
|
@ -37,7 +37,9 @@ end
|
|||
awful.rules.add_rule_source("launch",
|
||||
function (c, props, callbacks)
|
||||
local data = get_data(c)
|
||||
if not data then return end
|
||||
if not data then
|
||||
return
|
||||
end
|
||||
|
||||
data.timer:stop()
|
||||
|
||||
|
@ -64,7 +66,9 @@ launch.client = {}
|
|||
local function get_ids()
|
||||
local ids = {}
|
||||
for _, c in ipairs(client.get()) do
|
||||
if c.single_instance_id then ids[c.single_instance_id] = c end
|
||||
if c.single_instance_id then
|
||||
ids[c.single_instance_id] = c
|
||||
end
|
||||
end
|
||||
return ids
|
||||
end
|
||||
|
@ -206,7 +210,9 @@ function launch.spawn.single_instance(cmd, args)
|
|||
else
|
||||
c = launch.client.by_cmdline(cmd, args.filter)
|
||||
end
|
||||
if not c then return spawn(cmd, args) end
|
||||
if not c then
|
||||
return spawn(cmd, args)
|
||||
end
|
||||
return args.id
|
||||
end
|
||||
|
||||
|
@ -236,7 +242,7 @@ function launch.spawn.raise_or_spawn(cmd, args)
|
|||
end
|
||||
if c then
|
||||
c:emit_signal("request::activate", "launch.spawn.raise_or_spawn",
|
||||
{raise=true})
|
||||
{raise = true})
|
||||
if args.raise_callback then
|
||||
args.raise_callback(c)
|
||||
end
|
||||
|
@ -245,7 +251,9 @@ function launch.spawn.raise_or_spawn(cmd, args)
|
|||
if args.raise_callback then
|
||||
local cb = args.callback
|
||||
args.callback = function (c)
|
||||
if cb then cb(c) end
|
||||
if cb then
|
||||
cb(c)
|
||||
end
|
||||
args.raise_callback(c)
|
||||
end
|
||||
end
|
||||
|
@ -272,7 +280,9 @@ function launch.spawn.here(tag_func)
|
|||
end
|
||||
|
||||
local a = {
|
||||
filter = function (c) return c:isvisible() end,
|
||||
filter = function (c)
|
||||
return c:isvisible()
|
||||
end,
|
||||
props = {tag = tag},
|
||||
}
|
||||
gears.table.crush(a, args or {})
|
||||
|
|
|
@ -56,7 +56,9 @@ local function spawn(cmd, args)
|
|||
end
|
||||
end)
|
||||
end)
|
||||
if cb then cb(c) end
|
||||
if cb then
|
||||
cb(c)
|
||||
end
|
||||
panel.toggle_func(c, true)
|
||||
end
|
||||
launch.spawn.single_instance(cmd, args)
|
||||
|
|
|
@ -35,7 +35,9 @@ local function props_visible(s, p)
|
|||
end
|
||||
if p.tags then
|
||||
for _, t in ipairs(p.tags) do
|
||||
if selected(t) then return true end
|
||||
if selected(t) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -43,7 +43,9 @@ local function handle_args(tag, args)
|
|||
end
|
||||
|
||||
if args.replace and not tag.volatile then
|
||||
for _, c in ipairs(tag:clients()) do c:kill() end
|
||||
for _, c in ipairs(tag:clients()) do
|
||||
c:kill()
|
||||
end
|
||||
end
|
||||
|
||||
if args.clients then
|
||||
|
|
Loading…
Reference in New Issue