mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-13 18:28:50 +01:00
Merge pull request #116 from cuu/master
awesome config,missing class in table
This commit is contained in:
commit
bb58718df4
@ -81,6 +81,11 @@ awful.layout.layouts = {
|
|||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Helper functions
|
-- {{{ Helper functions
|
||||||
|
|
||||||
|
local function tableHasKey(table,key)
|
||||||
|
return table[key] ~= nil
|
||||||
|
end
|
||||||
|
|
||||||
local function client_menu_toggle_fn()
|
local function client_menu_toggle_fn()
|
||||||
local instance = nil
|
local instance = nil
|
||||||
|
|
||||||
@ -372,7 +377,7 @@ client.connect_signal("manage", function (c)
|
|||||||
c.below=true
|
c.below=true
|
||||||
c.fullscreen=false
|
c.fullscreen=false
|
||||||
|
|
||||||
if c.class:lower() == "gsnotify-arm" then
|
if tableHasKey(c,"class") and c.class:lower() == "gsnotify-arm" then
|
||||||
-- naughty.notify({text = "launched!",timeout = 2,position = "top_center"})
|
-- naughty.notify({text = "launched!",timeout = 2,position = "top_center"})
|
||||||
c.ontop = true
|
c.ontop = true
|
||||||
c.above = true
|
c.above = true
|
||||||
@ -385,7 +390,7 @@ client.connect_signal("manage", function (c)
|
|||||||
for s in capi.screen do
|
for s in capi.screen do
|
||||||
if s.geometry.width > 320 then
|
if s.geometry.width > 320 then
|
||||||
for _,v in pairs(gs_class) do
|
for _,v in pairs(gs_class) do
|
||||||
if c.class:lower() == v then
|
if tableHasKey(c,"class") and c.class:lower() == v then
|
||||||
awful.titlebar.hide(c)
|
awful.titlebar.hide(c)
|
||||||
if v ~= "gsnotify-arm" then
|
if v ~= "gsnotify-arm" then
|
||||||
awful.placement.centered(c)
|
awful.placement.centered(c)
|
||||||
@ -464,14 +469,18 @@ client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_n
|
|||||||
|
|
||||||
client.disconnect_signal("request::activate", awful.ewmh.activate)
|
client.disconnect_signal("request::activate", awful.ewmh.activate)
|
||||||
function awful.ewmh.activate(c)
|
function awful.ewmh.activate(c)
|
||||||
|
if tableHasKey(c,"class") == false then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if c:isvisible() then
|
if c:isvisible() then
|
||||||
if c.class:lower() ~= "gsnotify-arm" then
|
if c.class:lower() ~= "gsnotify-arm" then
|
||||||
client.focus = c
|
client.focus = c
|
||||||
end
|
end
|
||||||
|
|
||||||
if c.class:lower() == "retroarch" then
|
if c.class:lower() == "retroarch" then
|
||||||
c:lower()
|
c:lower()
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user