generate terminals menu (#622426)

epel9
Miroslav Lichvar 15 years ago
parent f5d06a2400
commit 1f99e84e70

@ -2,44 +2,10 @@
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="applications-menu" label="Applications" execute="_XDGMENU_ applications"/>
<menu id="preferences-menu" label="Preferences" execute="_XDGMENU_ preferences"/>
<menu id="administration-menu" label="Administration" execute="_XDGMENU_ system-settings"/>
<menu id="apps-term-menu" label="Terminals">
<item label="Rxvt Unicode">
<action name="Execute">
<command>urxvt</command>
</action>
</item>
<item label="Gnome Terminal">
<action name="Execute">
<command>gnome-terminal</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Xfce Terminal">
<action name="Execute">
<command>xfce4-terminal</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Konsole">
<action name="Execute">
<command>konsole</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Xterm">
<action name="Execute"><command>xterm</command></action>
</item>
</menu>
<menu id="applications-menu" label="Applications" execute="_DATADIR_/xdg-menu applications"/>
<menu id="preferences-menu" label="Preferences" execute="_DATADIR_/xdg-menu preferences"/>
<menu id="administration-menu" label="Administration" execute="_DATADIR_/xdg-menu system-settings"/>
<menu id="terminals-menu" label="Terminals" execute="_DATADIR_/xdg-menu _DATADIR_/terminals"/>
<menu id="root-menu" label="Openbox 3">
<separator label="Openbox"/>
@ -47,7 +13,7 @@
<menu id="preferences-menu"/>
<menu id="administration-menu"/>
<separator/>
<menu id="apps-term-menu"/>
<menu id="terminals-menu"/>
<separator/>
<item label="Reconfigure">
<action name="Reconfigure" />

@ -11,6 +11,7 @@ Source1: http://icculus.org/openbox/tools/setlayout.c
Source2: xdg-menu
Source3: menu.xml
Source4: openbox.desktop
Source5: terminals.menu
Patch0: openbox-3.4.9-autostartdir.patch
Patch1: openbox-3.4.11-Xau.patch
@ -92,13 +93,15 @@ make install DESTDIR=%{buildroot}
install setlayout %{buildroot}%{_bindir}
install -p %{SOURCE2} %{buildroot}%{_datadir}/%{name}/xdg-menu
sed 's|_XDGMENU_|%{_datadir}/%{name}/xdg-menu|g' < %{SOURCE3} \
sed 's|_DATADIR_|%{_datadir}/%{name}|g' < %{SOURCE3} \
> %{buildroot}%{_sysconfdir}/xdg/%{name}/menu.xml
desktop-file-install --vendor="" \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE4}
install -m644 -p %{SOURCE5} %{buildroot}%{_datadir}/%{name}/terminals.menu
%find_lang %{name}
rm -f %{buildroot}%{_libdir}/*.la
rm -rf %{buildroot}%{_datadir}/doc/%{name}

@ -0,0 +1,16 @@
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
<Menu>
<Name>Terminals</Name>
<!-- Read standard .desktop file locations -->
<DefaultAppDirs/>
<!-- Read in overrides and child menus from applications.d -->
<DefaultMergeDirs/>
<Include>
<Category>TerminalEmulator</Category>
</Include>
</Menu>
Loading…
Cancel
Save