Skip to content

Instantly share code, notes, and snippets.

View evantravers's full-sized avatar
💭
Fooling around in elixir…

Evan Travers evantravers

💭
Fooling around in elixir…
View GitHub Profile

Customizing a keyboard layout

The following is an insane train of thought… I am honestly re-thinking things that shouldn't be re-thought. It is entirely unnecessary for most people. Only fool around with this level of tweakery if you really love messing with things and you have time to burn.

I'm pretty happy with the modified version of the OLKB Planck layout that I've been using for a number of years. I use a separate finger on each column for each modifier, and it works really well. I'm having to modify this for my new Kyria keyboard… because I'm trying to make use of the thumb mods effectively.

Parts of the Keymap

While discussing keymaps, I've found it helpful to discuss these basics of what a keymap is, so that you can scope your changes to just one or two areas at a time.

@evantravers
evantravers / bible.js
Created November 4, 2019 16:45
Updated bible reference Drafts.app script.
var getVerseFromRef = function(attemptedRef) {
var url = "https://api.esv.org/v3/passage/text/?q=" + encodeURIComponent(attemptedRef) + "&include-footnote-body=false&include-passage-references=false&indent-poetry-lines=2"; //define url for parsing
var http = HTTP.create(); //create HTTP object
var response = http.request({
"url": url,
"method": "GET",
"headers": {
"Authorization": "<insert API token>"
}
});
// Pull all lines with "<emoji> :" together, create headers with a "## <emoji>"
// and list the grepped lines after.
// this is the heading the summary will appear under.
// use something uncommon.
var magic_header = "Auto Summary";
var emoji_regex = /(?:- )?(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]).* ?: ?(.*)/g;
var highlights = {};
// Safe defaults
var path_fragment = "";
var filename = draft.processTemplate("[[safe_title]]");
var content = draft.content;
var diaryFormat = {};
if (/dbox:(.+)$/m.test(draft.content))
{
app.queueAction(Action.find("Save to Dropbox Path"), draft);
window:
padding:
x: 20
y: 20
decorations: none
startup_mode: Windowed
font:
normal:
family: Hasklig
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
activate application "SystemUIServer"
tell application "System Events"
tell process "SystemUIServer"
set btMenu to (menu bar item 1 of menu bar 1 whose description contains "bluetooth")
tell btMenu
click
tell (menu item "Evan’s AirPods" of menu 1)
click
if exists menu item "Connect" of menu 1 then
click menu item "Connect" of menu 1
@evantravers
evantravers / init.vim
Last active September 14, 2020 04:53
" #############################################################################
" Here is my vim configuration with lots of comments to try and explain
" everything that I have done.
" #############################################################################
" Load plug.vim, put all plugins in the right folder
call plug#begin('~/.config/nvim/bundle')
" Language file for elm
Plug 'ElmCast/elm-vim', { 'for': 'elm' }
set nocompatible
set backspace=indent,eol,start
filetype plugin indent on
set relativenumber
set nowrap
syntax on
color desert