Question: How to create margin between opened windows?
mordax7 opened this issue ยท 5 comments
Hello!
In general gaps are provided by sway, so look inside ~/.config/sway/config
and there is a "Gaps" section on top.
Two additional pointers:
-
The
smart_gaps
feature allows to only have gaps when necessary, when there are more than one window on the screen, otherwise it removes the gaps to have a more "integrated" experience - I like it, but you may want to try with that setting set to "no". -
On your screenshot you seem to have white lines between kitty, I think it's because you use kitty's windows (opened with
Ctrl+Shift+Enter
) - I dont use them, I always use "real" kitty OS windows (i.e. I open new kitty instances every time, usinghyper+Enter
, orCtrl+Shift+n
inside kitty to "clone" kitty and have a new terminal in the same directory). Because I use kitty OS windows, it's again sway that controls gaps, but if you use kitty windows, you might need to configure this inside kitty somehow.
Ah yes, my bad, I thought you used only one window there.
But if I open a new window of kitty with Ctrl + Shift + n
, for example, it opens as a separate window and not beside it:
After opening a new window, to get the spaced layout, I have to use ctrl + h/j/k/l
to move it next to it. Is there a way to open a new window in this layout by default?
Also, is there a way to move a spaced window back to the tabbed view?
I could answer myself the question regarding moving a window back to the tabbed view, just have to use ctrl + k
to put it back up. But I am closing this one since my initial question got answered.
Thank you! :)
Apologies, I was sure I answered, but I guess I forgot to click "Send" ๐
You can play with workspace_layout
option in sway config, I have it set to tabbed
(what you see on screenshot) simply because I found it the most useful for me. With different values you can get this default placement changed.
There are also see shortcuts for container layout manipulation below, they are also useful to control the exact behavior of new window placement:
Lines 177 to 190 in a5f91e1
The best resource I know of how to learn to use all these shortcuts is i3wm docs ๐ I suggest you to dedicate some time and try to follow it to experiment with available options.
https://i3wm.org/docs/userguide.html
Finally there are also some interesting scripts out there, for example check out this script, it builds on top of available layout to provide an automatically alternating layout: https://github.com/nwg-piotr/autotiling. I believe though it might conflict with some of the hotkeys above, but try to experiment!