简体   繁体   中英

Can you put a client into a widget hierarchy in awesome-wm?

I was wondering if you can put the client into a widget hierarchy. Basically is there a way to do something like:

local cool_background_widget = wibox.widget({
    widget = wibox.container.background,
    {
        client, --??????
    }
})

I'm expecting there isn't but if there's not, is there some hacky way to do it?

Short answer: no. But there's a few way around this.

1: Using a client + titlebars as top bar

If you only need a single client within your wibar/wibox, then you can put a different titlebar around that client and use that as your top (or whatever) bar. To add space like a normal bar, either play with the client :struts() property or use screen.padding .

2: Create a custom placeholder widget

The second option is to create a new widget, then use its own :draw() function as a hook to know when to move the client (using c:geometry() ). This is mostly what the dynamic client layout branch does . This has some issues like having to keep raising the client. You also have to disconnect a bunch of thing to prevent existing code path from affecting client (like the request::geometry handlers, such as the one to move/resize the client using mod4+mouse ). You also need to make the client floating and sticky to get the correct result.

3: Patches welcome

It is important to keep in mind that there is no technical limitations that prevent this feature from being implemented. There is an existing issue regarding adding this. In some alternate universe where both the core AwesomeWM developers would have unlimited time, this would be a feature. We are discussing doing it for the individual systray "icons" first. This issue is also a good reference, but in this case would not be enough to implement what you request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM