Skip to content

Instantly share code, notes, and snippets.

@ampling
ampling / soundmenu
Created Oct 31, 2016
A soundboard for dmenu.
View soundmenu
#!/usr/bin/env bash
shopt -s nullglob globstar failglob
set -euo pipefail
arg1=${1:-}
arg2=${2:-}
notifyit=0
if [[ '--notify' == "$arg1" ]] || [[ '--notify' == "$arg2" ]]; then
View keybase.md

Keybase proof

I hereby claim:

  • I am ampling on github.
  • I am ampling (https://keybase.io/ampling) on keybase.
  • I have a public key whose fingerprint is A357 EE52 65EC 5534 57B4 E59D 15C5 26F0 31C5 AA98

To claim this, I am signing this object:

View plaster._inlet
def _inlet():
'''
Reads file in one of four ways: argument, Xclip, input, and stdin.
Returns content in bytes.
'''
try:
## Optional clipboard feature.
if args.Xclip:
if not pyperclip:
exit('e: missing python-pyperclip')
View plaster._inlet
def _inlet():
'''
Reads file in one of four ways: argument, Xclip, input, and stdin.
Returns content in bytes.
'''
try:
if args.content:
content_path = args.content
with open(content_path, 'rb') as i:
content = i.read()