Rmeove auto hide
This commit is contained in:
parent
2293f28643
commit
dcaf91e0a8
59
rc.lua
59
rc.lua
|
@ -336,35 +336,36 @@ awful.screen.connect_for_each_screen(function(s)
|
|||
}
|
||||
end
|
||||
|
||||
s.detect = gears.timer {
|
||||
timeout = 0.35,
|
||||
callback = function ()
|
||||
if (mouse.screen ~= s) or
|
||||
(mouse.coords().y < s.geometry.y + s.geometry.height - wibar_height)
|
||||
then
|
||||
s.mywibox.visible = false
|
||||
s.detect:stop()
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
s.enable_wibar = function ()
|
||||
s.mywibox.visible = true
|
||||
if not s.detect.started then
|
||||
s.detect:start()
|
||||
end
|
||||
end
|
||||
|
||||
s.activation_zone = wibox ({
|
||||
x = s.geometry.x, y = s.geometry.y + s.geometry.height - 1,
|
||||
opacity = 0.0, width = s.geometry.width, height = 1,
|
||||
screen = s, input_passthrough = false, visible = true,
|
||||
ontop = true, type = "dock",
|
||||
})
|
||||
|
||||
s.activation_zone:connect_signal("mouse::enter", function ()
|
||||
s.enable_wibar()
|
||||
end)
|
||||
-- Auto hide wibar
|
||||
-- s.detect = gears.timer {
|
||||
-- timeout = 0.35,
|
||||
-- callback = function ()
|
||||
-- if (mouse.screen ~= s) or
|
||||
-- (mouse.coords().y < s.geometry.y + s.geometry.height - wibar_height)
|
||||
-- then
|
||||
-- s.mywibox.visible = false
|
||||
-- s.detect:stop()
|
||||
-- end
|
||||
-- end
|
||||
-- }
|
||||
--
|
||||
-- s.enable_wibar = function ()
|
||||
-- s.mywibox.visible = true
|
||||
-- if not s.detect.started then
|
||||
-- s.detect:start()
|
||||
-- end
|
||||
-- end
|
||||
--
|
||||
-- s.activation_zone = wibox ({
|
||||
-- x = s.geometry.x, y = s.geometry.y + s.geometry.height - 1,
|
||||
-- opacity = 0.0, width = s.geometry.width, height = 1,
|
||||
-- screen = s, input_passthrough = false, visible = true,
|
||||
-- ontop = true, type = "dock",
|
||||
-- })
|
||||
--
|
||||
-- s.activation_zone:connect_signal("mouse::enter", function ()
|
||||
-- s.enable_wibar()
|
||||
-- end)
|
||||
|
||||
-- update_background_widget(s)
|
||||
|
||||
|
|
Loading…
Reference in New Issue