layout change based on rules

Issue #51 resolved
Viktor created an issue

Could it be scripted somehow to change the layout, so that if I open, for example, the 4th window within a workspace, it switches to the grid layout? 1,2,3,5 should you use a tile layout in the case of an open window?

Comments (11)

  1. Nate Maia repo owner

    Yea of course its possible, probably a lot easier to do through a patch to the actual code rather than scripted, either way it’s gonna be kinda hardcoded.

  2. Nate Maia repo owner

    Try out the latest commit and try the layout dyntile, you can modify the config.h to adjust values or change the layouts

  3. Michael Garcia

    works as expected and wow, that is absoluly a setting I didn’t even know I wanted/needed. time to make some new dynamic ws layouts

  4. Michael Garcia

    two things, first only appears to sort of work

       ~ dkcmd set layout dyntile
       ~ dkcmd set layout tile
       ~ dkcmd set layout dyntile
    dkcmd: error: invalid layout argument: dyntile
    expected string e.g tile
    

  5. Nate Maia repo owner

    Ahh I’m so dumb lol, I’m updating the layout name in dyntile which causes the search to fail after switching. Added another string to the layout structure so it never changes and is searchable, while the display names can be updated at will.

    Another good find thank you

  6. Nate Maia repo owner

    I’ve changed the config header again back to the original and come up with a better solution with the latest commit, I just really didn’t like the duplicate strings.

  7. Log in to comment