Text Mode Weekend, Part Deux

in which I continue to experiment with Slackware without X11 as a desktop OS


This is a follow-up to Text Mode Weekend, as the title implies.

Helpful Replies

I’ve gotten email from a couple of people regarding my post about trying to get away from the X Window System in favor of doing everything in the GNU/Linux text console.

The first was from Case Duckworth, who wrote:

I have used brutaldon.online to decent effect in lynx to browse Mastodon. Thought you might find that useful!

Believe it or not, I had tried brutaldon.online with lynx. I’ve known about brutaldon for a while; it’s a web 1.0 front-end for Mastodon that works with browsers that don’t implement JavaScript.

Unfortunately, there’s something wonky about mastodon.art that prevents OAuth from working, so I can’t authenticate via brutaldon. This is probably just as well, for reasons that are beyond the intended scope of this post.

There’s another email from Alex Schroeder full of advice, which I’ll reproduce mostly in full below.

Regarding the unique identifiers: if you use C-u M-! then the shell command output should get inserted right where you are. Sounds like that’s what you want?

This is exactly what I needed, and will most certainly make creating atom feeds by hand much easier since I need no longer swap contexts (editor to shell) whenever I need a unique identifier. Likewise, if I create aliases for the date command, I can get the current date much more easily, though `date -R -d “${ISO8601_DATE}” gives me a date suitable for RSS feeds.

Regarding music: I’ve switched to listening to my music using Emacs (EMMS)… it might not be for everybody, but it works for me.

I like the idea of the Emacs Multimedia System (EMMS) but I’ve never succeed in making it work for me. This should not be taken as an indictment of EMMS; it’s my failure, not that of the developers.

I might try it again, though.

I’m using aerc together with Emacs these days. I suppose you’re already using neomutt so this advice is a bit late, but here it is in case you ever want to change back: In your Emacs, use (server-start) in your init file; in aerc.conf, use editor=emacsclient -temacs; in binds.conf I’m relying on the fact that I hardly ever need C-j and so that’s the only actual keybinding I use:

    compose::editor
    # Keybindings used when the embedded terminal is
    # selected in the compose view
    $noinherit = true
    $ex = <C-^>
    # <C-k> = :prev-field<Enter>
    <C-j> = :next-field<Enter>
    # <C-p> = :prev-tab<Enter>
    # <C-n> = :next-tab<Enter>

And of course I never thought of tampering with aerc’s default keybindings. In my defense I’ve been trying to avoid unnecessary customization. You can’t lose or forget to backup dotfiles you never created in the first place.

Also, as Alex points out below, his suggested configuration involves running Emacs in daemon mode.

Also, while I’m composing an email in aerc in a terminal, I have access to all the other buffers in my “real” Emacs session, so that’s cool.

I’m basically assuming you’re using Emacs in one virtual console and aerc in another virtual console…

While I’ve tried running Emacs as a daemon before, I’ve never really found it a satisfactory experience. While I like having new frames open almost instantly because my configuration is already loaded, I’ve found that not having a gigantic configuration involving dozens or hundreds of packages does wonders for Emacs’ startup time.

Also, there’s the matter of segmentation. This may seem odd, but I find I prefer having multiple Emacs sessions: one for web stuff, one for gemini posts, one for writing my Starbreaker stories, one for writing smut to email my wife, etc. Running a single Emacs session—daemonized or not—mixes all of my buffers for my various projects together, and makes it harder to concentrate. I find that segmenting my work with multiple sessions makes it easier to focus.

While I could run multiple named Emacs daemons and get the same result, I’d rather keep it simple and just run multiple Emacs sessions. What else am I going to do with 32GB of RAM, especially if I finally get my shit together and stop dicking around with web-based social media?

Needless Austerity?

After a couple of weeks trying to live in the console and only starting X11 when I need to use Firefox (to access my ProtonMail account, for example) I find myself chafing against my self-imposed restrictions.

Could I make the Linux console a better environment for writing? Maybe if I polished my C skills and started hacking, but I suspect some of the work would involve messing with the Linux kernel and I’d rather not go down that particular rabbit hole.

As amusing as it has been to read Linus Torvalds’ profanity-laced tirades on LKML over the years, I would not want to be on the receiving end myself unless I was getting handsomely paid—no matter how richly I might deserve it because of an egregious fuckup that broke userspace.

So I’ve reluctantly gone back to using X after rethinking why I wanted to avoid its use in the first place. First, not using X feels a lot like being a NoFap cultist. It seems to an attempt to distinguish oneself from the crowd by imposing upon oneself needless austerity. Second, I’m not convinced X is the problem. I think the problem might lie in having a 24/7 broadband connection, and the solution to that is to start using my wifi adapter as if it were a dialup modem and disable it when I don’t actually need it.

What would treating wifi like dialup look like? To start with, it would involve keeping my desktop machine’s USB wifi adapter unplugged unless I actually want to connect to the internet. It would involve downloading large batches of email, queuing replies, and sending them all in bulk. It would entail not being able to glue myself to a social media feed, refreshing every minute or so to see if something new shows up. It would involve being unavailable to most people most of the time.

Is this really what I need, or is abstaining from 24/7 broadband itself a sort of needless austerity? I don’t know, but I might try it anyway. It’s not like I haven’t gotten good results by using the wifi kill switch on my laptop when sitting at a cafe and writing while my wife goes shopping—though that was more about maximizing battery life.

In the meantime, I think I might have another go at setting up and using EMMS.

EMMS Update

I managed to get EMMS working, though my configuration is rather basic. The key-bindings are custom, and inspired by cmus.

(use-package emms
  :ensure t
  :config
  (require 'emms-setup)
  (emms-all)
  (setq emms-player-list '(emms-player-mpv))
  (setq emms-player-mpv-environment '("PULSE_PROP_media.role=music"))
  (setq emms-player-mpv-parameters '("--quiet" "--really-quiet" "--no-audio-display" "--force-window=no" "--vo=null"))
  (setq emms-source-file-default-directory "~/Music/")
  (setq emms-playlist-buffer-name "*Music*")
  (setq emms-info-functions '(emms-info-exiftool))
  (setq emms-browser-covers 'emms-browser-cache-thumbnail-async)
  (setq emms-browser-thumbnail-small-size 64)
  (setq emms-browser-thumbnail-medium-size 128)
  (setq emms-info-asynchronously t)
  (global-set-key (kbd "C-c e v") 'emms-stop)
  (global-set-key (kbd "C-c e c") 'emms-pause)
  (global-set-key (kbd "C-c e z") 'emms-previous)
  (global-set-key (kbd "C-c e b") 'emms-next)
  (global-set-key (kbd "C-c e x") 'emms-start)
  (global-set-key (kbd "C-c e r") 'emms-toggle-repeat-playlist)
  (global-set-key (kbd "C-c e s") 'emms-toggle-random-playlist)
  (global-set-key (kbd "C-c e R") 'emms-toggle-repeat-track)
  (global-set-key (kbd "C-c e S") 'emms-toggle-single-track)
  (global-set-key (kbd "C-c e d") 'emms-play-directory)
  (global-set-key (kbd "C-c e D") 'emms-play-dired))

I did notice that I can open up an album’s directory in Emacs dired (C-x d RET), have the cursor on the “.” (current directory) line, and use M-x emms-play-dired to create a playlist consisting of every track in that directory. It’s a good way to do sequential play of individual albums.