Awesome: Should AwesomeWM automatically un-minimize clients when request::activate or c.focus = true is called on them?

Created on 30 Oct 2017  路  5Comments  路  Source: awesomeWM/awesome

I'm trying setup a integration of [rofi] with my AwesomeWM setup. I'm pretty newbie with awesomeWM, I just started three days ago.

The standard configuration of [rofi] seems that doesn't works well with it. I mean... using rofi -show window and trying focus on a minimized window will not work, only change the title of window from white to red (???). I don't know If that is a config problem or the design of awesome. My config is online here, heavily based on copycats (sorry).

There is something that I config on rc.lua to accomplish that behavior?

I have similar problems before trying raise my emacs frame from a external script and not always works... I didn't understand very well why this.

Most helpful comment

While this works great, it unminimizes any minimized clients after restarting Awesome.
You can use if not awesome.startup to avoid that:

client.connect_signal("request::activate", function(c, context, hints)
    if not awesome.startup then
        if c.minimized then
            c.minimized = false
        end
        awful.ewmh.activate(c, context, hints)
    end
end)

All 5 comments

Giving focus to minimized windows make no sense at all. You should unminimize it first. I guess the question is "should Awesome automatically unminimize clients when request::activate or c.focus = true is called on them?".

Also, it becomes red because currently, Awesome leave them minimized and tag them as urgent. Note that this behavior can be modified using the API by replacing the request::activate handler.

Sorry for creating a stupid question, but thanks for answering it anyway. I'll try change the handler.

My problem solved with your tip @Elv13 and looking the docs API:

-- make rofi possible to raise minimized clients
client.connect_signal("request::activate",
                      function(c, context, hints)
                         if c.minimized then
                            c.minimized = false
                         end
                         awful.ewmh.activate(c, context, hints)
                      end)

Thanks for the patience, I'm closing that since we solved.

While this works great, it unminimizes any minimized clients after restarting Awesome.
You can use if not awesome.startup to avoid that:

client.connect_signal("request::activate", function(c, context, hints)
    if not awesome.startup then
        if c.minimized then
            c.minimized = false
        end
        awful.ewmh.activate(c, context, hints)
    end
end)

This is a nice change @elenapan

Was this page helpful?
0 / 5 - 0 ratings