Giter VIP home page Giter VIP logo

Comments (11)

actionless avatar actionless commented on July 18, 2024

i don't think what visual separation is useless

from awesome.

Elv13 avatar Elv13 commented on July 18, 2024

Oh, I forgot to talk about the code:

Done:

  • Implement for all layouts
  • Add methods in awful.tag like other properties

What's left:

  • Find a way to hook that with beautiful (I don't want to require() it in awful.tag
  • Remove the 10px default and use 0px
  • Somehow add comments in theme or rc.lua to guide users
  • Port to master
  • Do more advanced testing

from awesome.

BenoitZugmeyer avatar BenoitZugmeyer commented on July 18, 2024

For what it's worth, I would love to see this in Awesome. For now, I use lain, which is great but has one annoying issue.

from awesome.

liquiddandruff avatar liquiddandruff commented on July 18, 2024

Neat. I'd like this.

from awesome.

Elv13 avatar Elv13 commented on July 18, 2024

@BenoitZugmeyer @liquiddandruff: Can you test the branch and give some feedback?

Thanks

from awesome.

BenoitZugmeyer avatar BenoitZugmeyer commented on July 18, 2024

Testing it right now. No issue spotted. I'll keep using it for a few days.

If anyone is interested, here is an ArchLinux PKGBUILD

from awesome.

BenoitZugmeyer avatar BenoitZugmeyer commented on July 18, 2024

I've spotted an issue:

  • With the layout awful.layout.suit.tile
  • Open two clients
  • Increase the number of columns (awful.tag.incncol(1), default binding Mod+Ctrl+h)

The space between the clients is increasing.

from awesome.

silverhammermba avatar silverhammermba commented on July 18, 2024

I would definitely like this to be added. Window borders are so ugly, but useless gaps provide the same separation while looking nice! I'll see if I can play around with the code a bit.

from awesome.

silverhammermba avatar silverhammermba commented on July 18, 2024

I took a different approach which I find much simpler: silverhammermba/awesome@986e9bf

My idea was to let the layout arrange the clients as usual, then perform a second pass to slightly shrink each client to create the gaps. The advantage of this method is that it involves very little code and is layout-agnostic.

However, there are two issues with this approach:

  1. Since each layout directly modifies the client geometry, this approach resizes each client twice when arranging the screen (once for the layout, once for the gaps). This causes an unpleasant flickering effect.
  2. A naive implementation completely breaks the floating layout. That's because the floating layout doesn't actually mark the clients as floating (they are still returned by awful.client.tiled) it just doesn't modify any client geometry. But this results in every client shrinking down to nothing because the second pass assumes that the client geometry has been set to some fixed size before shrinking it. My workaround is to store the client geometries before the layout does its stuff, so that we can check if the geometry was unchanged and not shrink it.

I think that both of these problems could be solved by DRYing off the layout code so that each layout simply partitions the screen according to the number of clients, returns the resulting geometries, and the geometries are actually applied in awful.layout.arrange after optional post-processing (for borders, useless gaps, etc.). I implemented these as #101

from awesome.

blueyed avatar blueyed commented on July 18, 2024

Now that #101 is merged, useless gaps can/should be implemented based on it (silverhammermba@986e9bf).

@silverhammermba
Can you please create a new PR for this?

from awesome.

silverhammermba avatar silverhammermba commented on July 18, 2024

Sure thing, but I'm stuck in the same place @Elv13 was: making the gaps not hard-coded. I feel like they should be configured similarly to border widths, but there's a surprising amount of code for handling the border width property. Any advice on how I should approach this?

from awesome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.