lcpz / lain

Awesome WM complements

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Centerwork layout not keeping first client in center

whoracle opened this issue · comments

Starting with an empty tag, I open one client (e.g. text editor). This client stays in center as expected.
On spawning another client (e.g. urxvt), the new client will be placed in center and the previous one will be pushed to the side.

  • output of awesome -v and lua -v
awesome v4.3 (Too long)
 • Compiled against Lua 5.3.6 (running with Lua 5.3)
 • D-Bus support: ✔
 • execinfo support: ✔
 • xcb-randr version: 1.6
 • LGI version: 0.9.2
Lua 5.4.3  Copyright (C) 1994-2021 Lua.org, PUC-Rio
lain at commit  4933d6cb27390776a21c659020d8ba1f4a027624 lain (heads/master)
  • expected behavior and actual behavior
    First client should stay in center after opening another client

  • steps to reproduce the problem
    install awesome, awesome-copycats theme steamburn and set one of the tags to use centerwork layout

Screenshots:
One client
Two clients

I can provide rc.lua and my modified theme.lua if needed.

In the rules I had to add this callback to get it to put windows as slaves

I'm using awesome-git with the default config outside of just adding lain, so I don't know if this is a workaround for a bug or just some difference in defaults?

    -- {{{ Rules
awful.rules.rules = {
    -- All clients will match this rule.
    { rule = { },
      properties = { border_width = beautiful.border_width,
                     border_color = beautiful.border_normal,
                     -- Spawn windows as slave
                     callback = awful.client.setslave,
                     focus = awful.client.focus.filter,
                     raise = true,
                     keys = clientkeys,
                     buttons = clientbuttons,
                     screen = awful.screen.preferred,
                     placement = awful.placement.no_offscreen,
                     size_hints_honor = false
     }
    },

Thanks, the line callback = awful.client.setslave, was what was needed. Don't know if that's new or if I threw it out of my config in a fit of madness at some point, but adding that restored the original behaviour.

That line was also missing in the rc.lua.template of awesome-copycats, so I added it. Thank you for spotting this, @keslerm.