Lubuntu 19.10:如何平铺窗户? lxqt-rc.xml中缺少窗口平铺部分

Lubuntu 19.10使用Openbox作为其窗口管理器。

对于Lubuntu 18.04和19.04,允许用户编辑各种Openbox设置的文件lubuntu-rc.xml和lxqt-rc.xml分别具有标题为“窗口平铺的键绑定”的部分,其中包含用于

  • HalfLeftScreen
  • 半屏
  • HalfUpperScreen和
  • 下半屏

Lubuntu 19.10的〜/ .config / openbox / lxqt-rc.xml中缺少该部分。

I followed the instructions in the release notes to delete

  • 〜/ .config / lxqt / globalkeyshortcuts.conf
  • 〜/ .config / lxqt / lxqt-runner.conf和
  • 〜/ .config / openbox / lxqt-rc.xml

并注销并重新登录。但是,lxqt-rc.xml仍然没有窗口切片部分。

我了解到,Super(也称为元密钥)与LXQt有某种冲突是存在一些冲突的。 (所有窗口平铺键盘快捷键最初都使用超级键。)

Lubuntu 19.10的用户可以做什么以取回“窗口拼贴”键盘快捷键?

最佳答案

In How to snap windows?, a member of the Lubuntu team suggests including some code in lxqt-rc.xml to bring back window tiling and also addresses the conflict I mentioned in the question:

...在19.04以上版本中,您将使用以下命令与lxqt-globalkeys发生冲突   打开菜单的键,因此请禁用,重新配置或   在此使用Windows键以外的其他方式。

如果要使用与Lubuntu 19.04中使用的相同的平铺快捷方式,则此处的格式有所更改。我包括了Control键,Super键和相关的箭头键,而不仅仅是Super键和相关的箭头键:

    <!--
        Lubuntu specific.
        Keybindings for window tiling
    -->
    <!--
        # HalfLeftScreen
    -->
  <keybind key="C-W-Left">
    <action name="UnmaximizeFull"/>
    <action name="MoveResizeTo">
      <x>0</x>
      <y>0</y>
      <height>100%</height>
      <width>50%</width>
    </action>
  </keybind>
    <!--
        # HalfRightScreen
    -->
  <keybind key="C-W-Right">
    <action name="UnmaximizeFull"/>
    <action name="MoveResizeTo">
      <x>-0</x>
      <y>0</y>
      <height>100%</height>
      <width>50%</width>
    </action>
  </keybind>
    <!--
        # HalfUpperScreen
    -->
  <keybind key="C-W-Up">
    <action name="UnmaximizeFull"/>
    <action name="MoveResizeTo">
      <x>0</x>
      <y>0</y>
      <width>100%</width>
      <height>50%</height>
    </action>
  </keybind>
    <!--
        # HalfLowerScreen
    -->
  <keybind key="C-W-Down">
    <action name="UnmaximizeFull"/>
    <action name="MoveResizeTo">
      <x>0</x>
      <y>-0</y>
      <width>100%</width>
      <height>50%</height>
    </action>
  </keybind>

After the edits, open a terminal and run openbox --reconfigure for the keybinding to take effect. Alternatively, log out and log back in.

我没有包括用于最大化或最小化窗口的键盘快捷键,因为可以通过按Alt +空格键轻松访问这些操作以及许多其他操作。请注意,Openbox更喜欢使用iconify而不是最小化。