raexera / yoru

A custom Linux environment built on AwesomeWM
GNU General Public License v3.0
3.48k stars 198 forks source link

[Question] System Tray requires a long time to Initialize? #93

Closed explocion closed 2 years ago

explocion commented 2 years ago

The system tray is hided and can be exposed through animation (clicking "<"). However, the "<" button is not responsive until several minutes after entering awesome wm. I'm wondering is that because it takes so long to load that systray?

explocion commented 2 years ago

I think adding a get_text method for text widget fixes it.

local arrow = wbutton.text.state({
            text_normal_bg = beautiful.accent,
            normal_bg = beautiful.wibar_bg,
            font = beautiful.icon_font .. "Round ",
            size = 18,
            text = "",
            on_release = function(self)
                if self:get_text() == "" then
                    system_tray_animation:set(400)
                    self:set_text("")
                else
                    system_tray_animation:set(0)
                    self:set_text("")
                end
            end,
        })