about summary refs log tree commit diff
path: root/configs/shared/.emacs.d/wpc/keybindings.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-01-18T22·47+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-01-18T22·47+0000
commit77d46eb5e1ef27f111012adbe966b82238d38fec (patch)
treeb497e8ce80236500cd282883e8fdf52e3af65b75 /configs/shared/.emacs.d/wpc/keybindings.el
parent068a648736c14a8670097dc4c715bc76dbcfe6e6 (diff)
Debug failed initialization of keybindings
Some more pains of weening off of Dropbox is that my Emacs initialization is
sensitive to dependencies and missing require statements. I'm still debugging
everything.

Some modules called `exwm-input-set-key` before the `window-manager` module
loaded, which itself requires EXWM. This broke initialization. To get around
this I could've called `(require 'exwm)` in each of those modules. I chose to
define a `keybindings.el` module to whitelist some of my EXWM keybindings. I'm
not sure if this is the best way forward, but it is *some* way forward.
Diffstat (limited to 'configs/shared/.emacs.d/wpc/keybindings.el')
-rw-r--r--configs/shared/.emacs.d/wpc/keybindings.el35
1 files changed, 35 insertions, 0 deletions
diff --git a/configs/shared/.emacs.d/wpc/keybindings.el b/configs/shared/.emacs.d/wpc/keybindings.el
new file mode 100644
index 000000000000..62505d965266
--- /dev/null
+++ b/configs/shared/.emacs.d/wpc/keybindings.el
@@ -0,0 +1,35 @@
+;;; keybindings.el --- Centralizing my keybindings -*- lexical-binding: t -*-
+;; Author: William Carroll <wpcarro@gmail.com>
+
+;;; Commentary:
+;; Attempting to centralize my keybindings to simplify my configuration.
+
+;;; Code:
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Dependencies
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(require 'clipboard)
+(require 'screen-brightness)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Configuration
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defmacro keybinding/exwm (c fn)
+  "Bind C to FN using `exwm-input-set-key' with `kbd' applied to C."
+  `(exwm-input-set-key (kbd ,c) ,fn))
+
+(keybinding/exwm "C-M-v" #'ivy-clipmenu/copy)
+
+(keybinding/exwm "<XF86MonBrightnessUp>" #'screen-brightness/increase)
+(keybinding/exwm "<XF86MonBrightnessDown>" #'screen-brightness/decrease)
+
+(keybindings/exwm "<XF86AudioMute>" #'pulse-audio/toggle-mute)
+(keybindings/exwm "<XF86AudioLowerVolume>" #'pulse-audio/decrease-volume)
+(keybindings/exwm "<XF86AudioRaiseVolume>" #'pulse-audio/increase-volume)
+(keybindings/exwm "<XF86AudioMicMute>" #'pulse-audio/toggle-microphone)
+
+(provide 'keybindings)
+;;; keybindings.el ends here