lua - Awesome wm setting size for the tasklist item -


i'm coding custom vertical wibox contains tasklist, want this: enter image description here

but instead of being fixed height, tasklist items take available space. here's result: enter image description here

here's code far:

function render_task_box(s)     myotherbox[s] = awful.wibox({ position = "left", screen = s, ontop =     true, width = 200 })      mytasklist[s] = awful.widget.tasklist(         s,         awful.widget.tasklist.filter.currenttags,         mytasklist.buttons,         nil,         nil,         wibox.layout.flex.vertical())         local middle_layout = wibox.layout.fixed.vertical()     middle_layout:add(mytasklist[s])      local layout = wibox.layout.align.vertical()     layout:set_middle(middle_layout)      myotherbox[s]:set_widget(layout)  end 

so how wanted result? (or @ least set height of tasklist icon)

update

looked docs , tried this:

local l = wibox.layout.flex.vertical(); l:set_max_widget_size(20) 

it did nothing.

after reading of awesome's source code i've found solution.

somewhere in script require this

local common = require("awful.widget.common") 

then create function overrides task update function:

function list_update(w, buttons, label, data, objects)     -- call default widget drawing function     common.list_update(w, buttons, label, data, objects)     -- set widget size     w:set_max_widget_size(20) end 

then pass function tasklist

    mytasklist[s] = awful.widget.tasklist(s,     awful.widget.tasklist.filter.currenttags,     mytasklist.buttons,     nil,     list_update,     wibox.layout.flex.vertical()) 

thats it!


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -