Posts

rebind super (windows) key to app menu in kde

I accidentally1* replaced my menubar in KDE2 and the unintended side-effect was that I couldn’t hit the Windows key (super) and have it bring up the helpful menu and search anymore. A little bit of searching around made the answer easy; apparently, binding to Meta+F1 results in the same thing as just meta. Beautiful! Resources Answer found on askubuntu: https://askubuntu.com/questions/246886/how-do-i-open-the-application-launcher-on-kde-with-just-the-meta-windows-key/961407#961407 Footnotes 1 Well, it was on purpose, but I didn’t know it would have that effect

Applying a replacement map to characters in emacs

The Problem I have text in Cyrillic and need to replace individual characters with their transliteration. I have a tiny json of the mappings: {"в": "v","а": "a","ф": "f","ё": "yo","д": "d","ж": "zh","ы": "y","э": "e","л": "l","щ": "shch","я": "ya","й": "j","у": "u","н": "n","г": "g","с": "s","п": "p","ч": "ch","б": "b","х": "kh","е": "ye","ъ": "\"","з": "z","ю": "yu","ь": "'","ш": "sh","о": "o","к": "k","и": "i","ц": "ts","м": "m","т": "t","р": "r"} And I have a number of files that contain lists with entries like

Binding keypad numbers for exwm screen shifting

I now have a perfect use for the rarely-used numpad! Because I have three monitors connected and am an exwm/winum user to navigate all those screens from the keyboard, I have bound that rarely-used numpad to quickly allow for switching between screens, up to 9 (I am not sure my brain could handle more than 9 decisions on viewports, anyway…). The magic is that numpad numbers are a different keycodde than the normal numberline at the top of the keyboard.

Adding a new monitor to my exwm setup

I recently shuffled things with my office and found that I have hardware and ports for a third monitor to connect to my exwm setup. So, without further ado, how to get it going and registered with Linux/EXWM? Edit [2022-01-02 Sun] an easier way with arandr Downloading and installing arandr made this whole configuration much simpler than using the raw randr output. I finally made the jump when I was receiving an error at my attempts to load it manually: xrandr: Configure crtc 2 failed.

how to change the Firefox Close Tab shortcut

C-w is already a highly used shortcut system-wide on my machine, so I’d like to make a different shortcut for close-tab – say, F4. How can I make this change in Firefox? I felt the frustration of several Firefox questioners who asked the same thing and were answered as if they just didn’t know the shortcut, missing the point entirely. On Reddit, though, I receive two excellent answers. One is the easy solution, with a handy plugin that takes care of it.

emacs popular for python

When the results of the State of Emacs survey came out I was really surprised to see that its most reported programming use was in Python. There are some definite biases in the survey participants – I think it was slanted to media used by new users, which were much more plentiful than I expected but obviously much less than the full emacs-using population. Nonetheless I did not at all expect Python to top the language list ahead of Emacs’ classic best-of-class support of lisps like my Clojure, which was down in the middle of languages reported.

Emacs sorting with sort-regexp-fields

Emacs is really an endless world of commands, options, and use-cases, especially for dealing with text. Sorting text is a really common thing and often plain-old M-x sort-lines does the trick in one fell swoop. But what if you want something more sophisticated? It turns out my eyes have been opened and emacs has led me to think about sorting things in ways I never even thought about before.

ghosts in the elisp machine

What ghosts/anomalies do you encounter in the Chtulhu Mansion that is your emacs setup? Emacs is the closest thing now existing to the vaunted “lisp machines” that were originally prescribed to make lisp run effectively. This seems all the more true of exwm users like myself, who are taking the proposition of “emacs as operating system” somewhat literally (at least, to those who don’t consider the difference between a window manager and an operating system.

Why isn't elisp nil the empty string?

Sometimes in emacs nil is not punned well enough. I found this when using Telephone Line, when the crucial problem is that nil can’t be construed as a string (why isn’t it the empty string when strings are wanted?). Error during redisplay: (eval (telephone-line-add-subseparators ‘((lambda (face) (telephone-line-raw (if (telephone-line-selected-window-active) (progn (propertize battery-mode-line-string ‘mouse-face ‘(:box 1))))))) telephone-line-cubed-hollow-left ‘evil)) signaled (wrong-type-argument stringp nil) [36 times] I fixed this manually with some extra code, when writing such cruft feels like a slight against lisps:

Falsehoods about time and names

As programmers occasionally we run into things that should be so simple and common that we don’t even think twice about them. Two of the most egregious are time and people names. A matching pair of articles (by different authors) address these with some fairly broad lists. Check out the original posts for full credit, but they are reproduced here for compilation and history’s sake. The fact is names are hard, and time is the most annoying thing since printers.