From 8bbdb169082ace00c43edf65cd2c4ff9676d04db Mon Sep 17 00:00:00 2001 From: sadan <117494111+sadan4@users.noreply.github.com> Date: Wed, 5 Jun 2024 10:41:46 -0400 Subject: [PATCH] 164 current 2024-06-05 10:41:29 24.11.20240529.ad57eef 6.9.2-zen1 * --- boxes/desktop/home.nix | 9 ++------- common/pkgs.nix | 2 +- common/programs/flameshot.nix | 11 +++++++++++ 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 common/programs/flameshot.nix diff --git a/boxes/desktop/home.nix b/boxes/desktop/home.nix index 472cb32..463d4be 100644 --- a/boxes/desktop/home.nix +++ b/boxes/desktop/home.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, inputs, ... }: let + flameshot = import ../../common/programs/flameshot.nix {inherit config;}; _s1 = import ../../common/sops.nix { inherit config; }; files = import ../../common/files.nix { inherit config; }; shell = import ../../common/shell.nix { inherit config pkgs; }; @@ -53,13 +54,7 @@ nixpkgs.config.allowInsecurePredicate = (pkg: true); services = { - flameshot = { - enable = true; - settings.General.showDesktopNotification = false; - settings.General.startupLaunch = false; - # settings.Shortcuts.TYPE_IMAGEUPLOADER = ""; - # settings.Shortcuts.TYPE_COPY = "Return"; - }; + inherit flameshot; }; # This value determines the Home Manager release that your configuration is # compatible with. This helps avoid breakage when a new Home Manager release diff --git a/common/pkgs.nix b/common/pkgs.nix index 044a298..e848872 100644 --- a/common/pkgs.nix +++ b/common/pkgs.nix @@ -127,7 +127,7 @@ in set -euo pipefail TEMP=$(mktemp) flameshot gui -s -r > $TEMP - (tesseract $TEMP - --oem 1 -l eng | copy )|| copy "OCR RETUNRED NON-ZERO" + (tesseract $TEMP /dev/null --oem 1 -l eng | copy )|| copy "OCR RETUNRED NON-ZERO" '') ]; wsl = with pkgs;[ diff --git a/common/programs/flameshot.nix b/common/programs/flameshot.nix new file mode 100644 index 0000000..d14750e --- /dev/null +++ b/common/programs/flameshot.nix @@ -0,0 +1,11 @@ +{config}: { + enable = true; + settings = { + General = { + savePath="/home/${config.home.username}/ss/"; + saveAsFileExtension=".png"; + showDesktopNotification=false; + startupLaunch=true; + }; + }; +}