[XMonad] Attempt at fixing tabbed navigation doesn't seem to work

This commit is contained in:
Ivan Malison 2021-08-03 14:33:26 -06:00
parent dc87af41ae
commit 8d615d9d7e
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -344,7 +344,7 @@ deactivateFullAnd action = sequence_ [deactivateFull, action]
andDeactivateFull action = sequence_ [action, deactivateFull]
goFullscreen = sendMessage $ JumpToLayout "Tabbed Simplest"
goFullscreen = sendMessage $ JumpToLayout "Tabbed"
-- Layout setup
@ -366,7 +366,7 @@ layoutInfo =
rename "2 Columns" (Tall 1 (3 / 100) (1 / 2)) |||!
Accordion |||! simpleCross |||! myTabbed
where
myTabbed = tabbed shrinkText (theme robertTheme)
myTabbed = rename "Tabbed" $ tabbed shrinkText (theme robertTheme)
layoutList = snd layoutInfo
@ -431,9 +431,11 @@ myDecorateName ws w = do
classes <- getEWMHClasses w
classTitle <- getClass w
workspaceToName <- getWorkspaceNames'
let iconName = fromMaybe (map toLower $ head classes) $ lookupIconFromClasses classes
let iconName = fromMaybe (map toLower $ head classes) $
lookupIconFromClasses classes
entryString = printf "%-20s%-40s %+30s in %s \0icon\x1f%s"
classTitle (take 40 name) " " (fromMaybe "" $ workspaceToName (W.tag ws)) iconName
classTitle (take 40 name) " "
(fromMaybe "" $ workspaceToName (W.tag ws)) iconName
return entryString
menuIndexArgs :: MonadIO m => String -> [String] -> [(String, a)] ->
@ -824,12 +826,22 @@ buildDirectionalBindings mask commandFn =
, ((mask, directionalRight), commandFn R)
]
myWindowGo direction = do
layoutName <- description . W.layout <$> currentWorkspace
if layoutName == "Tabbed"
then
case direction of
U -> windows W.focusUp
R -> windows W.focusUp
L -> windows W.focusDown
D -> windows W.focusDown
else windowGo direction True
addKeys conf@XConfig { modMask = modm } =
-- Directional navigation
(buildDirectionalBindings
modm $ flip windowGo True) ++
(buildDirectionalBindings modm myWindowGo) ++
(buildDirectionalBindings
(modm .|. shiftMask) $ flip windowSwap True) ++
(buildDirectionalBindings