XMonad根据显示的显示器来设置布局 [英] XMonad set layout depending on which monitor it's displayed

查看:120
本文介绍了XMonad根据显示的显示器来设置布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用reflectHoriz(来自XMonad.Layout.PerWorkspace ),这样主窗格总是最接近2个屏幕的中心。



我尝试了XMonad.Layout.IndependentScreens,但是只创建了双监视器依赖的工作空间,这不是我想要的。理想情况下,我希望相同的工作空间根据显示的显示器设置不同的布局。

我认为它应该可以做一个 Layout 包装器(比如 镜像 选择)想。 runLayout 方法rel =nofollow> LayoutClass 收到 WorkspaceId ,您可以从地图中查找屏幕 s至工作区 s。


Is it possible to somehow make the workspace layout change depending on which physical screen I am displaying it?

I want to use reflectHoriz (from XMonad.Layout.PerWorkspace) on layouts on my left monitor so that the master pane is always closest to the center of 2 screens.

I tried XMonad.Layout.IndependentScreens but that just creates double monitor dependant workspaces and that's not what I'm aiming at. Ideally, I want the same workspace to have different layout set depending on the monitor on which it is displayed.

解决方案

I think it should be possible to make a Layout wrapper (like Mirror or Choose) which does what you want. The runLayout method of LayoutClass receives the WorkspaceId, which you can look up in the map from Screens to Workspaces.

这篇关于XMonad根据显示的显示器来设置布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