my Emacs configuration files
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This is a modular use-package and Linux-oriented config, made with EXWM in mind. The languages I target are in the lisp family + html/css/javascript… I have tried to add helpful comments for new users, but the secret is to learn how to use “C-h f” , “C-h v” , and “C-h k” because Emacs is a self-documenting system.

Bits and pieces of code in this config come from all over the net, including “better-defaults” “spacemacs” “prelude” “purcell” “emacs wiki” and more. Thanks to all of those heavy-hitters and everybody from #emacs on Freenode.

My configuration is simpler, and probably more opinionated than those before mentioned, but I do still borrow heavily from prelude and others– because maintaining a sophisticated Emacs configuration single-handedly is just too much work!

This file is also a template that gets copied as ~/$ automatically– to be used as a 100% customizable and persistent org-mode Emacs Start page :-)

There are accompanying dotfiles.


On EXWM and “Default Applications”

I use “mimi,” an xdg-open drop-in replacement in addition to a .mailcap file to inform Emacs / EXWM about default applications for various filetypes. (mimi script) (mimi config)

The mailcap file is necessary for gnus when opening file attachments.

Edge cases in Emacs/EXWM such as default browser are covered in my cfg-general.el file, In my case, I prefer to set the browser to be “chrome”, which is actually a script in ~/bin like so,

firejail google-chrome-unstable --incognito "$@"

Similarly, to have browser Email URL’s to open using gnus, the browser mailto handler should be set to run a script as follows:

emacsclient -e "(gnus)" -e "(browse-url-mail \"$@\")"

On EXWM and launching external programs

I use M-x helm-run-external-command with the following snippet which uses wmctrl to pop previously opened windows to the front of the stack:

(when (executable-find "wmctrl")
  (setq helm-raise-command "wmctrl -xa %s"))

So be sure wmctrl is installed!

Why left alt and left ctrl should be swapped for Emacs ergonomics?

The following is the perfect Emacs keyboard layout:

<stupidkey> <SUPER> <CTRL> [SPACE] <ALT> <SUPER> <stupidkey><stupidkey>

Imagine the above layout is enabled, now press <CTRL> with your left thumb. Likewise, press <ALT> with your right thumb, now press any key without strain. Goodbye “emacs pinky!”

setxkbmap -option ctrl:swap_lalt_lctl

The keybinds in this file stay close to defaults, but add a Super key shortcut. For example, shortcut for C-c <left> (winner under) is simple <s-left> … That’s my rule of thumb. :)

I also remap caps lock to be <menu> via

setxkbmap -option caps:menu

This is because Caps is the perfect hydra location and I put nested hydras on caps. Credit for all of the above: ldlework from #emacs on freenode. Ergonomics+Emacs! THANKS!

To see how to use nested hydras on <CAPS> , check out