smart_borders icon indicating copy to clipboard operation
smart_borders copied to clipboard

How to change normal color for smart_boarder based on current input language

Open einhander opened this issue 9 months ago • 0 comments

Hello! I'm using the following code to set boarder colour, but I can't figure out how to change it to use with smart-boarder.

dbus.request_name("session", "ru.gentoo.kbdd") 
dbus.add_match("session", "interface='ru.gentoo.kbdd',member='layoutChanged'") 
dbus.connect_signal("ru.gentoo.kbdd", function(...) 
    local data = {...} 
    local layout = data[2] 
    local c = client.focus
    lts = {[0] = '<span color="'.. eng_color ..'"><b> Eng </b></span>', [1] = '<span color="'.. rus_color ..'"><b> Рус </b></span>'} 
    kbdwidget.markup = " "..lts[layout].." " 

    if layout == 1
        then 
            next_layout = 0
            border_color = rus_color
            if c ~= nil 
                then 
                    c.border_color = border_color 
    end
        else
            next_layout = 1
            border_color = eng_color
            if c ~= nil 
                then 
                c.border_color = border_color
            end
        end 
    end
) 

einhander avatar Mar 15 '25 16:03 einhander