mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-01 10:22:56 +02:00
obmenu-generator: added schema.pl.app already tailored for submenu
usage in the doc dir, deleted INSTALL.msg and adpated README.void and the template file to reflect the modifications Regards Carlo D.
This commit is contained in:
parent
3dc2c95b56
commit
6a42699a35
4 changed files with 61 additions and 19 deletions
|
@ -1,4 +0,0 @@
|
||||||
|
|
||||||
See README.void in /usr/share/doc/obmenu-generator
|
|
||||||
|
|
||||||
The Void Mantainers
|
|
|
@ -40,15 +40,9 @@ README.void
|
||||||
|
|
||||||
The LABEL column is the place where you localize the names.
|
The LABEL column is the place where you localize the names.
|
||||||
|
|
||||||
If you use it as a submenu it's better to commentig out the lines from:
|
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
|
||||||
## Custom advanced settings
|
this use.
|
||||||
|
|
||||||
till:
|
|
||||||
|
|
||||||
{exit => ['Exit', 'exit']},
|
|
||||||
|
|
||||||
prior the closing ]
|
|
||||||
|
|
||||||
The config.pl is created by obmenu-generator but you may want to customize
|
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
|
the language of the auto generated names, for that you have to modify a line
|
||||||
|
@ -57,12 +51,13 @@ README.void
|
||||||
|
|
||||||
"name_keys" => ['Name[it]', 'GenericName[it]', 'Name'],
|
"name_keys" => ['Name[it]', 'GenericName[it]', 'Name'],
|
||||||
|
|
||||||
Accordig to the comment in the script the modifications you have done
|
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
|
do in the config.pl may be overridden by the program itself, so be prepared
|
||||||
prepared to rewrite every line you modify in the config.pl file from time to
|
to rewrite every line you modify in the config.pl file from time to time
|
||||||
time (it is better to copy the config.pl file say to config.pl.mine).
|
(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 the desired modification, insert this line in your
|
After you have done all your modification, insert this line in your Openbox
|
||||||
menu.xml where you want the menu will be:
|
menu.xml where you want the menu will be:
|
||||||
|
|
||||||
<menu id="obmenu-generator" label="<Your Menu Name>" execute="/usr/bin/obmenu-generator -i"/>
|
<menu id="obmenu-generator" label="<Your Menu Name>" execute="/usr/bin/obmenu-generator -i"/>
|
||||||
|
|
51
srcpkgs/obmenu-generator/files/schema.pl.app
Normal file
51
srcpkgs/obmenu-generator/files/schema.pl.app
Normal file
|
@ -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']},
|
||||||
|
|
||||||
|
]
|
|
@ -16,7 +16,7 @@ do_install() {
|
||||||
vinstall schema.pl 644 /etc/xdg/${pkgname}
|
vinstall schema.pl 644 /etc/xdg/${pkgname}
|
||||||
vdoc README.md
|
vdoc README.md
|
||||||
vdoc ${FILESDIR}/README.void
|
vdoc ${FILESDIR}/README.void
|
||||||
vdoc schema.pl
|
vdoc ${FILESDIR}/schema.pl.app
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim: set ts=4 sw=4 sts=4 et:
|
# vim: set ts=4 sw=4 sts=4 et:
|
||||||
|
|
Loading…
Add table
Reference in a new issue