Skip to content

Instantly share code, notes, and snippets.

View nat-418's full-sized avatar

Nat nat-418

View GitHub Profile
@toroidal-code
toroidal-code / Hyper.md
Last active December 31, 2023 19:32
Have you a Hyper for Great Good

Have you Hyper for Great Good

So. You have become an Emacs wizard. And you find yourself aching for the simplicity that another modifier key would introduce into your life. Ah, the things you could do with Hyper.

Or maybe, you just want Hyper for another reason.

... Except everywhere you look, everyone's talking about .xmodmaps and xkbcomp, but you're using one of those fancy desktop managers. (Aka, not awesome, dwm, xmonad or something even more hipster) And because of that, you're lost in the sea of confusion that is trying to customize your keyboard mapping.

Gnome, Cinnamon, and KDE all use xkb.

@ksafranski
ksafranski / expecting.md
Last active November 11, 2023 23:00
Basic principles of using tcl-expect scripts

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect