···1+{stdenv, fetchFromGitHub, libX11, libXi, libXt, libXfixes, libXext}:
2+3+stdenv.mkDerivation rec {
4+ version = "1.4";
5+ name = "xbanish-${version}";
6+7+ buildInputs = [
8+ libX11 libXi libXt libXfixes libXext
9+ ];
10+11+ src = fetchFromGitHub {
12+ owner = "jcs";
13+ repo = "xbanish";
14+ rev = "5cbc51a88739bc7ebe3ea3114ec423890d180146";
15+ sha256 = "0n5aiqfwx9ga8qjszymfmbnmygcracrgvvpmgll7mflp2jnvzq6j";
16+ };
17+18+ preBuild = ''
19+ makeFlagsArray+=("PREFIX=$out")
20+ '';
21+22+ preInstall = ''
23+ mkdir -p $out/bin
24+ mkdir -p $out/man/man1
25+ '';
26+27+ meta = {
28+ description = "Hides mouse pointer while not in use";
29+ longDescription = ''
30+ xbanish hides the mouse cursor when you start typing, and shows it again when
31+ the mouse cursor moves or a mouse button is pressed. This is similar to
32+ xterm's pointerMode setting, but xbanish works globally in the X11 session.
33+34+ unclutter's -keystroke mode is supposed to do this, but it's broken[0]. I
35+ looked into fixing it, but the unclutter source code is terrible, so I wrote
36+ xbanish.
37+38+ The name comes from ratpoison's "banish" command that sends the cursor to the
39+ corner of the screen.
40+ '';
41+ license = stdenv.lib.licenses.bsd3;
42+ maintainers = [stdenv.lib.maintainers.choochootrain];
43+ platforms = stdenv.lib.platforms.linux;
44+ };
45+}