]> icculus.org git repositories - mikachu/openbox.git/blob - scripts/defaults.py
use the new non-static display
[mikachu/openbox.git] / scripts / defaults.py
1 # set up the mouse buttons
2 setup_sloppy_focus()
3 setup_window_clicks()
4 setup_window_buttons()
5 setup_scroll()
6 # set up focus fallback so im not left with nothing focused all the time
7 setup_fallback_focus()
8
9 # my window placement algorithm
10 ebind(EventPlaceWindow, placewindows_random)
11
12 # run xterm from root clicks
13 mbind("Left", MC_Root, MouseClick, lambda(d): execute("xterm"))
14
15 kbind(["A-F4"], KC_All, close)
16
17 # desktop changing bindings
18 kbind(["C-1"], KC_All, lambda(d): change_desktop(d, 0))
19 kbind(["C-2"], KC_All, lambda(d): change_desktop(d, 1))
20 kbind(["C-3"], KC_All, lambda(d): change_desktop(d, 2))
21 kbind(["C-4"], KC_All, lambda(d): change_desktop(d, 3))
22 kbind(["C-A-Right"], KC_All, lambda(d): next_desktop(d))
23 kbind(["C-A-Left"], KC_All, lambda(d): prev_desktop(d))
24
25 kbind(["C-S-A-Right"], KC_All, lambda(d): send_to_next_desktop(d))
26 kbind(["C-S-A-Left"], KC_All, lambda(d): send_to_prev_desktop(d))
27
28 # focus new windows
29 def focusnew(data):
30     if not data.client: return
31     if data.client.normal():
32         focus(data)
33
34 ebind(EventNewWindow, focusnew)
35
36 print "Loaded defaults.py"