diff options
| author | tv <tv@krebsco.de> | 2026-12-02 03:09:31 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-12-02 03:09:31 +0000 |
| commit | ee7741a9a3cef6c391856ce704d576ff16f9cb79 (patch) | |
| tree | 4e71d591c18e8fd81fda1156e10914240de249db /pkgs/simple/flameshot-once/default.nix | |
| parent | a092eb5a69fe3b52e08ef5f2729d0981be2e893d (diff) | |
flameshot-once: buttons
The option that was commented out, back, with its encoding as QSettings
reads it (QList<int> 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.
Diffstat (limited to 'pkgs/simple/flameshot-once/default.nix')
| -rw-r--r-- | pkgs/simple/flameshot-once/default.nix | 28 |
1 files changed, 28 insertions, 0 deletions
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 '/\<iterableButtonTypes = {/,/^}/p' | + ${pkgs.gcc}/bin/cpp -DENABLE_IMGUR | + ${pkgs.coreutils}/bin/tr , \\n | + ${pkgs.gnused}/bin/sed -rn 's/^ *CaptureTool::(TYPE_[A-Z_]+).*/"\1"/p' | + ${pkgs.coreutils}/bin/sort | + ${placeholder "out"}/bin/prefix " $indent" + ''; + }; "/bin/get-recognizedGeneralOptions" = { executable = true; text = /* sh */ '' |
