-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcfg_menuitems.lua
69 lines (56 loc) · 2.26 KB
/
cfg_menuitems.lua
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
--
-- Menu definitions
--
-- Main menu
defmenu("mainmenu", {
menuentry("Run...", "mod_query.query_exec(_)"),
menuentry("Terminal", "ioncore.exec_on(_, XTERM or 'x-terminal-emulator')"),
menuentry("Lock screen",
"ioncore.exec_on(_, ioncore.lookup_script('notion-lock'))"),
menuentry("Help", "mod_query.query_man(_)"),
menuentry("About Notion", "mod_query.show_about_ion(_)"),
submenu("Styles", "stylemenu"),
submenu("Debian", "Debian"),
submenu("Session", "sessionmenu"),
})
-- Session control menu
defmenu("sessionmenu", {
menuentry("Save", "ioncore.snapshot()"),
menuentry("Restart", "ioncore.restart()"),
menuentry("Restart TWM", "ioncore.restart_other('twm')"),
menuentry("Exit", "ioncore.shutdown()"),
})
-- Context menu (frame actions etc.)
defctxmenu("WFrame", "Frame", {
-- Note: this propagates the close to any subwindows; it does not
-- destroy the frame itself, unless empty. An entry to destroy tiled
-- frames is configured in cfg_tiling.lua.
menuentry("Close", "WRegion.rqclose_propagate(_, _sub)"),
-- Low-priority entries
menuentry("Attach tagged", "ioncore.tagged_attach(_)", { priority = 0 }),
menuentry("Clear tags", "ioncore.tagged_clear()", { priority = 0 }),
menuentry("Window info", "mod_query.show_tree(_, _sub)", { priority = 0 }),
})
-- Context menu for groups (workspaces, client windows)
defctxmenu("WGroup", "Group", {
menuentry("Toggle tag", "WRegion.set_tagged(_, 'toggle')"),
menuentry("De/reattach", "ioncore.detach(_, 'toggle')"),
})
-- Context menu for workspaces
defctxmenu("WGroupWS", "Workspace", {
menuentry("Close", "WRegion.rqclose(_)"),
menuentry("Rename", "mod_query.query_renameworkspace(nil, _)"),
menuentry("Attach tagged", "ioncore.tagged_attach(_)"),
})
-- Context menu for client windows
defctxmenu("WClientWin", "Client window", {
menuentry("Kill", "WClientWin.kill(_)"),
})
-- Auto-generated Debian menu definitions
if os and os.execute("test -x /usr/bin/update-menus") == 0 then
if ioncore.is_i18n() then
dopath("debian-menu-i18n")
else
dopath("debian-menu")
end
end