2021-01-15 10:19:50 +01:00
|
|
|
{lib, stdenv, fetchFromGitHub, libX11, libXi, libXt, libXfixes, libXext}:
|
2016-04-19 08:42:52 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-27 22:57:51 +02:00
|
|
|
version = "1.7";
|
2019-05-29 09:55:35 +02:00
|
|
|
pname = "xbanish";
|
2016-04-19 08:42:52 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libX11 libXi libXt libXfixes libXext
|
|
|
|
];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jcs";
|
2019-09-09 01:38:31 +02:00
|
|
|
repo = pname;
|
2019-05-29 09:55:35 +02:00
|
|
|
rev = "v${version}";
|
2020-05-27 22:57:51 +02:00
|
|
|
sha256 = "0ic5f7zgc32p5g1wxas9y5h8dhik0pvsa8wmn6skdry56gw9vg9q";
|
2016-04-19 08:42:52 +02:00
|
|
|
};
|
|
|
|
|
2017-11-14 01:03:55 +01:00
|
|
|
makeFlags=[ "PREFIX=$(out)" ];
|
2016-04-19 08:42:52 +02:00
|
|
|
|
|
|
|
preInstall = ''
|
2017-11-14 01:03:55 +01:00
|
|
|
mkdir -p $out/bin $out/man/man1
|
2016-04-19 08:42:52 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Hides mouse pointer while not in use";
|
|
|
|
longDescription = ''
|
|
|
|
xbanish hides the mouse cursor when you start typing, and shows it again when
|
|
|
|
the mouse cursor moves or a mouse button is pressed. This is similar to
|
|
|
|
xterm's pointerMode setting, but xbanish works globally in the X11 session.
|
|
|
|
|
|
|
|
unclutter's -keystroke mode is supposed to do this, but it's broken[0]. I
|
|
|
|
looked into fixing it, but the unclutter source code is terrible, so I wrote
|
|
|
|
xbanish.
|
|
|
|
|
|
|
|
The name comes from ratpoison's "banish" command that sends the cursor to the
|
|
|
|
corner of the screen.
|
|
|
|
'';
|
2021-01-15 10:19:50 +01:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = [lib.maintainers.choochootrain];
|
|
|
|
platforms = lib.platforms.linux;
|
2016-04-19 08:42:52 +02:00
|
|
|
};
|
|
|
|
}
|