diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-05-18 14:34:25 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-05-18 16:21:12 +0000 |
commit | 93e90ca356baed5941e1cccf8c0d8e3e2c460e29 (patch) | |
tree | f6c26f06a2f830a3f1bab00fdc029b76be8805c6 /nixpkgs/pkgs/applications/window-managers/tinywm/default.nix | |
parent | d2753504ef2bd591ade35851dad31d3aac117e19 (diff) | |
parent | b47873026c7e356a340d0e1de7789d4e8428ac66 (diff) | |
download | nixlib-93e90ca356baed5941e1cccf8c0d8e3e2c460e29.tar nixlib-93e90ca356baed5941e1cccf8c0d8e3e2c460e29.tar.gz nixlib-93e90ca356baed5941e1cccf8c0d8e3e2c460e29.tar.bz2 nixlib-93e90ca356baed5941e1cccf8c0d8e3e2c460e29.tar.lz nixlib-93e90ca356baed5941e1cccf8c0d8e3e2c460e29.tar.xz nixlib-93e90ca356baed5941e1cccf8c0d8e3e2c460e29.tar.zst nixlib-93e90ca356baed5941e1cccf8c0d8e3e2c460e29.zip |
Merge commit 'b47873026c7e356a340d0e1de7789d4e8428ac66'
Diffstat (limited to 'nixpkgs/pkgs/applications/window-managers/tinywm/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/window-managers/tinywm/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/window-managers/tinywm/default.nix b/nixpkgs/pkgs/applications/window-managers/tinywm/default.nix new file mode 100644 index 000000000000..0e30857267bd --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/tinywm/default.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchFromGitHub +, libX11 }: + +stdenv.mkDerivation rec { + pname = "tinywm"; + version = "2014-04-22"; + + src = fetchFromGitHub { + owner = "mackstann"; + repo = pname; + rev = "9d05612f41fdb8bc359f1fd9cc930bf16315abb1"; + sha256 = "1s7r4f2d3lk1i8h089v2vyrr02hh0y9i3ihl9kqgk9s87hqw8q5b"; + }; + + buildInputs = [ libX11 ]; + + dontConfigure = true; + + buildPhase = '' + ${stdenv.cc}/bin/cc -Wall -pedantic -I${libX11}/include tinywm.c -L${libX11}/lib -lX11 -o tinywm + ''; + + installPhase = '' + install -dm755 $out/bin $out/share/doc/${pname}-${version} + install -m755 tinywm -t $out/bin/ + # The annotated source code is a piece of documentation + install -m644 annotated.c README -t $out/share/doc/${pname}-${version} + ''; + + meta = with stdenv.lib;{ + description = "A tiny window manger for X11"; + longDescription = '' + + TinyWM is a tiny window manager that I created as an exercise in + minimalism. It is also maybe helpful in learning some of the very basics + of creating a window manager. It is only around 50 lines of C. There is + also a Python version using python-xlib. + + It lets you do four basic things: + + - Move windows interactively with Alt+Button1 drag (left mouse button) + - Resize windows interactively with Alt+Button3 drag (right mouse button) + - Raise windows with Alt+F1 (not high on usability I know, but I needed a + keybinding in there somewhere) + - Focus windows with the mouse pointer (X does this on its own) + ''; + homepage = "http://incise.org/tinywm.html"; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = libX11.meta.platforms; + }; +} |