xmonad:在浮动和平铺之间切换窗口 [英] xmonad: toggle a window between floating and tiled
问题描述
有时我会启动一个平铺的窗口.可能作为便签本(使用 NamedScratchpad )或在此问题中.
Sometimes I launch a window tiled. Maybe as a scratchpad (using NamedScratchpad) or as in this question.
现在,我希望能够缩放(全屏或平铺)此浮动窗口,然后切换回之前的平铺大小&位置.
Now I want to be able to zoom (either fullscreen or tile) this floating window, and then toggle back to the previous tiled size & position.
完成此任务的好方法是什么?
What is a good way to accomplish that?
此外,如果我按了便笺簿的热键,我希望它根据我的配置文件中的规范打开---而不是根据当前状态(例如平铺)打开.
Also, if I hit the hotkey for a scratchpad, I want it to open according to the specification in my config file --- not according to the current state (e.g. tiled).
推荐答案
If i understand your (zooming) question correctly, XMonad.Layout.Maximize
provides what you're looking for.
Please note that maximize
affects the naming of your Layout - if you use XMonad.Layout.Named
you may want to define the name before maximize
like
myLayout = named "myName"
$ maximize
$ someLayout
具有类似键绑定的
((modm, xK_backslash), withFocused (sendMessage . maximizeRestore))
在链接的文档中进行了描述.
described in the linked documentation.
当前,此模块未完全最大化,但留有一些边界.如果您遇到问题,则可以修改该模块并将其版本放置在
Currently this module maximizes not completely, but leaves a bit of border. If it bugs you, you can modify the module and place your version at ~/.xmonad/lib/modifiedMaximize
from where you can import it with
import modifiedMaximize
在您的xmonad.hs
中.
这篇关于xmonad:在浮动和平铺之间切换窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!