From 77d46eb5e1ef27f111012adbe966b82238d38fec Mon Sep 17 00:00:00 2001 From: William Carroll Date: Sat, 18 Jan 2020 22:47:11 +0000 Subject: 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. --- configs/shared/.emacs.d/wpc/keybindings.el | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 configs/shared/.emacs.d/wpc/keybindings.el (limited to 'configs/shared/.emacs.d/wpc/keybindings.el') 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 + +;;; 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 "" #'screen-brightness/increase) +(keybinding/exwm "" #'screen-brightness/decrease) + +(keybindings/exwm "" #'pulse-audio/toggle-mute) +(keybindings/exwm "" #'pulse-audio/decrease-volume) +(keybindings/exwm "" #'pulse-audio/increase-volume) +(keybindings/exwm "" #'pulse-audio/toggle-microphone) + +(provide 'keybindings) +;;; keybindings.el ends here -- cgit 1.4.1