Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# requirements: xwininfo, xprop
# usage:
# - (recommended) bind this script to a key in sway/orbment
# - run the script to get a bunch of debug information about the currently displayed x windows written to a logfile
# - pro-tip: run it before and after opening a window/dialog/tooltip, then do a diff of both logs to get just what you need
log=~/docs/logs/xwininfo/$(date +%s).log
@robotanarchy
robotanarchy / synergy-over-ssh.sh
Last active August 29, 2015 14:21
Synergy as x2x over SSH replacement
#!/bin/sh
#
# Author: robotanarchy
# Source: http://git.io/synergy-over-ssh
# License: Public Domain
#
# This script is an alterantive to x2x over ssh, for connecting two
# machines with synergy over SSH and sharing mouse and keyboard from
# the local machine to the remote machine.
#
@robotanarchy
robotanarchy / filetypes.AutoIt3.conf
Last active August 29, 2015 14:19
AutoIt3 Syntax highlighting for Geany (Quick 'n' dirty!)
# This is a quick 'n' dirty made syntax highlighting file for Geany.
# It is based on the ASM-lexer with all its limitations.
#
# Source:
# https://gist.github.com/robotanarchy/dcc399645e4f36be5de7
#
# Installation:
# - Save this file as ~/.config/geany/filedefs/filetypes.AutoIt3.conf
# - add this line to "filetype_extensions.conf" (inside Geany menu Tools
# / Config Files):
@robotanarchy
robotanarchy / pdf-remove-pw.sh
Created January 22, 2015 16:38
qpdf wrapper for easy pdf decryption
#!/bin/bash
input="$1"
output="_decrypted_$input"
if [[ $# != 2 ]] || [[ ! -f "$input" ]]; then
echo "Syntax: $(basename $0) INPUTFILE.PDF PASSWORD"
exit 1
fi
@robotanarchy
robotanarchy / pygmentize.sh
Last active August 29, 2015 14:11 — forked from michih57/pygmentize
add global flag to regex
#!/bin/bash
#
# This script caches the pygmentize output.
# Original script by michih57
#
# Modifications by robotanarchy:
# - remove real_pygmentize variable
# - store hash in 'out' folder
# - replace '\$' with '$' to fix syntax highlighting in editors
# - also cache style information
@robotanarchy
robotanarchy / xspfcat.js
Last active August 29, 2015 14:06
xspfcat
#!/usr/bin/node
// License: Public Domain
if(process.argv.length != 3)
{
console.log("Lists XSPF files as fb2k-style text playlists.");
console.log("Syntax: xspfcat.js playlist.xspf");
process.exit(1);
}