root/rvwm.py

Revision 1, 0.8 KB (checked in by root, 3 years ago)

Initial commit

Line 
1def start_drag(c):
2    pass
3#    c.x = 0
4
5def start_sweep(c):
6    pass
7#    c.width = 100
8#    return False
9
10def stop_action(c):
11    print c.name
12
13import mwm
14mwm.run()
15mwm.set_drag_start_hook(start_drag)
16mwm.set_drag_end_hook(stop_action)
17mwm.set_sweep_start_hook(start_sweep)
18mwm.set_sweep_end_hook(stop_action)
19
20def h():
21    print 'hide'
22    mwm.focused().hide()
23
24def s():
25    print 'show'
26    mwm.focused().show()
27
28
29def active(c):
30    for w in mwm.list():
31        w.unset_grab_button_mask()
32    print 'hop'
33    c.show()
34    c.focus()
35    c.set_grab_button_mask()
36
37mwm.set_mouse_button1_hook(active)
38mwm.grab_keys([(49, 12, h), (50, 12, s)])
39
40#tutorial:
41#mwm.list() -> all active clients
42#mwm.grab_keys -> ...
43#mwm.focused() -> returns active client
44
45#available mathodes on Client object
46#client.show()
47#client.hide()
48#client.focus()
Note: See TracBrowser for help on using the browser.