Skip to content

Instantly share code, notes, and snippets.

diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
index 1a5e722..11b5c35 100644
--- a/src/wcmValidateDevice.c
+++ b/src/wcmValidateDevice.c
@@ -341,7 +341,6 @@ int wcmDeviceTypeKeys(InputInfoPtr pInfo)
return ret;
}
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 14
static InputOption*
@jigpu
jigpu / wacom_hotplug.sh
Last active September 29, 2015 23:06
Wacom configuration daemon for Linux
#!/bin/bash
# This script can be run in the background, where it will attempt to
# handle configuration of all Wacom devices that are currently plugged
# in, as well as any Wacom devices that may be plugged in later. It
# does this by monitoring the system for hotplug events and then using
# xsetwacom to apply the appropriate configuration.
#
# This should be useful for users of alternative desktop environments
# (e.g. XFCE, MATE, Enlightenment, etc.) which don't provide their own
# Wacom control panels or daemons. Its potentially also useful for even
@jigpu
jigpu / netconsole.sh
Created January 15, 2016 00:12
Setup the netconsole module to send kernel logs to a remote machine
#!/usr/bin/env bash
########
# Script to easily enable netconsole and change kernel verbosity
#
# See http://elinux.org/Debugging_py_printing
#
set -e

Keybase proof

I hereby claim:

  • I am jigpu on github.
  • I am jigpu (https://keybase.io/jigpu) on keybase.
  • I have a public key ASBLbXAup1JzyAe79ZD9FjyJG8UfJiKVZhUHkpiz9nD8WQo

To claim this, I am signing this object:

@jigpu
jigpu / git-migrate.sh
Created April 28, 2016 19:54
Migrate git repositories from 'git://' to 'https://'
#!/bin/bash
# Migrate git repositories from 'git://' to 'https://'
# Usage: git-migrate.sh [path] [...]
# Usage: find ~ -type d -exec test -d "{}/.git" \; -print0 -prune | xargs -0 git-migrate.sh > /tmp/out 2> /tmp/err
#
# Scans through the git repositories listed on the command line to
# produce a set of commands (on stdout) that can be used to migrate
# everything from using 'git://' to 'https://'. Modified URLs are
# validated to work first by performing a test clone -- any errors
@jigpu
jigpu / wacom-gnome-compat.sh
Last active September 21, 2020 17:19
Script to remap pad buttons on consumer (Bamboo) Wacom devices to be compatible with GNOME
#!/bin/bash
# Consumer Wacom devices (i.e. most Bamboo devices like the Bamboo Pen & Touch,
# Bamboo Fun, Bamboo Connect; and the newer non-pro Intuos devices like the
# Intuos Draw and Intuos Art) have a hardware button mapping that is incompatible
# with GNOME. This incompatibility prevents the GNOME Control Center's Wacom panel
# from working properly, and often also prevents at least one button from working
# entirely.
#
# This script can be used to discover a software mapping that can be applied by
@jigpu
jigpu / netconsole.sh
Last active December 1, 2016 19:53
Script to easily enable netconsole and change kernel verbosity
#!/usr/bin/env bash
########
# Script to easily enable netconsole and change kernel verbosity
#
# See http://elinux.org/Debugging_py_printing
#
set -e
@jigpu
jigpu / timestamper.py
Created March 22, 2017 22:10
Script to timestamp stdout and stderr from a process
#!/usr/bin/env python2
from __future__ import print_function
import sys
import datetime
import time
from subprocess import Popen, PIPE
from Queue import Queue, Empty
from threading import Thread
@jigpu
jigpu / capture.sh
Last active March 15, 2021 18:15
Simultaneously capture XI2, evdev, and HID data from a tablet
#!/usr/bin/env bash
# Usage: capture.sh [limit [count]]
# Simultaneously capture HID, evdev, and Xinput events from a device.
#
# limit Maximum output file size in bytes (default: 0 [unlimited])
# count Number of output files to rotate through (default: 1)
#
# This script must be run as root in order to read all events.
@jigpu
jigpu / xi2-mt-to-table.awk
Last active February 13, 2018 17:32
Transform `xinput test-xi2` multitouch output into a (potentially very wide) table of touch sequences
# Run me with `awk -f <progfile>`
/^$/ {
if (E=="") {
next;
}
for (i = 0; i < N-NN; i++) {
printf("%*s; %*s; %*s; %*s", 10, "", 10, "", 10, "", 10, "")
}
printf("%10.10s; %10.10s; %10.10s; %10.10s\n", N, E, A[0], A[1]);