]> git.decadent.org.uk Git - ion3.git/blob - pwm/cfg_pwm.lua
Update cfg_kludge_flash for Flash 10
[ion3.git] / pwm / cfg_pwm.lua
1 --
2 -- PWM main configuration file
3 --
4 -- This file only includes some settings that are rather frequently altered,
5 -- and the differences between PWM and Ion. The rest of the settings are in 
6 -- cfg_ioncore.lua and individual modules' configuration files 
7 -- (cfg_modulename.lua).
8 --
9
10 -- Set default modifiers. Alt should usually be mapped to Mod1 on
11 -- XFree86-based systems. The flying window keys are probably Mod3
12 -- or Mod4; see the output of 'xmodmap'.
13 --META="Mod1+"
14 --ALTMETA=""
15
16 -- Some basic settings
17 ioncore.set{
18     -- Maximum delay between clicks in milliseconds to be considered a
19     -- double click.
20     --dblclick_delay=250,
21
22     -- For keyboard resize, time (in milliseconds) to wait after latest
23     -- key press before automatically leaving resize mode (and doing
24     -- the resize in case of non-opaque move).
25     --kbresize_delay=1500,
26
27     -- Opaque resize?
28     --opaque_resize=false,
29
30     -- Movement commands warp the pointer to frames instead of just
31     -- changing focus. Enabled by default.
32     --warp=true,
33 }
34
35 -- cfg_ioncore contains configuration of the Ion 'core'
36 dopath("cfg_ioncore")
37
38 -- Load some modules. 
39 --dopath("cfg_modules")
40 --dopath("mod_query")
41 dopath("mod_menu")
42 --dopath("mod_tiling")
43 --dopath("mod_statusbar")
44 dopath("mod_dock")
45 --dopath("mod_sp")
46
47
48 --
49 -- PWM customisations to bindings and menus
50 --
51
52
53 -- Unbind anything using mod_query and rebind to mod_menu where
54 -- applicable.
55
56 defbindings("WScreen", {
57     bdoc("Display the main menu."),
58     kpress(ALTMETA.."F12", "mod_menu.menu(_, _sub, 'mainmenu', {big=true})"),
59 })
60
61 defbindings("WMPlex.toplevel", {
62     kpress(ALTMETA.."F1", nil),
63     kpress(ALTMETA.."F3", nil),
64     kpress(META..   "F3", nil),
65     kpress(ALTMETA.."F4", nil),
66     kpress(ALTMETA.."F5", nil),
67     kpress(ALTMETA.."F6", nil),
68     kpress(ALTMETA.."F9", nil),
69     kpress(META.."G", nil),
70     
71     bdoc("Show the PWM manual page."),
72     kpress(META..   "F1", "ioncore.exec_on(_, ':man pwm3')"),
73     
74     bdoc("Display context menu."),
75     kpress(META.."M", "mod_menu.menu(_, _sub, 'ctxmenu')"),
76 })
77
78 defbindings("WFrame.toplevel", {
79     kpress(META.."A", nil),
80 })
81
82 -- Make a new main menu with additional workspace menu.
83
84 defmenu("mainmenu", {
85     submenu("Programs",      "appmenu"),
86     menuentry("Lock screen", "ioncore.exec_on(_, 'xlock')"),
87     menuentry("Help",        "ioncore.exec_on(_, ':man pwm3')"),
88     submenu("Workspaces",    "wsmenu"),
89     submenu("Styles",        "stylemenu"),
90     submenu("Session",       "sessionmenu"),
91 })
92
93 -- Application menu
94 defmenu("appmenu", {
95     menuentry("XTerm",          "ioncore.exec_on(_, 'xterm')"),
96     menuentry("W3M",            "ioncore.exec_on(_, ':w3m -v')"),
97     menuentry("Rxvt",           "ioncore.exec_on(_, 'rxvt')"),
98     menuentry("Opera",          "ioncore.exec_on(_, 'opera')"),
99     menuentry("Links",          "ioncore.exec_on(_, ':links')"),
100     menuentry("Konqueror",      "ioncore.exec_on(_, 'konqueror')"),
101     menuentry("Dillo",          "ioncore.exec_on(_, 'dillo')"),
102     menuentry("Run...",         "mod_query.query_exec(_)"),
103 })
104
105 -- Workspace menu
106 defmenu("wsmenu", {
107     menuentry("New",         "ioncore.create_ws(_)"),
108     menuentry("Close",       "WRegion.rqclose(_sub)",
109                              "_sub:WGroupWS"),
110     submenu("List",          "workspacelist"),
111 })
112