fancywm icon indicating copy to clipboard operation
fancywm copied to clipboard

Find a solution for new windows messing up my layout

Open bertenvdb opened this issue 3 years ago • 8 comments

Somewhat related to #4

When opening windows they mess up my current layout. E.g. when starting a debugging session, a terminal window is opened which then inserts itself in the root (horizontal) layout, and that messes up my current layout. Nothing but good words about FancyWM, but for my workflow that's really annoying. I try to have a stacked panel focussed when I open a new window, but that's doesn't always seem to work.

I actually don't know what solution I'd like/need 🤷‍♂️. Years ago when I still was on Linux, I used i3wm I think. I don't know how it was handled there. What I've thought about:

  • A lock button next to the 'Move to upper' button on horizontal and vertical panels. On a horizontal window this would lock the horizontal size, on a vertical panel the vertical size.
  • Adding all windows to the exception list to make them all open as a floating window. After opening I could then drag the window to a desired location. This would be a bit cumbersome, but acceptable.

Alternative crappy solutions I thought about, just for reference/inspiration:

  • A lock button next to the 'Move to upper' button, which would prevent adding an additional window to that panel.
  • A 'master' stack panel which by default captures all newly opened windows.

I realize I'm asking for something I haven't really figured out myself. Thinking about this for a while now and thought I'd just post it and maybe someone comes up with an ingenious solution 🙏

bertenvdb avatar Feb 18 '22 13:02 bertenvdb

I thought of something similar while reading a recent ticket, but the ability to create a default/savable layout of your configuration and/or lock specific desktops from adding anymore tiles might solve those issues.

incorrigible7 avatar Jul 25 '22 23:07 incorrigible7

I think that there are two issues here:

  1. Opening a window in the root messes up neighbors' layouts.
  2. Opening a window while focusing another one doesn't bring the new window in the appropriate position. If focus is on a stacked window, then the new window should stack. If focus is on a window inside a vertical split, then the new window should spawn in the vertical split. But it doesn't always do.

It seems to me that the second issue causes the first one. If the second case didn't exist, I think that the first one wouldn't either.

Personally, I have a vertical split window left to a pile of stacked windows. I keep that layout for working in a certain desktop.

image

But when I spawn a new window, the new window goes in the horizontal split at the root and then moves the other two tiles while it should have gone in the focused tile which was the stack on the right. That is quite annoying.

image

What I did realize is that FancyWM is in a weird state afterwards. I seem to have the focus on the new window, but if I try to move it in the stack on the left, then it doesn't work and it says:

Could not move left. No focused window.

image

I strictly use the keyboard to do this. You can see that the Terminal window is focused on the right since the cursor is highlighted and I can write into the terminal. Plus, I have to do Alt+TAB twice in order to fix the focus and then I can move the window...

I know that OP was mentioning mouse stuff, but I think that the keyboard approach revealed an additional hint to the issue.

sim590 avatar Aug 12 '22 05:08 sim590

@sim590 Thanks for this, will investigate the issue further.

But when I spawn a new window

Can you clarify how you spawn a new window with the keyboard?

veselink1 avatar Aug 12 '22 05:08 veselink1

I use Alt+Shift+n where n is the rank of the application on the windows task bar.

sim590 avatar Aug 12 '22 08:08 sim590

I use Alt+Shift+n where n is the rank of the application on the windows task bar.

Is that a custom command via AHK or something similar? I thought the default windows hotkey for launching from pinned taskbar items was Win+n, n being the number in rank order. Though I rebound Win+n in AHK myself to use them with FanyWM lol.

incorrigible7 avatar Aug 12 '22 13:08 incorrigible7

Oh. Sorry. I meant Win+Shift+n. It was late. I use shift to force the opening of a new instance of the application and not just to bring in focus an already open instance which would Win+n eventually do.

sim590 avatar Aug 12 '22 14:08 sim590

I also have this issue. I think a quick default setting that could be added that wouldn't take too much coding would be to by default place new windows in an existing panel. Generally I have my "secondary" priority windows sharing a panel space, be it stacked, or vertical split. This would solve the issue of windows on the root being re-sized. This should of course be toggleable, as I'm sure there are people that like the current functionality. I will be as bold to say I think the default setting should be spawning new windows in existing panels. For more fully featured, you could have a clickable button that sets a specific panel to be the default location for new windows so spawn.

ariccb avatar Dec 01 '22 19:12 ariccb

I'm running info this problem all the time. FancyWM would've been perfect if it's not this issue. Please consider providing an option to support a more controlled new windows position.

liny01-nbsa avatar Jul 30 '23 16:07 liny01-nbsa

This issue is stale because it has been open for 14 days with no activity.

github-actions[bot] avatar Apr 20 '24 02:04 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar May 04 '24 02:05 github-actions[bot]