|
root / base / hammerhead-desktop / menu.xml
menu.xml XML 95 lines 3.1 KB
 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0" encoding="UTF-8"?>
<!-- Hammerhead Openbox root menu - Zygaena marine-dark identity
     Installed to $PREFIX/etc/xdg/openbox/menu.xml

     Structure adapted from CrunchBang++'s categorized root menu
     (github.com/CBPP/cbpp-configs, simon-weber/crunchbang-conf) -
     Applications/Places submenus, quick launchers, an Openbox submenu,
     plain Exit (no GTK exit dialog). Rebuilt GTK-free for our real
     apps: st, xfe, xnedit, nvim (in st), hh-pdf, hh-images, dmenu_run. -->
<openbox_menu xmlns="http://openbox.org/3.4/menu">

  <menu id="root-menu" label="Hammerhead">

    <menu id="apps-menu" label="Applications">
      <menu id="apps-accessories-menu" label="Accessories">
        <item label="Text Editor (XNEdit)">
          <action name="Execute"><command>xnedit</command></action>
        </item>
        <item label="Vim (terminal)">
          <action name="Execute"><command>st -e nvim</command></action>
        </item>
        <item label="Files (Xfe)">
          <action name="Execute"><command>xfe</command></action>
        </item>
        <item label="Image Viewer">
          <action name="Execute"><command>hh-images</command></action>
        </item>
        <item label="PDF Viewer">
          <action name="Execute"><command>hh-pdf</command></action>
        </item>
      </menu>
      <menu id="apps-system-menu" label="System">
        <item label="Terminal">
          <action name="Execute"><command>st</command></action>
        </item>
      </menu>
    </menu>

    <menu id="places-menu" label="Places" execute="hh-places-pipemenu"/>

    <menu id="recent-menu" label="Recent Files" execute="hh-recent-pipemenu"/>

    <separator/>

    <item label="Terminal">
      <action name="Execute"><command>st</command></action>
    </item>
    <item label="Files">
      <action name="Execute"><command>xfe</command></action>
    </item>
    <item label="Run...">
      <action name="Execute"><command>dmenu_run</command></action>
    </item>

    <separator/>

    <menu id="openbox-menu" label="Openbox">
      <item label="Reconfigure">
        <action name="Reconfigure"/>
      </item>
      <item label="Restart">
        <action name="Restart"/>
      </item>
    </menu>

    <separator/>

    <!-- Power management. zygctl talks to the root-owned zyginit socket, so
         it needs root privilege; the desktop runs as zygaena (uid 1000).
         pfexec elevates via the "Hammerhead Power Management" RBAC profile
         (base config: rootfs/etc/security/{prof,exec}_attr.d/hammerhead +
         rootfs/etc/user_attr.d/hammerhead). Each has an Openbox confirm
         <prompt> so a stray click can't power off the machine. -->
    <item label="Reboot">
      <action name="Execute">
        <command>pfexec /sbin/zygctl reboot</command>
        <prompt>Reboot the system?</prompt>
      </action>
    </item>
    <item label="Shutdown">
      <action name="Execute">
        <command>pfexec /sbin/zygctl poweroff</command>
        <prompt>Shut down the system?</prompt>
      </action>
    </item>

    <item label="Log Out / Exit">
      <action name="Exit">
        <prompt>yes</prompt>
      </action>
    </item>
  </menu>

</openbox_menu>