shell icon indicating copy to clipboard operation
shell copied to clipboard

Add "auto unstack" switch

Open MeowcaTheoRange opened this issue 2 years ago • 5 comments

Create a toggle switch in the settings to enable destroying stacks when they have only one window.

This is my first PR, and it "works on my machine" when I run make debug. There still might be bugs, though.

My system specs:

OS: Nobara Linux 37 (Thirty Seven) x86_64 
Kernel: 6.3.5-201.fsync.fc37.x86_64 
Resolution: 1920x1080 
DE: GNOME 43.2 on Mutter X11
WM Theme: Adwaita
Theme: adw-gtk3-dark [GTK2/3] 
Icons: Adwaita [GTK2/3] 
CPU: Intel i7-10750H (12) @ 2.600GHz 
GPU: NVIDIA GeForce GTX 1660 Ti Mobile 
Memory: 7833MiB 

MeowcaTheoRange avatar Oct 03 '23 15:10 MeowcaTheoRange

~~Oh, I should also explain the strange indent and .prettierignore file. Well actually, I'm pretty sure they explain themselves if you've ever used Prettier.~~ Well, I fixed it, but Prettier also changed some other things. Will fix soon.

MeowcaTheoRange avatar Oct 04 '23 13:10 MeowcaTheoRange

image [ALT: A cake with the text "Sorry I committed code that was formatted by my IDE" "(it might happen again)"]

MeowcaTheoRange avatar Oct 04 '23 13:10 MeowcaTheoRange

This doesn't seem to be working. After turning the option on, I can still move windows out of a stack and have a single remaining window remain in the stack, rather than having the stack be destroyed. simplescreenrecorder-2023-10-12_17.37.42.mp4

The most recent commit also broke the tab bar's formatting, as shown in the above video (the commit message includes do not PR, so I assume pushing it here was a mistake?)

Oh no, I didn't mean to PR the recent commit, I think it just did it automatically. I'll try to remove the commit.

Also, it might not be working because my commit might have only affected mouse stacking - I based my code off of the code that reverted this stacking behaviour, so I'm not sure how to also make it apply to keyboard stacking.

MeowcaTheoRange avatar Oct 13 '23 19:10 MeowcaTheoRange

Also, it might not be working because my commit might have only affected mouse stacking - I based my code off of the code that reverted this stacking behaviour, so I'm not sure how to also make it apply to keyboard stacking.

The current wording of the setting:

Destroy a window stack when it contains only one window

...does not reflect that it's specific to the mouse. If you don't want to get it working for the keyboard, then you could alternatively tweak the wording so it's more indicative of what it does, e.g.:

Destroy stacks after removing second-to-last window with mouse

(The wording could be nicer, but I tried to limit the length and also match the wording of existing settings in this panel.)

jacobgkau avatar Oct 13 '23 20:10 jacobgkau

Also, it might not be working because my commit might have only affected mouse stacking - I based my code off of the code that reverted this stacking behaviour, so I'm not sure how to also make it apply to keyboard stacking.

The current wording of the setting:

Destroy a window stack when it contains only one window

...does not reflect that it's specific to the mouse. If you don't want to get it working for the keyboard, then you could alternatively tweak the wording so it's more indicative of what it does, e.g.:

Destroy stacks after removing second-to-last window with mouse

(The wording could be nicer, but I tried to limit the length and also match the wording of existing settings in this panel.)

Well, I do want to accomodate for keyboard stacking, I just don't know how to.

But, if it's just fine with the mouse, it could be called "Destroy stacks when separated with mouse" or something like that.

MeowcaTheoRange avatar Oct 13 '23 21:10 MeowcaTheoRange