xmonad/xmonad-contrib

sublayout tab bar doesn't vanish when switching workspaces

Robotix-00 opened this issue · 4 comments

Hello there, I recently added the subLayout modifier to my layout hook. I wanted to change the color of the tab bar to fit my theme so I switched from the subTabbed modifier to the generic subLayout one.
Uppon doing that, I noticed that when using the tabbed sublayout and switching to another workspace, the tab bar of the sublayout continued to be in the same position as previously. This only happens when using the sublayout version, but not the full-workspace one.
Is there any obvious reason that could cause this?

This is my layout hook:

myLayout = avoidStruts $ windowNavigation $ subLayout [0] (tabbedLayout) $ (BW.boringWindows) $
  -- with spacing
     spacingWithEdge 5
     (
       tall ||| grid ||| spiralLayout ||| tabbedLayout
     )
     -- without spacing
     ||| full
   where
     grid = Grid
     tabbedLayout = tabbed shrinkText myTabConfig
     full = (noBorders Full)
     tall = Tall 1 (3/100) (1/2)
     spiralLayout = spiral (6/7)

Xmonad-version: 0.17.1

subTabbed exists because of this issue, not merely as a convenience; you would need to duplicate its logic to replace it properly. The messages that tell tabbed to show/hide the tab bar don't get routed properly otherwise.

Ah, good to know.
Is there a way how I can apply "myTabConfig" to the subTabbed modifier?

I don't know subLayouts well enough to say if anything special would be needed aside from copying and modifying the definition of subTabbed (https://hackage.haskell.org/package/xmonad-contrib-0.17.1/docs/src/XMonad.Layout.SubLayouts.html#subTabbed). What I do know is that the behavior you are seeing is documented at the end of the haddock for SubLayout (https://hackage.haskell.org/package/xmonad-contrib-0.17.1/docs/XMonad-Layout-SubLayouts.html#g:3, last item: "fail horribly").

So I've been trying to get the styling to work.
Using

addTabs shrinkText myTabConfig $ subLayout [] (Simplest)

in the layout hook works for me.
The trick is to not use a tabbed layout at all but to addTabs to another layout like simplest. Doing that you can pass your tabConfig to the addTabs modifier.