a lot of stuff
This commit is contained in:
@@ -14,85 +14,61 @@ local capi = {
|
||||
tag = tag
|
||||
}
|
||||
|
||||
capi.screen.connect_signal(
|
||||
"added",
|
||||
function()
|
||||
capi.awesome.restart()
|
||||
end
|
||||
)
|
||||
capi.screen.connect_signal("added", function()
|
||||
capi.awesome.restart()
|
||||
end)
|
||||
|
||||
capi.screen.connect_signal(
|
||||
"removed",
|
||||
function()
|
||||
capi.awesome.restart()
|
||||
end
|
||||
)
|
||||
capi.screen.connect_signal("removed", function()
|
||||
capi.awesome.restart()
|
||||
end)
|
||||
|
||||
capi.client.connect_signal(
|
||||
"manage",
|
||||
function(c)
|
||||
if capi.awesome.startup and not c.size_hints.user_porition and not c.size_hints.program_position then
|
||||
awful.placement.no_offscreen(c)
|
||||
end
|
||||
if c.class == "Brave-browser" then
|
||||
c.floating = false
|
||||
end
|
||||
if c.transient_for then
|
||||
c.floating = true
|
||||
end
|
||||
if c.fullscreen then
|
||||
gears.timer.delayed_call(function()
|
||||
if c.valid then
|
||||
c:geometry(c.screen.geometry)
|
||||
end
|
||||
end)
|
||||
end
|
||||
capi.client.connect_signal("manage", function(c)
|
||||
if capi.awesome.startup and not c.size_hints.user_porition and not c.size_hints.program_position then
|
||||
awful.placement.no_offscreen(c)
|
||||
end
|
||||
)
|
||||
if c.class == "Brave-browser" then
|
||||
c.floating = false
|
||||
end
|
||||
if c.transient_for then
|
||||
c.floating = true
|
||||
end
|
||||
if c.fullscreen then
|
||||
gears.timer.delayed_call(function()
|
||||
if c.valid then
|
||||
c:geometry(c.screen.geometry)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
capi.client.connect_signal(
|
||||
'unmanage',
|
||||
function(c)
|
||||
if #awful.screen.focused().clients > 0 then
|
||||
awful.screen.focused().clients[1]:emit_signal(
|
||||
'request::activate',
|
||||
'mouse_enter',
|
||||
{
|
||||
raise = true
|
||||
}
|
||||
)
|
||||
end
|
||||
capi.client.connect_signal('unmanage', function(c)
|
||||
if #awful.screen.focused().clients > 0 then
|
||||
awful.screen.focused().clients[1]:emit_signal(
|
||||
'request::activate',
|
||||
'mouse_enter', {
|
||||
raise = true
|
||||
})
|
||||
end
|
||||
)
|
||||
end)
|
||||
|
||||
capi.tag.connect_signal(
|
||||
'property::selected',
|
||||
function(c)
|
||||
if #awful.screen.focused().clients > 0 then
|
||||
awful.screen.focused().clients[1]:emit_signal(
|
||||
'request::activate',
|
||||
'mouse_enter',
|
||||
{
|
||||
raise = true
|
||||
}
|
||||
)
|
||||
end
|
||||
capi.tag.connect_signal('property::selected', function(c)
|
||||
if #awful.screen.focused().clients > 0 then
|
||||
awful.screen.focused().clients[1]:emit_signal(
|
||||
'request::activate',
|
||||
'mouse_enter', {
|
||||
raise = true
|
||||
})
|
||||
end
|
||||
)
|
||||
end)
|
||||
|
||||
-- Sloppy focus
|
||||
--[[ client.connect_signal(
|
||||
"mouse::enter",
|
||||
function(c)
|
||||
c:emit_signal(
|
||||
"request::activate",
|
||||
"mouse_enter",
|
||||
{
|
||||
raise = true
|
||||
}
|
||||
)
|
||||
end
|
||||
) ]]
|
||||
--[[ client.connect_signal("mouse::enter", function(c)
|
||||
c:emit_signal(
|
||||
"request::activate",
|
||||
"mouse_enter",{
|
||||
raise = true
|
||||
})
|
||||
end) ]]
|
||||
|
||||
--- Takes a wibox.container.background and connects four signals to it
|
||||
---@param widget wibox.container.background a background widget
|
||||
|
||||
Reference in New Issue
Block a user