Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to swap up and down in a sublayout group and between sublayout groups? #179

Open
crocket opened this issue May 5, 2017 · 2 comments

Comments

@crocket
Copy link

crocket commented May 5, 2017

In a sublayout group

I currently have

import qualified XMonad.StackSet as W
import qualified XMonad.Layout.SubLayouts as SL

    , ("M-S-j", SL.onGroup swapDown')
    , ("M-S-k", SL.onGroup swapUp')
    ]
    where swapUp' (W.Stack t (l:ls) rs) = W.Stack t ls (l:rs)
          swapUp' (W.Stack t [] rs) = W.Stack t (reverse rs) []
          swapDown' = reverseStack . swapUp' . reverseStack
          reverseStack (W.Stack t ls rs) = W.Stack t rs ls

I copied swapUp' and swapDown' from https://github.com/xmonad/xmonad/blob/1b17d1c3781f882e8346acd4a3291a5cd632f4be/src/XMonad/StackSet.hs#L348-L364

SL.onGroup swapDown' and SL.onGroup swapUp' don't seem to swap tabs in a sublayout group.

SL.onGroup W.focusUp' and SL.onGroup W.focusDown' work perfectly.

I have the same issue as https://www.reddit.com/r/xmonad/comments/60g643/swap_windows_in_sublayout/

swapUp and swapDown don't just swap inside a sublayout group.

Any idea?

Between sublayout groups

swapDown fails to swap the currently focused master window with a tabbed subgroup that has two windows with its second window in focus.

Although XMonad.Actions.Navigation2D.windowSwap swaps sublayout groups and even cycles, it doesn't work when I want to swap the master window with the second window in a Tall layout with 3 windows.

Thus, I end up having to remember when to use swapDown and windowSwap. This complexity prevents me from moving windows instinctively and requires some thoughts.

I want swap functions aware of sublayout groups.

@crocket crocket changed the title How do I swap up and down in a sublayout? How do I swap up and down in a sublayout and between sublayouts? May 6, 2017
@crocket crocket changed the title How do I swap up and down in a sublayout and between sublayouts? How do I swap up and down in a sublayout group and between sublayout groups? May 6, 2017
@crocket crocket changed the title How do I swap up and down in a sublayout group and between sublayout groups? Is it possible to swap up and down in a sublayout group and between sublayout groups? May 7, 2017
@dongcarl
Copy link

dongcarl commented Jun 3, 2018

Bump

1 similar comment
@Mo0dy
Copy link

Mo0dy commented Jun 30, 2020

Bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants