added flash focus
This commit is contained in:
parent
8aa94da85f
commit
fdf2130012
|
@ -0,0 +1,32 @@
|
|||
local gears = require("gears")
|
||||
local beautiful = require("beautiful")
|
||||
|
||||
local op = beautiful.flash_focus_start_opacity or 0.6
|
||||
local stp = beautiful.flash_focus_step or 0.01
|
||||
|
||||
local flashfocus = function(c)
|
||||
if c then
|
||||
c.opacity = op
|
||||
local q = op
|
||||
local g = gears.timer {
|
||||
timeout = stp,
|
||||
call_now = false,
|
||||
autostart = true
|
||||
}
|
||||
|
||||
g:connect_signal("timeout", function()
|
||||
if q >= 1 then
|
||||
c.opacity = 1
|
||||
g:stop()
|
||||
else
|
||||
c.opacity = q
|
||||
q = q + stp
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
local enable = function() client.connect_signal("focus", flashfocus) end
|
||||
local disable = function() client.disconnect_signal("focus", flashfocus) end
|
||||
|
||||
return {enable = enable, disable = disable}
|
|
@ -1,4 +1,5 @@
|
|||
return {
|
||||
window_swallowing = require("bling.module.window_swallowing"),
|
||||
tiled_wallpaper = require("bling.module.tiled_wallpaper")
|
||||
tiled_wallpaper = require("bling.module.tiled_wallpaper"),
|
||||
flash_focus = require("bling.module.flash_focus")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue