File: openbox.menu-method

package info (click to toggle)
openbox 3.6.1-10
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,224 kB
  • sloc: ansic: 36,891; sh: 4,484; xml: 1,358; makefile: 607; python: 594; sed: 16
file content (36 lines) | stat: -rw-r--r-- 1,855 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/install-menu

!include menu.h

compat="menu-1"

outputencoding="UTF-8"
genmenu="debian-menu.xml"
rootprefix="/var/lib/openbox/"
userprefix=".config/openbox/"
treewalk="(M)"

function xml_escape($s) = replace(replace(replace(replace(replace($s, \
				"&",  "&"), \
				">",  ">"), \
				"<",  "&lt;"), \
				"'",  "&apos;"), \
				"\"", "&quot;")

supported
    x11=     nstring(level(), "  ") "<item label='" xml_escape(title()) "'" ifnempty(icon(), " icon='" xml_escape(icon()) "'") ">\n" \
             nstring(level(), "  ") "  <action name='Execute'><execute>" xml_escape($command) "</execute></action>\n" \
             nstring(level(), "  ") "</item>\n"
    text=    nstring(level(), "  ") "<item label='" xml_escape(title()) "'" ifnempty(icon(), " icon='" xml_escape(icon()) "'") ">\n" \
             nstring(level(), "  ") "  <action name='Execute'><execute>" xml_escape(term()) "</execute></action>\n" \
             nstring(level(), "  ") "</item>\n"
    wm=      nstring(level(), "  ") "<item label='" xml_escape(title()) "'" ifnempty(icon(), " icon='" xml_escape(icon()) "'") ">\n" \
             nstring(level(), "  ") "  <action name='Restart'><execute>" xml_escape($command) "</execute></action>\n" \
             nstring(level(), "  ") "</item>\n"
endsupported

startmenu=   nstring(level(), "  ")  "<menu id='" xml_escape($section) "' label='" xml_escape(title()) "'>\n"
endmenu=     nstring(level(), "  ")  "</menu>\n"

preoutput=   "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!-- Automatically generated file. Do not edit (see /usr/share/doc/menu/html) -->\n\n<openbox_menu xmlns=\"http://openbox.org/\"\n        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        xsi:schemaLocation=\"http://openbox.org/\n                file:///usr/share/openbox/menu.xsd\">\n\n"
postoutput=  "\n</openbox_menu>\n"