pop-os / cosmic-comp

Compositor for the COSMIC desktop environment
GNU General Public License v3.0
488 stars 90 forks source link

[Feature request] Maximum window width when only a single window is tiled #377

Open Alanazane opened 8 months ago

Alanazane commented 8 months ago

It can be useful to have a maximum window width in situations where there is only one window tiled. This is mostly useful for those of us with very large or ultra-wide monitors, so the window is centered rather than spanning the entire screen (which can be quite awkward).

This implemented in Sway as smart_gaps inverse_outer With Sway you actually set the gaps to the side of the window but the result is the same.

Side note: Sorry if it isn't quite time yet for feature requests :) I'm really looking forward to Cosmic, with the native tiling it'll likely finally move me from Sway. :tada:

Drakulix commented 8 months ago

Ping @pop-os/ux. Sounds like a good idea in principle, but I am struggling to imagine how to communicate this setting effectively in settings. Though this targets people mostly using tiling setups, so power-users, so maybe this might be good enough as a hidden config file option?

Alanazane commented 8 months ago

I think having a hidden config file option would be totally adequate! Particularly since this is something I imagine most of us will set up once to turn it on, and never touch again.

maria-komarova commented 8 months ago

Hidden option in the config file sounds good to me, at least for now.

rwjack commented 5 months ago

but I am struggling to imagine how to communicate this setting effectively in settings.

Each tiling option should have it's own settings. This setting should fall under center/master layout, be it configurable through a file or the gui.

griccardos commented 2 weeks ago

This is a feature we really need with a widescreen monitor. I have implemented a proof of concept to see how this may work, and found that it works nicely for me. I have implemented limiting the width to 50% and centering the window.

For those wanting to test: https://github.com/griccardos/cosmic-comp

I have not implemented the config setting, but can give that a go if there is any interest.

rwjack commented 2 weeks ago

@griccardos cool, so how do we test this out?

griccardos commented 2 weeks ago

@rwjack make sure you have rust installed, then do something like:

git clone https://github.com/griccardos/cosmic-comp
cd cosmic-comp
cargo build --release
sudo cp target/release/cosmic-comp /usr/bin/