diff --git a/srcpkgs/obmenu-generator/files/README.void b/srcpkgs/obmenu-generator/files/README.void new file mode 100644 index 00000000000..b0424bb659a --- /dev/null +++ b/srcpkgs/obmenu-generator/files/README.void @@ -0,0 +1,76 @@ +README.void + + To properly use obmenu-generator in void linux you have to tweak + two files: + + A config file, auto generated by obmenu-generator: + + ~/.config/obmenu-generator/config.pl + + + The Schema file that you have to copy from: + + /etc/xdg/obmenu-generator/schema.pl + + in: + + ~/.config/obmenu-generator/schema.pl + + + Both files are well documentend into the code. + + Read also the comments in the code of + + /usr/bin/obmenu-generator + + (it's a perl script) for more advanced use. + + Modify ~/.config/obmenu-generator/schema.pl according to your + needs to adapt the categories names to your language after theese lines + + {sep => "desidered name of the submenu"}, (see below for the default). + + + {sep => 'Applications'}, + + # NAME LABEL ICON + {cat => ['utility', 'Accessories', 'applications-utilities']}, + {cat => ['development', 'Development', 'applications-development']}, + + + The LABEL column is the place where you localize the names. + + If you want to use a schema to provide only an application submenu, in + the doc dir you will find tje file "schema.pl.app" already tailored for + this use. + + The config.pl is created by obmenu-generator but you may want to customize + the language of the auto generated names, for that you have to modify a line + near the end, modifying the "name_keys" key to read as follow (substituing + the [it] to your preferred language code). + + "name_keys" => ['Name[it]', 'GenericName[it]', 'Name'], + + Accordig to the criptic comment in the script the modifications you have done + do in the config.pl may be overridden by the program itself, so be prepared + to rewrite every line you modify in the config.pl file from time to time + (it is better to copy the config.pl in the ~/.config/obmenu-generator dir + config.pl.mine as a backup copy when you have done the personalisations). + + After you have done all your modification, insert this line in your Openbox + menu.xml where you want the menu will be: + + + + Then do openbox -reconfigure (or use the menu entry that usually come with + openbox) and enjoy your new application menu. + + The script is very powerful and has many other use even to autogenerate a + menu.xml, read the documentation and better the comments that are more up to + date at: + + http://trizenx.blogspot.ro/2012/02/obmenu-generator.html + + Happy obmenu-generator! + + The Void Mantainers diff --git a/srcpkgs/obmenu-generator/files/schema.pl.app b/srcpkgs/obmenu-generator/files/schema.pl.app new file mode 100644 index 00000000000..f72e5f88067 --- /dev/null +++ b/srcpkgs/obmenu-generator/files/schema.pl.app @@ -0,0 +1,51 @@ +#!/usr/bin/perl + +# obmenu-generator - schema file + +=for comment + + item: add an item inside the menu {item => ["command", "label", "icon"]}, + cat: add a category inside the menu {cat => ["name", "label", "icon"]}, + sep: horizontal line separator {sep => undef}, {sep => "label"}, + pipe: a pipe menu entry {pipe => ["command", "label", "icon"]}, + raw: any valid Openbox XML string {raw => q(xml string)}, + begin_cat: begin of a category {begin_cat => ["name", "icon"]}, + end_cat: end of a category {end_cat => undef}, + obgenmenu: generic menu settings {obgenmenu => ["label", "icon"]}, + exit: default "Exit" action {exit => ["label", "icon"]}, + +=cut + +# NOTE: +# * Keys and values are case sensitive. Keep all keys lowercase. +# * ICON can be a either a direct path to an icon or a valid icon name +# * Category names are case insensitive. (X-XFCE and x_xfce are equivalent) + +require "$ENV{HOME}/.config/obmenu-generator/config.pl"; + +## Text editor +my $editor = $CONFIG->{editor}; + +our $SCHEMA = [ + {sep => 'Applications'}, + + # NAME LABEL ICON + {cat => ['utility', 'Accessories', 'applications-utilities']}, + {cat => ['development', 'Development', 'applications-development']}, + {cat => ['education', 'Education', 'applications-science']}, + {cat => ['game', 'Games', 'applications-games']}, + {cat => ['graphics', 'Graphics', 'applications-graphics']}, + {cat => ['audiovideo', 'Multimedia', 'applications-multimedia']}, + {cat => ['network', 'Network', 'applications-internet']}, + {cat => ['office', 'Office', 'applications-office']}, + {cat => ['other', 'Other', 'applications-other']}, + {cat => ['settings', 'Settings', 'applications-accessories']}, + {cat => ['system', 'System', 'applications-system']}, + + #{cat => ['qt', 'QT Applications', 'qtlogo']}, + #{cat => ['gtk', 'GTK Applications', 'gnome-applications']}, + #{cat => ['x_xfce', 'XFCE Applications', 'applications-other']}, + #{cat => ['gnome', 'GNOME Applications', 'gnome-applications']}, + #{cat => ['consoleonly', 'CLI Applications', 'applications-utilities']}, + +] diff --git a/srcpkgs/obmenu-generator/template b/srcpkgs/obmenu-generator/template new file mode 100644 index 00000000000..ce7f83b8190 --- /dev/null +++ b/srcpkgs/obmenu-generator/template @@ -0,0 +1,23 @@ +# Template file for 'obmenu-generator' +pkgname=obmenu-generator +version=0.60 +revision=1 +noarch=yes +maintainer="Carlo Dormeletti " +homepage="http://trizenx.blogspot.ro/2012/02/obmenu-generator.html" +license="GPL-3" +short_desc="Perl Script to generate Openbox menu" +depends="perl>=5.20 perl-Linux-DesktopFiles" +distfiles="https://github.com/trizen/${pkgname}/archive/${version}.tar.gz" +checksum="437cca97b3225b0dc5dc642c797ad30b7f1fe6024b9c6272fb6c6ed6c84c9643" + +do_install() { + vbin obmenu-generator + vmkdir /etc/xdg/${pkgname} + vinstall schema.pl 644 /etc/xdg/${pkgname} + vdoc README.md + vdoc ${FILESDIR}/README.void + vdoc ${FILESDIR}/schema.pl.app +} + +# vim: set ts=4 sw=4 sts=4 et: