From 5d368f122b8ed33a1c7b112dccb7735426929558 Mon Sep 17 00:00:00 2001 From: Christopher James Hayward Date: Tue, 27 Apr 2021 20:40:15 -0400 Subject: [PATCH] Add xmodmap --- config/xmodmap | 7 +++++++ modules/desktop.org | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 config/xmodmap diff --git a/config/xmodmap b/config/xmodmap new file mode 100644 index 0000000..49a8a9a --- /dev/null +++ b/config/xmodmap @@ -0,0 +1,7 @@ +clear lock +clear control + +keycode 66 = Control_L + +add control = Control_L +add Lock = Control_R diff --git a/modules/desktop.org b/modules/desktop.org index 50de73c..841a1c4 100644 --- a/modules/desktop.org +++ b/modules/desktop.org @@ -30,6 +30,44 @@ exec dbus-launch --exit-with-session emacs -mm --debug-init "~/.xinitrc") #+end_src +** Desktop environment + +Use the *desktop-environment* package to automatically bind well-known programs for controlling the volume, brightness, media playback, and many other XF86 functionality bindings. + +#+begin_src emacs-lisp +(use-package desktop-environment + :after exwm + :custom (desktop-environment-brightness-small-increment "5%+") + (desktop-environment-brightness-small-decrement "5%-") + (desktop-environment-brightness-normal-decrement "10%-") + (desktop-environment-brightness-normal-decrement "10%-") + :config (desktop-environment-mode)) +#+end_src + +** Keyboard tweaks +:PROPERTIES: +:header-args: conf :tangle ../config/xmodmap +:END: + +Use *XModmap* to swap CapsLock and Ctrl to keep common bindings on the home row. + +#+begin_src conf +clear lock +clear control + +keycode 66 = Control_L + +add control = Control_L +add Lock = Control_R +#+end_src + +#+begin_src emacs-lisp +(dotfiles/symlink "~/.emacs.d/config/xmodmap" + "~/.Xmodmap") +#+end_src + +#+RESULTS: + * Browser integration Write out the ~$BROWSER~ variable so other applications can pick up the custom browser.