让 Awesome 保持某些窗口处于浮动模式

让 Awesome 保持某些窗口处于浮动模式

我尝试过使用 Awesome Window Manager,虽然我喜欢它,但由于一个程序的问题,我目前无法迁移到它:键盘. 它通过调用在桌面上创建未修饰的记事本小部件gtk_window_set_decorated ()。看来,由于 Awesome 不装饰窗口,因此它不响应此功能。相反,它将使用此功能的客户端视为普通窗口,在启动时将它们拉伸到整个屏幕上,并破坏了我的像素精确配置。

如何确保我可以在 Awesome 会话中使用 Xpad,而不会改变垫子的位置或尺寸,并且当我切换回旧的窗口管理器时配置将与我离开时一样?

答案1

答案2

rc.lua,您可以找到该awful.rules.rule表。只需将应用程序添加到该-- Floating clients.部分即可。

为了使其MPlayer始终浮动,请添加"MPlayer",class表中,如下所示:

awful.rules.rules = {
    -- All clients will match this rule.
    { rule = { },
      properties = { border_width = 0, --beautiful.border_width,
                     border_color = beautiful.border_normal,
                     focus = awful.client.focus.filter,
                     raise = true,
                     keys = clientkeys,
                     buttons = clientbuttons,
                     screen = awful.screen.preferred,
                     placement = awful.placement.no_overlap+awful.placement.no_offscreen
     }
    },

    -- Floating clients.
    { rule_any = {
        instance = {
          "DTA",  -- Firefox addon DownThemAll.
          "copyq",  -- Includes session name in class.
        },
        class = {
          "Arandr",
          "Gpick",
          "Kruler",
          "MessageWin",  -- kalarm.
          "MPlayer",
          "Sxiv",
          "Wpa_gui",
          "pinentry",
          "veromix",
          "xtightvncviewer"},

        name = {
          "Event Tester",  -- xev.
        },
        role = {
          "AlarmWindow",  -- Thunderbird's calendar.
          "pop-up",       -- e.g. Google Chrome's (detached) Developer Tools.
        }
      }, properties = { floating = true }},

然后重新启动。

从 4.0 开始确实如此

相关内容