This is my first upload to my repository! Please bear with me...
[easy-deb-chroot] / src / home / user / .xbindkeysrc.scm
1 ; guile-based config
2 ;
3 ; (for combo keys)
4 ;
5 ; Part of the Easy Debian chroot package
6 ;
7
8 ; F5 - Menu key
9 ; F6 - Fullscreen key
10 ; F7 - Plus key
11 ; F8 - Minus key
12
13 ; Minus followed by Fullscreen key works with all apps
14 ; Minus followed by Menu toggles keyboard
15 ; Minus followed by Plus toggles mini / full keyboard
16
17 (define (display-n str)
18     "Display a string then newline"
19   (display str)
20   (newline))
21
22 (define (first-binding)
23     "First binding"
24   (xbindkey-function '(F8) second-binding))
25                        
26 (define (reset-first-binding)
27     "reset first binding"
28   (display-n "reset first binding")
29   (ungrab-all-keys)
30   (remove-all-keys)
31   (first-binding)
32   (grab-all-keys))
33
34 (define (second-binding)
35     "Second binding"
36   (display "New binding")
37   (ungrab-all-keys)
38   (remove-all-keys)
39
40 ; Menu key (F4)
41   (xbindkey-function 'F4
42                      (lambda ()
43                        (run-command "/home/user/apps/kbd-toggle")
44                        (reset-first-binding)))
45 ; Plus key (F7)
46   (xbindkey-function 'F7
47                      (lambda ()
48                        (run-command "/home/user/apps/kbd-mini")
49                        (reset-first-binding)))
50 ; Fullscreen key (F6)
51   (xbindkey-function 'F6
52                      (lambda ()
53                        (run-command "wmctrl -r :ACTIVE: -b toggle,fullscreen")
54                        (reset-first-binding)))
55   (debug)
56   (grab-all-keys))
57
58
59
60 (first-binding)
61
62 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
63 ; End of xbindkeys configuration ;
64 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;