Fix Alttab module when used without my config
This commit is contained in:
parent
f3fb27f464
commit
9a78433e1e
|
@ -59,6 +59,7 @@ end
|
|||
|
||||
local function select_next(menu)
|
||||
local item = menu.next_item
|
||||
if not item then return end
|
||||
item.selected = true
|
||||
item.button1(nil,nil,nil,nil,true)
|
||||
return true
|
||||
|
@ -97,7 +98,7 @@ end
|
|||
|
||||
local function new(args)
|
||||
local histo = get_history(--[[screen]])
|
||||
if #histo == o then
|
||||
if #histo == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -153,20 +154,19 @@ local function new(args)
|
|||
end)
|
||||
|
||||
|
||||
if module.titlebar_path then
|
||||
for k,v2 in ipairs(histo) do
|
||||
local l,v = wibox.layout.fixed.horizontal(),v2[2]
|
||||
if not auto_release then
|
||||
if not auto_release and module.titlebar_path then
|
||||
l:add( button_group({client = v, field = "floating" , focus = false, checked = function() return v.floating end, onclick = function() v.floating = not v.floating end }))
|
||||
l:add( button_group({client = v, field = "maximized", focus = false, checked = function() return v.maximized end, onclick = function() v.maximized = not v.maximized end }))
|
||||
l:add( button_group({client = v, field = "sticky" , focus = false, checked = function() return v.sticky end, onclick = function() v.sticky = not v.sticky end }))
|
||||
l:add( button_group({client = v, field = "ontop" , focus = false, checked = function() return v.ontop end, onclick = function() v.ontop = not v.ontop end }))
|
||||
l:add( button_group({client = v, field = "close" , focus = false, checked = function() return false end, onclick = function() v:kill() end }))
|
||||
l.fit = function (s,w,h) return 5*h,h end
|
||||
end
|
||||
|
||||
local underlays = reload_underlay(v)
|
||||
|
||||
l.fit = function (s,w,h) return 5*h,h end
|
||||
local i = currentMenu:add_item({
|
||||
text = v.name,
|
||||
icon = v.icon or module.default_icon,
|
||||
|
@ -193,7 +193,6 @@ local function new(args)
|
|||
i:connect_signal("selected::changed",reload_highlight)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if auto_release then
|
||||
currentMenu:add_key_hook({}, "Alt_L", "release", function(_)
|
||||
|
|
|
@ -2,7 +2,6 @@ local setmetatable = setmetatable
|
|||
local io = io
|
||||
local ipairs = ipairs
|
||||
local tag = require( "awful.tag" )
|
||||
local config = require( "forgotten" )
|
||||
local menu = require( "radical.context" )
|
||||
local com_tag = require( "radical.impl.common.tag" )
|
||||
local awful = require("awful")
|
||||
|
@ -16,6 +15,13 @@ local aTagMenu = nil
|
|||
|
||||
local aTag = nil
|
||||
|
||||
|
||||
-- My config has an icon directory path stored there, change as you like
|
||||
local config = nil
|
||||
if pcall(require,("forgotten")) then
|
||||
config = require("forgotten")
|
||||
end
|
||||
|
||||
local function new(t)
|
||||
aTag = t or aTag
|
||||
|
||||
|
|
Loading…
Reference in New Issue