Back to Home

The Ultimate XMonad Workflow

Published on

Tech XMonad Tmux Arch Linux

I can finally say that I am extremely happy with my current workflow that I have built. There are so may components to this, from my computer monitor, pc rig, keyboard, tiling window manager, tmux, bullet journaling, arch linux. Each of these could be an entirely separate blog. My goal of being completely optimal, maximal efficiency, with minimal task switching / 'in the zone disrupts', is starting to appear. I am loving my new job, and loving doing all my projects because I am using all the tools that work for me, coding now is just about the code, and maybe requiring some documentation reading to understand further. No longer wasting time rearranging windows, manually setting desktops near eachother for easy switching, or having emailing / messaging be a complete disrupt to development. Lag is not a thing anymore, or system freezes with my new rig, and also making a bloat-minimal operating system environment with Arch Linux. My organisational techniques have improved heavily over the past few years, yet only recently I have built my own tools around my existing techniques to further improve on it.

The monitor

A huge change in how I use my computer, derives from my computer monitor purchase. This was a 49" Ultrawide Samsung Odyssey G9, a super expensive monitor, but I'd say it has been so worth it, the display is extremely high quality and high refresh rate even makes coding seem faster.

However using OSX and windows with this began to cause a pain, I was wasting so much time just rearranging and resizing windows. Native support for display regions was not strong enough, and sometimes I wanted to full screen a video to get rid of browser borders but this would result in the entire screen taken up with huge pointless black bars.

I really was not utilising the power of this monitor Games look absolutely amazing on this, however lots of games do not support this aspect ratio yet, and this takes away from the experience, but also personally I get a bit dizzy with this wide of a game, it's probably something that has to be adjusted to. Oh well, honestly I think this monitor offers so much more as a very high end productivity monitor.

An auto tiling window manager would get rid of any awkwardness of using all the screen estate effectively. In the past I have had dual monitors, or even triple monitors at work, but I always found myself forgetting to use some of the screens, or I just put some random things to run in the background. They were more distractions than anything that would improve my work. The main benefit really was being able to watch a movie and play a game at the same time.

The queen of Tiling WM - Xmonad

Okay I admit. The first day of using XMonad it was like a black box. I had no idea how it worked, or how I can configure things out myself. But after reading documented configs and watching some DistroTube showcases, it started to become quite clear. Additional XMonad libraries and layouts are documented pretty well once you understand a bit of Haskell. A little bit of an overview + typed definitions is all that is needed.

workspaces

I've used the apple and windows approach to workspaces, and under default configurations this is a great way of achieving motion sickness. Not a fan of carousel animations, especially on an ultrawide. And both approaches really do not work well with an ultrawide if you only want to manage a region of the screen to switch. I always have a TMUX session running, and visible at all times as a developer, only ever needing to switch for emailing, messaging, or browsing, these activities should not interrupt my workflow in anyway. With XMonad, I was able to virtually split my monitor in a way that each split of my monitor contained its own family of workspaces. So when I wanted only to change my browser to email, I can do so without moving much focus away from my precious code.

Workspaces should also have stability. Windows and OSX, I swear my windows get rearranged constantly without my input, so I can never memorise for quick switching. I boune to 4 different workspaces before I can find what I want. Within XMonad, I can iconify the names for each workspaces providing some meaning for each workspace. Main browser will always be on 1, and main Tmux will always be on 2 and so on. With muscle memory going to a specific window / workspace now happens at the speed of thought.

Tmux

As I said, TMUX is always present. It gets me in the zone for productivity, I can name my sessions for my current activity, and sessions remain present, if working remotely via Mosh ( Another blog coming up), or even remains persistent over computer shutdowns via Tmux resurrect. A plugin that regularly backs up sessions.

One issue I faced previously, was that I would be done with my workday, and I would be too scared to clear my work session, incase I forgot where I last was. As well as, because it would be a hassle setting up my environment again every single morning. This is mostly resolved by most people by using a different device for work and personal use, however never letting your computer restart, or regularly close programs just results in a device that slows down to a standstill after a while. Also, I find it very hard to use devices that are less performing than my own rig, and task switching between devices and operating systems is a real pain, especially when one is so much more superior.

But with Tmux sessions. I can just switch to my Home session after work. Continue straight into my personal projects and safely leave my work behind me for the next day. Out of mind, but not an acrobatic activity for each work day cycle.

