Improved language indicator
parent
4f9922cd3a
commit
c0b9376da4
|
@ -31,15 +31,22 @@ for k, l in pairs(language.language_list) do
|
|||
shape = gears.shape.circle,
|
||||
}
|
||||
|
||||
language.widget:add_widget_at(l["widget_checkbox"], k, 1, 1, 1)
|
||||
|
||||
language.widget:add_widget_at(wibox.widget {
|
||||
l["widget_text"] = wibox.widget {
|
||||
{
|
||||
markup = "<b>" .. l["title"] .. "</b>",
|
||||
align = "left",
|
||||
valign = "center",
|
||||
font = "Comfortaa 23",
|
||||
font = "Comfortaa 16",
|
||||
widget = wibox.widget.textbox
|
||||
}, k, 2, 0, 1)
|
||||
},
|
||||
layout = wibox.container.background,
|
||||
}
|
||||
|
||||
l["widget_text"].bg = "#00000000"
|
||||
|
||||
language.widget:add_widget_at(l["widget_text"], k, 1, 1, 1)
|
||||
--language.widget:add_widget_at(l["widget_checkbox"], k, 1, 1, 1)
|
||||
--language.widget:add_widget_at(l["widget_text"], k, 2, 0, 1)
|
||||
end
|
||||
|
||||
language.next = function()
|
||||
|
@ -63,6 +70,11 @@ end
|
|||
|
||||
language.update_checks = function()
|
||||
for _, l in pairs(language.language_list) do
|
||||
if (wrapper.ibus.current_engine == l["ibus_engine"]) then
|
||||
l["widget_text"].bg = "#FF0000"
|
||||
else
|
||||
l["widget_text"].bg = "#00000000"
|
||||
end
|
||||
l["widget_checkbox"].checked = (wrapper.ibus.current_engine == l["ibus_engine"])
|
||||
end
|
||||
end
|
||||
|
@ -94,9 +106,9 @@ language.popup = awful.popup {
|
|||
visible = false,
|
||||
hide_on_right_click = true,
|
||||
|
||||
shape = gears.shape.rounded_rect,
|
||||
shape = gears.shape.rectangle,
|
||||
placement = function(d)
|
||||
return awful.placement.centered(d, {
|
||||
return awful.placement.bottom_right(d, {
|
||||
honor_workarea = true
|
||||
})
|
||||
end,
|
||||
|
|
Loading…
Reference in New Issue