File: menu-method

package info (click to toggle)
jwm 2.1.0%2Bsvn579-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,044 kB
  • ctags: 2,017
  • sloc: ansic: 17,517; sh: 2,954; makefile: 107; sed: 16
file content (72 lines) | stat: -rwxr-xr-x 2,109 bytes parent folder | download | duplicates (2)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/install-menu
#
# This file is located in /etc/menu-methods/jwm
# See "Debian Menu System" /usr/share/doc/menu/html/index.html
#
# FOR THE DEBIAN DEVELOPER
#
# 1) copy content from the jwm source (example.jwmrc)
#    - Remember to make "postoutput" where Debian menus are inserted.
#    - Use x-terminal-emulator, not xterm, rxvt etc.
#    - Check <Clock format="%H:%M" ...
#
# 2) Possibly replace font setting
#    FreeSans-12:bold 	=> -*-fixed-*-r-*-*-10-*-*-*-*-*-*-*
#    FreeSans-10 	=>
#    FreeSans-9:bold 	=>
#    - Change also RootMenu height 32 => 15
#
# 3) Substitute all quotes with backslash+quote
#
# 4) Substitute all newlines with "\n\"
#
# To test:
#
#       update-menus --stdout > /tmp/menu-stdin
#       cd  debian/
#   [1] cp menu-method /etc/menu-methods/jwm
#   [2] /etc/menu-methods/jwm -v < /tmp/menu-stdin
#       ls -la /etc/jwm/
#       cat /etc/jwm/jwm.debian
#
#   Run 1 & 2 if you modify the menu-method file and want to see results
#
# To test desktop:
#
#     cp Jwm.desktop /usr/share/jwm/xsessions/Jwm.desktop

compat="menu-1"

# /etc/menu-methods/menu.h
!include menu.h

rootprefix="/etc/jwm/"
genmenu="debian-menu"
outputencoding="UTF-8"
userprefix="jwmrc"
treewalk="(M)"
#rcfile="system.jwmrc";
#examplercfile="system.jwmrc-menu";

function q($com)=esc($com,"\"")
#function f($com)="  \"" q(title()) "\"    f.exec  \"" q($com) " &\"\n"

function xml_escape($s) = replace(replace(replace($s, \
"&",  "&amp;"), \
">",  "&gt;"), \
"<",  "&lt;")

supported
    x11=     nstring(level(), "  ") "    <Program label=\"" xml_escape(title()) "\" confirm=\"false\">" xml_escape($command) "</Program>\n"
    text=    nstring(level(), "  ") "    <Program label=\"" xml_escape(title()) "\" confirm=\"false\">" xml_escape(term()) "</Program>\n"
endsupported

startmenu=nstring(level(), "  ") "    <Menu label=\"" q(title()) "\">\n"
endmenu=nstring(level(), "  ") "    </Menu>\n"

# submenutitle= nstring(level(), "   ") "  \"" q(title()) q($section) "\"\n"

preoutput="<JWM>\n<!-- Automatically generated and updated. Do not touch -->\n"
postoutput="</JWM>\n"

# End of file