forked from dnschneid/crouton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xbindkeysrc.scm
42 lines (37 loc) · 1.5 KB
/
xbindkeysrc.scm
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
;; Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
;; Use of this source code is governed by a BSD-style license that can be
;; found in the LICENSE file.
;; Run xbindkeys -dg for some example configuration file with explanation
; Xephyr-specific bindings
(if (equal? (getenv "METHOD") "xephyr")
(begin
; Replicates ratpoison shortcuts inside of Xephyr for when Xephyr
; grabs all keys
(xbindkey '(control shift alt F1)
"xte 'keyup F1'; host-x11 ratpoison -c prev")
(xbindkey '(control shift alt F2)
"xte 'keyup F2'; host-x11 ratpoison -c next")
(xbindkey '(control shift alt Escape)
"xte 'keyup Escape'; host-x11 ratpoison -c 'readkey root'")
)
)
; X11-specific bindings
(if (equal? (getenv "METHOD") "x11")
(begin
; Creates the shortcuts to cycle X11 chroots like with Xephyr
(xbindkey '(control shift alt F1) "croutoncycle prev")
(xbindkey '(control shift alt F2) "croutoncycle next")
)
)
; Extra bindings that must only be activated in chroot X11/Xephyr
(if (not (equal? (getenv "CROUTON") "XINIT"))
(begin
; Brightness control
(xbindkey '(XF86MonBrightnessDown) "brightness down")
(xbindkey '(XF86MonBrightnessUp) "brightness up")
; Load ~/.xbindkeysrc.scm for customization if the current user has one
(let ((usercfg (string-append (getenv "HOME") "/.xbindkeysrc.scm")))
(if (access? usercfg F_OK) (load usercfg))
)
)
)