Skip to content

Commit

Permalink
fixup! X.L.OnHost: Query gethostname if $HOST lookup fails
Browse files Browse the repository at this point in the history
  • Loading branch information
slotThe authored and geekosaur committed Sep 4, 2024
1 parent a96a203 commit 2973c28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions XMonad/Layout/OnHost.hs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ instance (LayoutClass l1 a, LayoutClass l2 a, Show a) => LayoutClass (OnHost l1
else do (wrs, mlt') <- runLayout (W.Workspace i lf ms) r
return (wrs, Just $ mkNewOnHostF p mlt')

handleMessage (OnHost hosts bool lt lf) m
| bool = handleMessage lt m >>= maybe (return Nothing) (\nt -> return . Just $ OnHost hosts bool nt lf)
| otherwise = handleMessage lf m >>= maybe (return Nothing) (return . Just . OnHost hosts bool lt)
handleMessage (OnHost hosts choice lt lf) m
| choice = handleMessage lt m >>= maybe (return Nothing) (\nt -> return . Just $ OnHost hosts choice nt lf)
| otherwise = handleMessage lf m >>= maybe (return Nothing) (return . Just . OnHost hosts choice lt)

description (OnHost _ True l1 _) = description l1
description (OnHost _ _ _ l2) = description l2
Expand Down

0 comments on commit 2973c28

Please sign in to comment.