Skip to content

Instantly share code, notes, and snippets.

View fabi1cazenave's full-sized avatar

Fabien Cazenave fabi1cazenave

View GitHub Profile
@fabi1cazenave
fabi1cazenave / asymetric-MacVim-meta.diff
Created November 7, 2010 21:41
asymetric Meta keys with MacVim
diff --git a/src/MacVim/MMTextViewHelper.m b/src/MacVim/MMTextViewHelper.m
index 4d10432..42f311b 100644
--- a/src/MacVim/MMTextViewHelper.m
+++ b/src/MacVim/MMTextViewHelper.m
@@ -22,6 +22,9 @@
#import "MMWindowController.h"
#import "Miscellaneous.h"
+// asymetric meta keys
+#define NSLeftAlternateKeyMask (0x000020 | NSAlternateKeyMask)
@fabi1cazenave
fabi1cazenave / slideshow.js
Created November 12, 2010 18:13
Experimental JavaScript file for HTML-Timing slideshows. Requires the latest version of timesheets.js (0.4+).
/* add custom keyboard shortcuts for the slideshow player */
EVENTS.onSMILReady(function() {
var slideshow = document.getElementById("slideshow");
if (!slideshow || !slideshow.timing) return;
EVENTS.bind(document, "keydown", function(e) {
if (e.altKey || e.metaKey || e.cmdKey || e.ctrlKey)
return;
switch(e.keyCode) {
case 36: // home key
EVENTS.preventDefault(e);
@fabi1cazenave
fabi1cazenave / .vimrc
Created December 10, 2012 20:51
Vim — beginner’s config
" auto-source this configuration file when updated
autocmd! BufWritePost .vimrc source ~/.vimrc
" Modern / standard / Notepad-like behavior:
source $VIMRUNTIME/mswin.vim
set nocompatible " required for a multi-level undo/redo stack
set mouse=a " enable mouse selection
" gVim handles Ctrl-* shortcuts a bit better than Vim
set guifont=Monospace\ 9
@fabi1cazenave
fabi1cazenave / userContent.css
Created May 6, 2015 06:49
Slack — compact theme
@-moz-document domain(slack.com) {
/**
* A super-compact mode for Slack.
* Activate it with the "dense" theme in your profile preferences.
*/
/* Messages */
.dense_theme .message {
font-size: 0.9rem !important;
line-height: 1.0rem !important;
@fabi1cazenave
fabi1cazenave / lafayette5.xkb
Created December 6, 2015 19:57
Qwerty-Lafayette, variant with AltGr = ISO_Level5_Switch
//
// File : lafayette.xkb
// Project page : http://fabi1cazenave.github.com/qwerty-lafayette/
// Author : Fabien Cazenave
// Licence : WTFPL
//
// US-QWERTY layout, French variant
//
// To apply this keymap, use:
// xkbcomp -w9 lafayette.xkb $DISPLAY
.DMActivity {
max-width: 1200px;
min-width: 1200px;
}
.DMActivity-header {
display: none;
}
.DMActivity-container {
height: 98vh;
}
@fabi1cazenave
fabi1cazenave / lafayette_install.py
Last active May 22, 2018 16:32
Qwerty-Lafayette installer for XKB
#!/usr/bin/env python3
import os
import shutil # backups...
import textwrap # dedent hard-coded symbol strings
from lxml import etree
from lxml.builder import E
XKB = '/usr/share/X11/xkb/'
NAME = 'lafayette'
LAYOUTS = {'fr': [{
@fabi1cazenave
fabi1cazenave / kanata.kbd
Created December 3, 2023 10:36
kanata configuration : 4×10 + 3 thumb keys
;; Quick notes about the kanata configuration syntax:
;; - the syntax is Lisp-like but totally unrelated to Lisp, so no worries :-)
;; - comments are prefixed by double-semicolons
;; - only one `defsrc` is allowed, listing all keys handled by kanata
;; - up to 25 `deflayer` are allowed, one per layer emulation
;; - the underscore symbol `_` in `deflayer` sections means "transparent",
;; i.e. the previous layer behaviour is used when pressing that key
;; `defsrc` defines the keys that will be intercepted by kanata.
;; The order of the keys matches with deflayer declarations and all deflayer