Skip to content

Instantly share code, notes, and snippets.

View languitar's full-sized avatar

Johannes Wienke languitar

View GitHub Profile
@languitar
languitar / detex-languagetool.py
Last active June 16, 2020 17:55
custom latex stripping
#!/usr/bin/env python3
import os
import subprocess
import sys
dir_path = os.path.dirname(os.path.realpath(__file__))
subprocess.call('cat ' + sys.argv[-1] + ' | '
+ os.path.join(dir_path, 'detex.py') + ' | '
@languitar
languitar / set-tablet.sh
Created January 22, 2021 12:33
Script for fixing the aspect ratio of a wacom table using xsetwacom
#!/bin/bash
set -e
screen_width="$(xrandr | grep current | cut -d ' ' -f 8)"
screen_height="$(xrandr | grep current | cut -d ' ' -f 10 | cut -d , -f 1)"
dev_id="$(xsetwacom list | grep STYLUS | head -n 1 | sed -r 's/^.*id: ([0-9]*) *.*$/\1/')"
xsetwacom set "${dev_id}" ResetArea