This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, zlib, lib, qt5, saneBackends, makeWrapper, fetchurl }: | |
stdenv.mkDerivation rec { | |
name = "zprint-bin-${version}"; | |
version = "1.0.2"; | |
src = ./.; | |
dontConfigure = true; | |
dontBuild = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn distinct-by | |
"Returns a stateful transducer that removes elements by calling f on each step as a uniqueness key. | |
Returns a lazy sequence when provided with a collection." | |
([f] | |
(fn [rf] | |
(let [seen (volatile! #{})] | |
(fn | |
([] (rf)) | |
([result] (rf result)) | |
([result input] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
from subprocess import Popen, PIPE, STDOUT | |
import time | |
HEADPHONE_EVENT = "jack/headphone" | |
p = Popen(["/run/current-system/sw/sbin/acpi_listen"], | |
stdout=PIPE, stderr=STDOUT, bufsize=1) |
OlderNewer