diff --git a/README.md b/README.md index 63cbffe..f13aa91 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,7 @@ Multiple items can have multiple sets of options. | filter_prefix | Text to be shown at begenning of the filter string | string | | max_items | Maximum number of items before showing scrollbar | number | | enable_keyboard | Enable or disable keyboard navigation / hooks | boolean | +| disable_markup | Disable pango markup in items text | boolean | | x | X position (absolute) | number | | y | Y position (absolute) | number | diff --git a/base.lua b/base.lua index b4453cc..c5ffea9 100644 --- a/base.lua +++ b/base.lua @@ -264,6 +264,7 @@ local function new(args) filter_prefix = args.filter_prefix or "Filter:", enable_keyboard = (args.enable_keyboard ~= false), max_items = args.max_items or nil, + disable_markup = args.disable_markup or false, x = args.x or 0, y = args.y or 0, }, diff --git a/layout/horizontal.lua b/layout/horizontal.lua index 09334c8..4f7cd9e 100644 --- a/layout/horizontal.lua +++ b/layout/horizontal.lua @@ -116,7 +116,6 @@ function module:setup_item(data,item,args) cr:paint() wibox.widget.textbox.draw(self,w, cr, width, height) end - pref:set_markup("F11") l:add(pref) m:set_left ( 0 ) end @@ -172,7 +171,11 @@ function module:setup_item(data,item,args) data.height = fit_h data.style(data) item._internal.set_map.text = function (value) - text_w:set_markup(value) + if data.disable_markup then + text_w:set_text(value) + else + text_w:set_markup(value) + end if data.auto_resize then local fit_w,fit_h = text_w:fit(999,9999) local is_largest = item == data._internal.largest_item_h diff --git a/layout/vertical.lua b/layout/vertical.lua index bb99e6e..0e1dee9 100644 --- a/layout/vertical.lua +++ b/layout/vertical.lua @@ -206,7 +206,11 @@ function module:setup_item(data,item,args) data.height = fit_h data.style(data) item._internal.set_map.text = function (value) - text_w:set_markup(value) + if data.disable_markup then + text_w:set_text(value) + else + text_w:set_markup(value) + end if data.auto_resize then local fit_w,fit_h = wibox.widget.textbox.fit(text_w,9999,9999) local is_largest = item == data._internal.largest_item_w