2021-01-15 22:18:51 +00:00
|
|
|
{lib, stdenv, fetchFromGitHub, libX11, libXi, libXt, libXfixes, libXext}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "1.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "xbanish";
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libX11 libXi libXt libXfixes libXext
|
|
|
|
];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jcs";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "sha256-jwCoJ2shFGuJHhmXmlw/paFpMl5ARD6e5zDnDZHlsoo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
makeFlags=[ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/bin $out/man/man1
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 22:18:51 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = [lib.maintainers.choochootrain];
|
|
|
|
platforms = lib.platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "xbanish";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|