如何在 Awesome WM 中设置 jEdit 窗口的默认标签?

如何在 Awesome WM 中设置 jEdit 窗口的默认标签?

以下规则按预期工作:

{ rule = { class = "Firefox" },
  properties = { tag = tags[2][2] } },

也就是说,Firefox 实例在第二个屏幕的第二个标签上启动。但是,我无法在下一行使用此规则对 jEdit 执行相同操作:

{ rule = { class = "jedit" },
  properties = { tag = tags[2][3] } },

jEdit 实例始终弹出在第一个屏幕的第一个标签上。这窗口类看起来正确:

$ xprop | grep "^WM_CLASS\|^WM_NAME" 
WM_CLASS(STRING) = "sun-awt-X11-XFramePeer", "jedit"
WM_NAME(STRING) = "jEdit - Untitled-1"

除了大小写外,它与 Firefox 的结果非常相似:

$ xprop | grep "^WM_CLASS\|^WM_NAME" 
WM_CLASS(STRING) = "Navigator", "Firefox"
WM_NAME(STRING) = "How to place jEdit window in Awesome WM? - Unix & Linux Stack Exchange - Mozilla Firefox"

嘲笑 WM 名称也不起作用 - 运行以下命令后,窗口仍然出现在错误的位置:

sudo pacman --sync wmname
wmname LG3D
jedit &

Java版本:

$ java -version
java version "1.7.0_45"
OpenJDK Runtime Environment (IcedTea 2.4.3) (ArchLinux build 7.u45_2.4.3-1-x86_64)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

这里发生了什么事?

答案1

适用于 Ubuntu,具有 100% 打包组件:

-- Set jedit to always map on tags number 2 of screen 1.
{ rule = { class = "org-gjt-sp-jedit-jEdit" },
  properties = { tag = tags[1][2] } },

这也适用于我:

-- with instance
{ rule = { class = "org-gjt-sp-jedit-jEdit", instance = "sun-awt-X11-XFramePeer",  },
  properties = { tag = tags[1][2] } },

这是很棒的 3.4.11 和 jedit 4.4.2+dfsg-1 with java:

$ java -version
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1ubuntu0.12.04.2)
OpenJDK Server VM (build 20.0-b12, mixed mode)

xprop 输出:

WM_CLASS(STRING) = "sun-awt-X11-XFramePeer", "org-gjt-sp-jedit-jEdit"
WM_NAME(STRING) = "jEdit - Untitled-1"

相关内容