Now I am become Roam - Organizer of Worlds

I’ve been getting more and more interested in Emacs and org-mode over the past couple of years. It really seems like a fighter jet of organization, text editing, note taking, etc. The problem is, if you don’t know how to fly a jet, you’re probably going to not get very far.

I do not know how to properly fly the Emacs jet, but I’ve made a few failed attempts to convert part or all of my workflow to Emacs. One time I even went so far as to try to do all my emails through mu4e, which introduced me to the nightmares of emails and their formatting.

If Emacs and org mode are jets, org-roam is like an aircraft carrier, or something even more powerful and complicated.

If you’re not familiar, org-roam is a package that allows you to create notes on the fly and connect them through arbitrary tags. There’s a few workflows I’ve looked at that basically allow you to create a 2nd brain of easily searchable information all connected together. What a dream – Unfortunately, every time I’ve tried to use any of these workflows, I have utterly failed.

I blame this most on context switching. I don’t code for a living and I like to browse the web, so I wasn’t able to permanently stay in Emacs for any length of time. I’d read a good article or want to save something for later, but switching from modern OS keyboard commands and mouse dominance to Emacs land was still jarring even after half a decade with vim.

image-20220704191512429

Enter EXWM

After trying and failing to move all my modern tools to Emacs, I stumbled upon EXWM, an Emacs windows manager. Of course, why try to move everything into Emacs when you can just make everything wrapped in Emacs functionality!

Now, my strange keyboard shortcut workflows can be done anywhere! I expect this will be especially useful for integrating org-roam and journal workflows into my day. As a bonus, due to the way ChromeOS works, being fullscreened doesn’t let you alt-tab out to the main window manager, encouraging learning and sticking with it.

There were quite a few gotchas while setting it up under ChromeOS I thought I would document here. I won’t cover installing EXWM in Emacs, as that is covered in detail elsewhere.

Using Xephyr

ChromeOS will not let you run another window manager replacing the default one. To run EXWM, we’ll need to use Xephyr to run it in its own window.

sudo apt install xephyr-server

Install Xephyr

\#!/bin/bash
unset XDG\_RUNTIME\_DIR
Xephyr -br -ac -noreset -screen 1900x1300 -dpi 234 -resizeable -noreset :2 &
DISPLAY=:2 emacs
pkill Xephyr

Create a bash file to start up EXWM and Emacs. Replace with your screen resolution. You may need to increase the Y axis by ~100 pixels as noted below.

Full Screen Issues

You should now be able to run your bash script and have EXWM working in ChromeOS! The immediate problem you will recognize is the ugly title bar at the top of the screen. There is no setting I am aware of in Xephyr, EXWM or ChromeOS to remove this.

Luckily, the fullscreen button on your Chromebook keyboard will do the trick. Unfortunately, it will now leave a similar sized bar at the bottom of your screen.

The only way I found to resolve this was setting the Y resolution slightly larger than my screen and hitting the fullscreen button as EXWM starts up, before it renders the first frame.