diff --git a/impl/taglist/init.lua b/impl/taglist/init.lua index 386a9bc..51d9c05 100644 --- a/impl/taglist/init.lua +++ b/impl/taglist/init.lua @@ -15,6 +15,7 @@ local client = require( "awful.client" ) local wibox = require( "wibox" ) local awful = require( "awful" ) local theme = require( "radical.theme") +local tracker = require( "radical.impl.taglist.tracker" ) local CLONED = 100 @@ -176,6 +177,8 @@ end local function new(s) + local track = tracker(s) + local args = { item_style = radical.item.style.arrow_prefix, select_on = radical.base.event.NEVER, @@ -208,17 +211,19 @@ local function new(s) end) init() + track:reload() return instances[s] end capi.tag.connect_signal("property::selected" , select) -capi.tag.connect_signal("property::index",function(t,i) +capi.tag.connect_signal("property::index2",function(t,i) + print("FOO",t,i) if t then local s = tag.getscreen(t) local item = cache[t] if item then local index = tag.getidx(t) --- instances[s]:move(item,index) + instances[s]:move(item,index) item.tw:set_markup(" "..(index).." ") end end diff --git a/impl/tasklist/init.lua b/impl/tasklist/init.lua index 2181bc5..6882f71 100644 --- a/impl/tasklist/init.lua +++ b/impl/tasklist/init.lua @@ -17,7 +17,7 @@ local client_menu = require("radical.impl.tasklist.client_menu") local theme = require( "radical.theme") local sticky,urgent,instances,module = {},{},{},{} -local _cache = {} +local _cache = setmetatable({}, { __mode = 'k' }) local MINIMIZED = 101 theme.register_color(MINIMIZED , "minimized" , "tasklist_minimized" , true ) @@ -213,7 +213,7 @@ local function new(screen) args["fg_"..v] = beautiful["tasklist_fg_"..v] args["underlay_bg_"..v] = beautiful["tasklist_underlay_bg_"..v] end - local cache,menu = setmetatable({}, { __mode = 'k' }),radical.flexbar(args) + local menu = radical.flexbar(args) -- overlay = function(data,item,cd,w,h) -- print("foo!") -- end, @@ -227,7 +227,7 @@ local function new(screen) end end local function untagged(c,t) - local item = cache[c] + local item = _cache[c] if t.selected and tag.getscreen(t) == screen then menu:remove(item) end @@ -240,7 +240,7 @@ local function new(screen) capi.client.connect_signal("tagged" , tagged ) capi.client.connect_signal("untagged" , untagged ) - instances[screen] = {menu = menu, cache = cache } + instances[screen] = {menu = menu} load_clients(tag.selected(screen)) diff --git a/item/init.lua b/item/init.lua index 80dfa1f..6d4c1e2 100644 --- a/item/init.lua +++ b/item/init.lua @@ -151,7 +151,7 @@ local function new_item(data,args) data._tmp_menu = nil end data.item_style(current_item,{}) - current_item.selected = false +-- current_item.selected = false end if data.sub_menu_on == module.event.SELECTED and current_item ~= item then module.execute_sub_menu(data,item)