Skip to content

Instantly share code, notes, and snippets.

View monstermunchkin's full-sized avatar

Thomas Hipp monstermunchkin

View GitHub Profile
@monstermunchkin
monstermunchkin / nofocusmm.sh
Created April 27, 2012 09:03
Sending keycodes to unfocused window (e.g. Spotify)
#!/bin/bash
KEY_NEXT=XF86AudioNext # keycode: 171
KEY_PLAY=XF86AudioPlay # keycode: 172
KEY_PREV=XF86AudioPrev # keycode: 173
# the window id of Spotify
SPOTIFY_WID=$(xdotool search --name "Spotify - Linux Preview")
if [[ -n ${SPOTIFY_WID} ]]; then
@monstermunchkin
monstermunchkin / mkrom.sh
Created August 8, 2012 11:44
Create rooted image from factory image
#!/bin/bash -e
factory_img='soju-jro03e-factory-c9f5a67d.tgz'
su_bin='su-bin-3.1.1-arm-signed.zip'
mkdir -pv ~/custom_rom
cd ~/custom_rom
wget -nc "https://dl.google.com/dl/android/aosp/${factory_img}"
@monstermunchkin
monstermunchkin / multimon.sh
Last active December 10, 2015 06:39
Multi-monitor setup depending on location. The location is determined by the ESSID.
#!/bin/bash -e
monsetup="$(xrandr)"
int_mon="$(grep -Eo 'LVDS[[:digit:]]' <<< "${monsetup}")"
ext_mon="$(grep -Eo 'VGA[[:digit:]]' <<< "${monsetup}")"
if grep -Eq 'VGA[[:digit:]] connected' <<< "${monsetup}"; then
# where am I?
at_work=0
for conn in $(sudo netcfg current); do
@monstermunchkin
monstermunchkin / batnag.py
Last active December 20, 2015 11:19
Low battery warning with i3-nagbar
#!/usr/bin/env python
import signal
import subprocess
import time
import sys
test = False

Keybase proof

I hereby claim:

  • I am monstermunchkin on github.
  • I am monstermunchkin (https://keybase.io/monstermunchkin) on keybase.
  • I have a public key ASC8CKvJTRkMx8pP45f5tXjb_-5k_xMjgBVxMjkhbqHwWAo

To claim this, I am signing this object: