You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote a simple instance of LayoutClass which will allow you to specify two different layouts, one for portrait and one for landscape. I wanted to scope out whether this would be accepted as a PR before I took the effort of integrating it with xmonad-contrib directly rather than just in my config.
Configuration File
Please include the smallest configuration file that reproduces the
problem you are experiencing:
dataEitherRatiopla=EitherRatio (pa) (la)
deriving (Show, Read)
instance (LayoutClasspa, LayoutClassla) =>LayoutClass (EitherRatiopl) awhere
runLayout (W.Workspace i (EitherRatio p l) ms) r@(Rectangle rx ry rw rh)
| rw < rh =do
(lrs, newP) <- runLayout (W.Workspace i p ms) r
return$ (lrs, fmap (`EitherRatio` l) newP)
| rw >= rh =do
(lrs, newL) <- runLayout (W.Workspace i l ms) r
return$ (lrs, fmap (EitherRatio p) newL)
handleMessage (EitherRatio p l) msg =do
mp <- handleMessage p msg
ml <- handleMessage l msg
return$case (mp, ml) of
(Just np, Just nl) ->Just$EitherRatio np nl
(Just np, Nothing) ->Just$EitherRatio np l
(Nothing, Just nl) ->Just$EitherRatio p nl
_ ->Nothing
description (EitherRatio p l) ="[ "++ description p ++" | "++ description l ++" ]"
There's already a layout modifier that does this by comparing to a fixed horizontal size, which is less than ideal, so I don't see a reason it would be rejected.
Might be a good idea to have them both in one module, but the XMonad.Layout.PerScreen name seems non-intuitive to me (I wouldn't look there if I was trying to find it), so maybe it's not as good an idea after all. :-)
Looks great to me! And generally speaking, the bar for including new modules in xmonad-contrib is not that high---as long as it won't make xmonad crash and would be useful to someone, there's no good reason to exclude it. So your contribution would be most welcome.
I'm not going to be pursuing this PR anymore. There were some issues associated with stale window decorations, and I've since stopped using it. If anyone wants to pick this up, I still think it would be useful to the project, but I won't personally be using it.
Problem Description
I wrote a simple instance of
LayoutClass
which will allow you to specify two different layouts, one for portrait and one for landscape. I wanted to scope out whether this would be accepted as a PR before I took the effort of integrating it with xmonad-contrib directly rather than just in my config.Configuration File
Please include the smallest configuration file that reproduces the
problem you are experiencing:
Checklist
I've read CONTRIBUTING.md
I tested my configuration with xmonad-testing
The text was updated successfully, but these errors were encountered: