Add "center window vertically" or "center window" action for windows on scratch layer
Is your feature request related to a problem? Please describe. For windows on scratch layer, center window horizontally works, but I think there should be a method to center window vertically and also center window both horizontally and vertically.
usecases: there could be many windows on scratch layers without tiling, these two functions are useful for window management on scratch layer. Describe the solution you'd like implement center window vertically and also center window both horizontally and vertically.
Describe alternatives you've considered currently no, I think this is straightforward.
The only thing that comes to mind here is that these bindings should be specific to scratch windows, because tiled windows can not be centered vertically, so the bindings would probably be called "center scratch window vertically" and "center scratch window". @jtaala, am I correct in my thinking here?
@glupi-borna, yes you are correct.
I wouldn't use this though, but if anyone here thinks would be useful for their workflows definitely feel free to create a PR for this and I'd be happy to look at it.
Cheers.
There is already an option org.gnome.mutter.center-new-windows which automatically centers windows, both vertically and horizontally, but it seems like PaperWM doesn't respect that. Would it make sense to respect that as an alternative to the keybinding to center windows?
Could someone please check this PR out and test?
git clone https://github.com/paperwm/PaperWM.git
cd PaperWM
git checkout improve-center-window-keybinds
./install.sh
then logout / login.
New keybind is super+v to center scratch windows vertically (super+c+ centers both horizontally/vertically). Let me know how it feels.
Jay.
It seems great!
Btw I'm not sure if there should be an individual option for "horizontally only". We might as well add it for symmetry in case someone need it.