From 4291d178be8f663fb31568b3adf7dd4968f4ab1c Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 18 Sep 2019 13:15:32 +0200 Subject: [PATCH] wlr-randr: init at unstable-2019-03-21 This is a simple clone of `xrandr` for wayland and is recommended by sway's wiki[1] as replacement for `xrandr`. Although the package is not stable yet, it's written by some sway developers and appears to work pretty well. When adding an additional monitor to your laptop (with the laptop being "below" the monitor), this can be configured like this: ``` wlr-randr --output eDP-1 --on --pos 0,1080 --output HDMI-A-1 --on --pos 0,0 ``` [1] https://github.com/swaywm/sway/wiki/i3-Migration-Guide#common-xorg-apps-used-on-i3-with-wayland-alternatives --- pkgs/tools/misc/wlr-randr/default.nix | 23 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/tools/misc/wlr-randr/default.nix diff --git a/pkgs/tools/misc/wlr-randr/default.nix b/pkgs/tools/misc/wlr-randr/default.nix new file mode 100644 index 000000000000..c9f439646961 --- /dev/null +++ b/pkgs/tools/misc/wlr-randr/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchFromGitHub, meson, ninja, cmake, pkgconfig, wayland }: + +stdenv.mkDerivation rec { + pname = "wlr-randr"; + version = "unstable-2019-03-21"; + + src = fetchFromGitHub { + owner = "emersion"; + repo = pname; + rev = "c4066aa3249963dc7877119cffce10f3fa8b6304"; + sha256 = "1ahw4sv07xg5rh9vr7j28636iaxs06vnybm3li6y8dz2sky7hk88"; + }; + + nativeBuildInputs = [ meson ninja cmake pkgconfig ]; + buildInputs = [ wayland ]; + + meta = with stdenv.lib; { + license = licenses.mit; + description = "An xrandr clone for wlroots compositors"; + homepage = "https://github.com/emersion/wlr-randr"; + maintainers = with maintainers; [ ma27 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 79c6017df630..58a26fa4e0ef 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18722,6 +18722,8 @@ in super-productivity = callPackage ../applications/networking/super-productivity { }; + wlr-randr = callPackage ../tools/misc/wlr-randr { }; + wlroots = callPackage ../development/libraries/wlroots { }; sway = callPackage ../applications/window-managers/sway { };