[英]Remove border from fullscreen floating windows only (XMonad configuration)
I would like to我想
Currently, I am using smartBorders from XMonad.Layout.NoBorders to remove the border from mplayer, and to remove the border of a window when that window is the only window in a workspace.目前,我正在使用 XMonad.Layout.NoBorders 中的 smartBorders 从 mplayer 中删除边框,并在该窗口是工作区中唯一的窗口时删除该窗口的边框。 However, when I switch between two workspaces which both have a single non-floating window (regardless of mode (tall\/mirror\/full)), then I see the window (in the workspace I am changing into) "jump" a bit, as its border is drawn, and then removed a brief moment thereafter (the effect is more visible if you set your borderWidth to a large number).但是,当我在两个都具有单个非浮动窗口(无论模式(高\/镜像\/全))的工作区之间切换时,我会看到窗口(在我要更改的工作区中)“跳跃”了一下,当它的边框被绘制时,然后在此后片刻被移除(如果你将你的borderWidth设置为一个很大的数字,效果会更明显)。
The relevant part of my ~\/.xmonad\/xmonad.hs is given below.下面给出了我的 ~\/.xmonad\/xmonad.hs 的相关部分。
import XMonad.Hooks.ManageDocks import XMonad.Layout.NoBorders myLayout = tiled ||| Mirror tiled ||| Full where tiled = Tall 1 (3\/100) (3\/5) main = xmonad $ defaultConfig { layoutHook = avoidStruts $ smartBorders $ myLayout , borderWidth = 4 , normalBorderColor = "#000000" -- black , focusedBorderColor = "#ff3f3f" -- reddish }<\/code><\/pre> Do you folks know how I achieve this effect?你们知道我是如何达到这个效果的吗? (is part 2. even possible?) Suggestions and pointers to extensions and\/or existing configurations that achieve a similar effect greatly appreciated. (第 2 部分甚至可能吗?)非常感谢对实现类似效果的扩展和\/或现有配置的建议和指针。
"
I solved pt. 我解决了pt。 1 using the Ambiguity constructor named OnlyFloat from XMonad.Layout.NoBorders. 1使用来自XMonad.Layout.NoBorders的名为OnlyFloat的Ambiguity构造函数。
import XMonad.Hooks.ManageDocks
import XMonad.Layout.NoBorders
myLayout = tiled ||| Mirror tiled ||| Full
where
tiled = Tall 1 (3/100) (3/5)
main = xmonad $ defaultConfig
{ layoutHook = lessBorders OnlyFloat $ avoidStruts $ myLayout
, borderWidth = 4
, normalBorderColor = "#000000" -- black
, focusedBorderColor = "#ff3f3f" -- reddish
}
I haven't addressed pt. 我没有解决过这个问题。 2. Furthermore, when I switch into a workspace, the border color of the focused window "flickers", since initially, the window is not focused (an thus its border is colored as per normalBorderColor), whereafter the window becomes focused (and thus its border gets the color focusedBorderColor). 2.此外,当我切换到工作区时,聚焦窗口的边框颜色“闪烁”,因为最初,窗口没有聚焦(因此其边框按照normalBorderColor着色),此后窗口变得聚焦(因此它的边框得到颜色focusedBorderColor)。
Regarding part 2: Version 0.17.0 of the xmonad-contrib package introduced the new XMonad.Layout.VoidBorders<\/a> layout modifier which removes borders just like XMonad.Layout.NoBorders does, but kind of permanently (the windows will retain their zero-width borders even when moved off of a VoidBorders-controlled workspace).关于第 2 部分:xmonad-contrib 包的 0.17.0 版引入了新的XMonad.Layout.VoidBorders<\/a>布局修改器,它像 XMonad.Layout.NoBorders 一样删除边框,但有点永久(窗口将保留其零宽度边框即使移出 VoidBorders 控制的工作区)。 This side-effect may or may not be a deal-breaker but it solves the "jumping" windows issue when switching workspaces.这种副作用可能会或可能不会破坏交易,但它解决了切换工作区时的“跳跃”窗口问题。
"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.