r/awesomewm 18d ago

Awesome Git How do I make a specific application always float?

What I wanted to do is making it so that windows with a specific title always float independently on the layout, but I couldn't find a way of doing that, is it possible?

5 Upvotes

4 comments sorted by

2

u/aire-one 18d ago edited 18d ago

Yes, it is possible using the ruled library, see: https://awesomewm.org/apidoc/declarative_rules/ruled.client.html

The default awesomerc.lua have some examples in the corresponding section https://github.com/awesomeWM/awesome/blob/master/awesomerc.lua#L464-L520. This section is part of the doc https://awesomewm.org/apidoc/documentation/05-awesomerc.md.html#Rules

You'll want to play with something based on the id = "floating" rule example.

EDIT: Be aware that some applications sets their client's title "later" which make a rule based solely on this property possibly flaky since rules are evaluated at the client startup.

1

u/AxolotlGuyy_ 17d ago

It worked! Thank you

1

u/mattplm 7d ago

I had this issue. To avoid the flakyness I have used this for a client that sets its name late (firefox addon for bitwarden) : https://github.com/mpaulmier/dotfiles/blob/master/somewm/.config/somewm/rc.lua#L987-L1015

It just hides the client until it receives a name or after a short timeout in case there is an issue setting the title.

If it can help someone who stumbles here.

1

u/aire-one 6d ago

Interesting approach!

Instead of the name, I think you could also use other X properties like the type or transient status to discriminate the main browser window from add-on generated ones.