仅从全屏浮动窗口删除边框(XMonad配置) [英] Remove border from fullscreen floating windows only (XMonad configuration)

查看:127
本文介绍了仅从全屏浮动窗口删除边框(XMonad配置)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想

  1. (仅)从覆盖全屏的浮动窗口中删除边框(例如mplayer),并且
  2. 当工作空间中只有一个窗口时,请使用不同的边框颜色(normalBorderColor).

当前,我正在使用XMonad.Layout.NoBorders中的smartBorders从mplayer中删除边框,并在该窗口是工作区中唯一的窗口时删除该窗口的边框.但是,当我在两个都具有单个非浮动窗口(无论模式(高/镜像/满))的两个工作区之间切换时,我看到的窗口(在我要更改为的工作区中)有点跳跃",绘制边框时,然后将其移除一会儿(如果将borderWidth设置为较大的数字,效果会更加明显).

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. 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).

〜/.xmonad/xmonad.hs的相关部分如下.

The relevant part of my ~/.xmonad/xmonad.hs is given below.

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
                 }

您知道我如何实现这种效果吗? (第2部分是否可能?)对实现类似效果的扩展和/或现有配置的建议和指针,将不胜感激.

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.

推荐答案

我解决了pt. 1使用来自XMonad.Layout.NoBorders的名为OnlyFloat的歧义构造函数.

I solved pt. 1 using the Ambiguity constructor named OnlyFloat from XMonad.Layout.NoBorders.

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
                 }

我还没有解决. 2.此外,当我切换到工作区时,聚焦窗口的边框颜色闪烁",因为最初该窗口未聚焦(因此其边界按照normalBorderColor着色),此后该窗口变为聚焦(因此其边框的颜色为focusedBorderColor).

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).

这篇关于仅从全屏浮动窗口删除边框(XMonad配置)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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