您尚未登录。

#1 2020-08-04 20:19:47

freezai
会员
注册时间: 2011-11-20
帖子: 70

[求推荐]你们的右键菜单里都有什么选项或内容?

我几年前刚装Openbox时,右键菜单是用obmenu-generator生成的,按照当时(好像现在仍然是这样)wiki上的示例配置的menu.xml,如下:

yang@Arch-Linux:~ 
 $ cat .config/openbox/menu.xml
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu>
    <menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator -i">
        </menu>
</openbox_menu>

开始时没有任何问题,后来可能是某次更新后(不是很确定因为更新,因为我天天都-Syu),右键菜单没有图标了,当时我也没管它。之后转到KDE上了(因为升级了硬件),就很久没用Openbox了。但是最近几天又想起它,进到Openbox后发现右键菜单不能用了,提示:

管道菜单 /usr/bin/obmenu-generator -i 输出无效

去google了一下也没找到什么解决方法。这时我忽然想到,其实之前我也几乎不用openbox的右键菜单,因为obmenu-generator生成的是一个启动菜单,但是我常用的软件都是用docky启动,不常用的也习惯去panel上的“开始菜单”里启动。所以当时右键菜单唯一作用就是当我在桌面上无意碰到了右键,它会弹出一个菜单,我觉得心理上舒适些。

现在我想能不能把右键菜单用起来,但是不是那种启动菜单,而是类似windows或者kde的那种右键菜单,可以有几个非常常用的程序,外加一些其他的功能选项(例如设置、新建等等)。只不过我目前就仅仅有这么个想法,可具体这个菜单里应该加入什么选项好,还没有什么思路。

所以求大家推荐推荐,也可说说你的右键菜单里都有什么?

谢谢!


Arch Linux的老小白
—“老”当总讲,就是一贯地卖年糕
—连驴打滚都没卖过
—没有

离线

#2 2020-12-13 12:45:00

twobooks
会员
注册时间: 2020-05-19
帖子: 17

Re: [求推荐]你们的右键菜单里都有什么选项或内容?

如果已经登录到DE里, 一般情况下右键菜单就不会有OpenBox的菜单。
在没有DE的情况下, 右键菜单才会使用OpenBox的菜单。
菜单里有什么还是你自己说了算, 安装了什么就可以有什么, 你自己加进去就行了。
参考如下: /etc/xdg/openbox/menu.xml

<?xml version="1.0" encoding="UTF-8"?>

<openbox_menu xmlns="http://openbox.org/3.4/menu">

<menu id="apps-accessories-menu" label="Accessories">
  <item label="Zint Qt">
    <action name="Execute">
      <command>zint-qt</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
</menu>

<menu id="apps-develop-menu" label="Developing">
  <item label="Eclipse PDT">
    <action name="Execute">
      <command>/var/opt/eclipse/eclipse</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  <item label="Qt Creator">
    <action name="Execute">
      <command>qtcreator</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  <item label="Prosper">
    <action name="Execute">
      <command>prosper</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  <item label="Inquire">
    <action name="Execute">
      <command>inquire</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  <item label="Tabular">
    <action name="Execute">
      <command>tabular</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
</menu>

<menu id="apps-internet-menu" label="Internet">
  <item label="Firefox">
    <action name="Execute">
      <command>firefox</command>
      <startupnotify>
        <enabled>yes</enabled>
        <wmclass>Firefox</wmclass>
      </startupnotify>
    </action>
  </item>
  <item label="Filezilla">
    <action name="Execute">
      <command>filezilla</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  <item label="ThunderBird">
    <action name="Execute">
      <command>thunderbird</command>
      <startupnotify>
        <enabled>yes</enabled>
        <wmclass>Firefox</wmclass>
      </startupnotify>
    </action>
  </item>
  <item label="X2Go Clent">
    <action name="Execute">
      <command>x2goclient</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
</menu>

<menu id="apps-office-menu" label="Office">
  <item label="LibreOffice Calc">
    <action name="Execute">
      <command>libreoffice -calc</command>
    </action>
  </item>
  <item label="LibreOffice Draw">
    <action name="Execute">
      <command>libreoffice -draw</command>
    </action>
  </item>
  <item label="LibreOffice Impress">
    <action name="Execute">
      <command>libreoffice -impress</command>
    </action>
  </item>
  <item label="LibreOffice Math">
    <action name="Execute">
      <command>libreoffice -math</command>
    </action>
  </item>
  <item label="LibreOffice Writer">
    <action name="Execute">
      <command>libreoffice -writer</command>
    </action>
  </item>
</menu>

<menu id="apps-multimedia-menu" label="Multimedia">
  <item label="Audacious Audio Player">
    <action name="Execute">
      <command>audacious</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  <item label="VLC Media Player">
    <action name="Execute">
      <command>vlc</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
</menu>

<menu id="apps-fileman-menu" label="File Manager">
  <item label="PCMan File Manager">
    <action name="Execute">
      <command>pcmanfm-qt</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
</menu>

<menu id="apps-graphics-menu" label="Graphics">
  <item label="Gimp">
    <action name="Execute">
      <command>gimp</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  <item label="Image Viewer">
    <action name="Execute">
      <command>feh</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  <item label="Inkscape">
    <action name="Execute">
      <command>inkscape</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  <item label="Photo Flare">
    <action name="Execute">
      <command>photoflare</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  <item label="Screen Shot">
    <action name="Execute">
      <command>lximage-qt --screenshot</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  <item label="Simple Scan">
    <action name="Execute">
      <command>simple-scan</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
</menu>

<menu id="system-configure-menu" label="Configuration">
  <item label="Openbox Configuration Manager">
    <action name="Execute">
      <command>obconf-qt</command>
      <startupnotify><enabled>yes</enabled></startupnotify>
    </action>
  </item>
  <item label="Qt5 Configuration Tool">
    <action name="Execute">
      <command>qt5ct</command>
      <startupnotify><enabled>yes</enabled></startupnotify>
    </action>
  </item>
</menu>

<menu id="system-management-menu" label="Management">
  <item label="GUI Partition Editor">
    <action name="Execute">
      <command>gparted</command>
      <startupnotify><enabled>yes</enabled></startupnotify>
    </action>
  </item>
  <item label="Qt Terminal">
    <action name="Execute">
      <command>qterminal</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  <item label="VirtualBox">
    <action name="Execute">
      <command>virtualbox</command>
      <startupnotify><enabled>yes</enabled></startupnotify>
    </action>
  </item>
</menu>

<menu id="system-leave-menu" label="Leave Here">
  <item label="Log Out">
    <action name="Exit">
      <prompt>no</prompt>
    </action>
  </item>
  <separator />
  <item label="Restart">
    <action name="Execute">
      <command>restart.sh</command>
      <startupnotify><enabled>yes</enabled></startupnotify>
    </action>
  </item>
  <separator />
  <item label="Power Off">
    <action name="Execute">
      <command>power_off.sh</command>
      <startupnotify><enabled>yes</enabled></startupnotify>
    </action>
  </item>
</menu>

<menu id="root-menu" label="Openbox">
  <separator label="Applications" />
  <menu id="apps-accessories-menu" />
  <menu id="apps-develop-menu" />
  <menu id="apps-fileman-menu" />
  <menu id="apps-graphics-menu" />
  <menu id="apps-internet-menu" />
  <menu id="apps-multimedia-menu" />
  <menu id="apps-office-menu" />
  <separator label="System" />
  <menu id="system-configure-menu" />
  <menu id="system-management-menu" />
  <menu id="system-leave-menu" />
</menu>

</openbox_menu>

离线

页脚