Also, TMUX allows me to have a tiling WM anywhere, the same keybinds, but just prefixed with <C-a>, this allows me to remain productive even when using SSH from another computer. Which is great for when I have to be in the office. SSH / MOSH allows me to have access to my entire system from anywhere, without needing additional setup or syncing up from another device. The only issue I currently find, is being able to use locally hosted websites remotely, for development purposes. An annoying workaround I am using is just deploying, a built version of the site I am developing that is hosted somewhere that I can access. However this takes things a bit slow for immediate feedback.

Pen and Paper and Vimwiki.

With personal organisation I always seem to revert to the analogue pen and paper, it just works. I have attempted for the past 2 years to use an iPad to replace my pen and paper methods, but there is always an extra step. Sometimes just note taking may introduce some lag depending on the size of the journal. There are too many options of colours and really nice things, that just distract me from the point of journalling, to just write my todolist, or my goals as quick as possible. In my head I thought, that a digital system would mean that I would not loose any information over time, and it would be easy to go through past pages. However this was not true at all, on the IPad, whilst possible to flip through pages, it just does not have the same experience.

So, now I just work on Pen and paper, it is instant, lightweight, and does not rely on charging a device. (Does require that pens contain ink)

Vimwiki, I use this vim plugin to digitalise my bullet journal, containing just the important information, or research that I want to develop further. Its super simple, and only 2 keystrokes away at any time. I created scripts that collects all of my days undone tasks, and creates a list. This way if I say I am going to do something, I am continuosly reminded every day until I do it, I forget things a lot. The amount of things I used to have in my bullet journal or IPad that have been forgotten forever... This keeps me with always things to do, and if I cannot think of anything new to do for the day, I can always just look through my achives. To keep this master todo list clean, every month i'll do a purge to get rid off, or just icebox some tasks that I do not feel like doing anytime soon.

The past year, I have tried using notion, and it was really great for the first few months, I was being so much more productive. But I always found the application slow, and it just kept getting really messy so quickly. It was a chore to clean it up regularly. The phone application was nice to have, but it was so fiddly, and required quite a fast network connection if wanting to load some notion pages. I also had a mood chart where I recorded my mood every day for several months, but I dont think it was very valuable, I enjoyed when I can record a perfect day, however, it just made me more guilty or sad when I recorded a day where I was not productive or just had a slow day.

The keyboard.

One other major component for development / general computer use comfort comes from my keyboard and keyboard layout. I am rocking a Planck EZ, an incredibly programmable keyboard, it's super small and makes you think in layers.

It's small size, and limited keys some may think that this is a disadvantage, however this grants you to have your own creativity to how you want to map those number keys and symbols in different layers. For me, I never was able to touch type numbers before, they are just too far away, and always a stretch. However I have set up a number keypad on one layer, which takes no effort to know where each key is. And as a programmer I have also mapped my most used keys under my strongest fingers, and as close to the home row as possible. Other symbols such as the pipe key |, I have mapped to a semantic key i, as it is a similar shape.

With these layers my hand barely has to move, even when typing complicated symbols.

I have even recently changed my keyboard layout once again. Now using Colemak-dh, which is a layout aimed to keep as many popular keys on the home row, and the DH mod, also moves more common keys in more comfortable locations. Seems to be a really great pairing with Vim.

Modern Community not modern tools

Most of the tools that I use, and found to be the best have actually been around for a very long time. But that's not to say it's a bad thing, If anything they have surpassed the modern GUI bloated experience. Open source tools also allow modern skilled developers to extend the tool via plugins, and the choice of these plugins is completely up to you. Modern ides I find, bend over for the common user, creating a really good system, but can never be a focused experience for a single user. Plugins for these tools can only do so much with limited APIs. Jetbrains products are amazing, IntelliJ is fantastic and I will probably use it for Java development, but other products like Webstorm are just resource hogs, shortcuts on these machine are not very accessible, and you have to invest a lot of time to learn, then you are kind of stuck in their expensive ecosystem. But preference is preference, I've seen jetbrains power users and they blow my mind. I've invested a lot of learning into vim, so I will always be biased this way, vim continues to grow with me.

As well as all my other tools in my workflow, it can only get better, and it works amazingly for me.