Skip to content

Instantly share code, notes, and snippets.

View gwash.c
#include "gwash.h"
#include "mousekey.h"
const uint16_t PROGMEM fn_actions[] = {
[FN_SWP_HNDS] = ACTION_SWAP_HANDS_TAP_TOGGLE(),
[1] = ACTION_LAYER_TAP_TOGGLE(1)
};
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_SCOLON_COLON] = ACTION_TAP_DANCE_DOUBLE(KC_SCOLON,KC_COLN),
@gwash
gwash / keymap.c
Last active Aug 26, 2017
qmk gwash kemap gist
View keymap.c
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "version.h"
#define _______ KC_TRNS
//linux keycodes
#define KC_FILEMANAGER KC_MY_COMPUTER
#define KC_TOOLS KC_F13
@gwash
gwash / CHM viewer
Last active Aug 29, 2015
Shell CHM file handler using Archmage
View CHM viewer
#!/bin/sh
#by M Rawash <mrawash@gmail.com>
#requires archmage
[[ $BROWSER ]] || BROWSER='w3m -F'
if test "$1" = "-l"; then
shift
PORT=$((10000+$RANDOM))
archmage -p $PORT "$@" &
@gwash
gwash / tabcloseduplicates.penta
Created Oct 8, 2012
pentadactyl command to close duplicate tabs
View tabcloseduplicates.penta
com -d "Delete duplicate tabs" tabcloseduplicates,tabclosed -js let seen={},vtabs=tabs.visibleTabs,i=vtabs.length;while(i--){let loc=vtabs[i].linkedBrowser.contentDocument.location.href||"";if(Object.prototype.hasOwnProperty.call(seen, loc)){config.tabbrowser.removeTab(vtabs[i]);}else{seen[loc]=true;}}
@gwash
gwash / gist:1685143
Created Jan 26, 2012
relinker command for ranger
View gist:1685143
class relink(Command):
"""
:relink <newpath>
Changes the linked path of the currently highlighted symlink to <newpath>
"""
def execute(self):
from ranger.fsobject import File
@gwash
gwash / notsubtle.lua
Last active Sep 28, 2015
Subtle-like window management for notion
View notsubtle.lua
-- Copyright (c) 2011, M Rawash <mrawash@gmail.com>
--
-- Released under the most recent GPL <http://www.gnu.org/licenses/gpl.html>
--
-- Subtle(wm)-like window management
--
function notsubtle(cf,pos)
local cmx = assert(cf:mx_current())
local cws = notioncore.find_manager(cf,'WGroupWS')