Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ryukinix opened this issue Oct 30, 2017 · 5 comments

Comments

@ryukinix
Copy link

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.

@Elv13
Copy link
Member

Elv13 commented Oct 30, 2017

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.

@ryukinix
Copy link
Author

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

@ryukinix ryukinix changed the title Why a minimized window can't get focus on AwesomeWM? Should AwesomeWM automatically un-minimize clients when request::activate or c.focus = true is called on them? Oct 31, 2017
@ryukinix
Copy link
Author

ryukinix commented Oct 31, 2017

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.

ryukinix added a commit to ryukinix/dotfiles that referenced this issue Oct 31, 2017
Allow minimized windows getting focus if they are triggered.
I need that because when I use rofi to raise minimized windows doesn't
works. This is sad.

awesomeWM/awesome#2092 (comment)
@elenapan
Copy link

elenapan commented Feb 9, 2019

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)

@ryukinix
Copy link
Author

ryukinix commented Feb 9, 2019

This is a nice change @elenapan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants