From 3bcd7cfb246c84de600802b750157ae560a712c6 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Dec 2026 03:09:31 +0000 Subject: flameshot-once: buttons The option that was commented out, back, with its encoding as QSettings reads it (QList in a @Variant), and the tools that list the button types, which generated the tables for flameshot 15: TYPE_INVERT is iterable now, and get-iterableButtonTypes defines ENABLE_IMGUR, as our flameshot does. --- pkgs/simple/flameshot-once/default.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'pkgs/simple/flameshot-once/default.nix') diff --git a/pkgs/simple/flameshot-once/default.nix b/pkgs/simple/flameshot-once/default.nix index 20a69c74..68a1ed6f 100644 --- a/pkgs/simple/flameshot-once/default.nix +++ b/pkgs/simple/flameshot-once/default.nix @@ -76,6 +76,34 @@ pkgs.symlinkJoin { } // { dev = pkgs.write "flameshot-once-tools" { + "/bin/get-buttonTypes" = { + executable = true; + text = /* sh */ '' + #! ${pkgs.dash}/bin/dash + indent=$(${placeholder "out"}/bin/indent-of buttonTypes) + src=${cfg.package.src}/src/tools/capturetool.h + ${pkgs.coreutils}/bin/cat "$src" | + ${pkgs.gnused}/bin/sed -nr ' + s/^\s*(TYPE_\S+)\s*=\s*([0-9]+),/\1 = \2;/p + ' | + ${placeholder "out"}/bin/prefix " $indent" + ''; + }; + "/bin/get-iterableButtonTypes" = { + executable = true; + text = /* sh */ '' + #! ${pkgs.dash}/bin/dash + indent=$(${placeholder "out"}/bin/indent-of iterableButtonTypes) + src=${cfg.package.src}/src/widgets/capture/capturetoolbutton.cpp + ${pkgs.coreutils}/bin/cat "$src" | + ${pkgs.gnused}/bin/sed -n '/\