From 6ee8541db0196536c935cd8c82dca1991240d38e Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 13 Feb 2021 04:04:40 +0100 Subject: profiles/workstation: Add Flameshot So far I've almost exclusively used scrot for screenshots, but most of the time I used an image manipulation program to pixelate stuff, add descriptions or draw arrows. Flameshot combines this in a single application, so I expect that from now on I can spam-post screenshots in even a higher rate than before ;-) Signed-off-by: aszlig --- tests/aszlig/programs/flameshot.nix | 26 ++++++++++++++++++++++++++ tests/default.nix | 1 + 2 files changed, 27 insertions(+) create mode 100644 tests/aszlig/programs/flameshot.nix (limited to 'tests') diff --git a/tests/aszlig/programs/flameshot.nix b/tests/aszlig/programs/flameshot.nix new file mode 100644 index 00000000..35e1d570 --- /dev/null +++ b/tests/aszlig/programs/flameshot.nix @@ -0,0 +1,26 @@ +{ nixpkgsPath, ... }: + +{ + name = "flameshot"; + + machine = { pkgs, ... }: { + imports = [ + "${nixpkgsPath}/nixos/tests/common/user-account.nix" + "${nixpkgsPath}/nixos/tests/common/x11.nix" + ]; + test-support.displayManager.auto.user = "alice"; + vuizvui.user.aszlig.programs.flameshot.enable = true; + }; + + enableOCR = true; + + testScript = '' + # fmt: off + machine.wait_for_x() + machine.wait_for_file("/home/alice/.Xauthority") + machine.succeed("xauth merge ~alice/.Xauthority") + machine.succeed('su -c "DISPLAY=:0.0 flameshot gui" - alice &') + machine.wait_for_text('(?i)capture the screen') + machine.screenshot('flameshot') + ''; +} diff --git a/tests/default.nix b/tests/default.nix index edc022ad..e47ddd46 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -10,6 +10,7 @@ let in { aszlig.dnyarri.luks2-bcache = callTest ./aszlig/dnyarri/luks2-bcache.nix; + aszlig.programs.flameshot = callTest aszlig/programs/flameshot.nix; aszlig.programs.psi = callTest aszlig/programs/psi.nix; games = { starbound = callTest ./games/starbound.nix; -- cgit 1.4.1