Display a screenshot after 1.5 second when hovering the tasklist
This commit is contained in:
parent
114cbd23be
commit
26814e77ee
|
@ -14,8 +14,9 @@ local beautiful = require( "beautiful" )
|
|||
local client = require( "awful.client" )
|
||||
local wibox = require( "wibox" )
|
||||
local surface = require( "gears.surface")
|
||||
local client_menu = require("radical.impl.tasklist.client_menu")
|
||||
local client_menu = require( "radical.impl.tasklist.client_menu")
|
||||
local theme = require( "radical.theme")
|
||||
local rad_client = require( "radical.impl.common.client")
|
||||
|
||||
local sticky,urgent,instances,module = {extensions=require("radical.impl.tasklist.extensions")},{},{},{}
|
||||
local _cache = setmetatable({}, { __mode = 'k' })
|
||||
|
@ -55,6 +56,16 @@ module.buttons = {
|
|||
end
|
||||
}
|
||||
|
||||
local function display_screenshot(c,geo,visible)
|
||||
if not visible and prev_menu then
|
||||
prev_menu.visible = false
|
||||
return
|
||||
end
|
||||
if not c then return end
|
||||
|
||||
return rad_client.screenshot(c,geo)
|
||||
end
|
||||
|
||||
local function sticky_callback(c)
|
||||
local val = c.sticky
|
||||
sticky[c] = val and true or nil
|
||||
|
@ -261,6 +272,10 @@ local function new(screen)
|
|||
end
|
||||
end)
|
||||
|
||||
menu:connect_signal("long::hover",function(m,i,mod,geo)
|
||||
display_screenshot(i.client,geo,true)
|
||||
end)
|
||||
|
||||
return menu,menu._internal.layout
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue