diff --git a/init.lua b/init.lua index 4e93805..41547d8 100644 --- a/init.lua +++ b/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 @@ -125,9 +129,9 @@ local function spawn(cmd, args) } gears.table.crush(data.props, { - single_instance_id = id, - cmdline = cmd, - }) + single_instance_id = id, + cmdline = cmd, + }) local step = 1/2 data.timer = gears.timer { @@ -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 {}) diff --git a/panel.lua b/panel.lua index 408427e..beb5e25 100644 --- a/panel.lua +++ b/panel.lua @@ -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) diff --git a/widget.lua b/widget.lua index 26c0d39..6f33e38 100644 --- a/widget.lua +++ b/widget.lua @@ -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 diff --git a/workspace.lua b/workspace.lua index 25b5c17..bc2670e 100644 --- a/workspace.lua +++ b/workspace.lua @@ -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