From patchwork Mon Jul 25 20:54:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antero Mejr X-Patchwork-Id: 40959 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5EE0127BBEA; Mon, 25 Jul 2022 21:55:24 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D7CF327BBE9 for ; Mon, 25 Jul 2022 21:55:23 +0100 (BST) Received: from localhost ([::1]:37398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oG56i-00028I-0L for patchwork@mira.cbaines.net; Mon, 25 Jul 2022 16:55:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oG56V-000285-0d for guix-patches@gnu.org; Mon, 25 Jul 2022 16:55:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33563) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oG56U-0003uT-O0 for guix-patches@gnu.org; Mon, 25 Jul 2022 16:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oG56U-0004H7-JE for guix-patches@gnu.org; Mon, 25 Jul 2022 16:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56770] [PATCH] gnu: Add grimshot. Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Jul 2022 20:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56770 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56770@debbugs.gnu.org Cc: Antero Mejr X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165878249116409 (code B ref -1); Mon, 25 Jul 2022 20:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Jul 2022 20:54:51 +0000 Received: from localhost ([127.0.0.1]:51545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oG56I-0004Gb-TG for submit@debbugs.gnu.org; Mon, 25 Jul 2022 16:54:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:52936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oG56H-0004GQ-8P for submit@debbugs.gnu.org; Mon, 25 Jul 2022 16:54:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oG56H-00027j-2q for guix-patches@gnu.org; Mon, 25 Jul 2022 16:54:49 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:45376) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1oG56F-0003rm-1V for guix-patches@gnu.org; Mon, 25 Jul 2022 16:54:48 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4LsC3524Mrz9sTH for ; Mon, 25 Jul 2022 22:54:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1658782481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=G2J39Xzi8xDOtJi9e4mlawiSN0PEQs+b6dj0J/juHNs=; b=xUN2KiFKqpMVWB2ibN93WHjYLFlWcHJt2FsbaHvcJQ9Nf9y3jlekqK1lRw56OxIfqKtpTb 2xFQHdPOe3a15pFLzecL/KHrYruJrMLGX++8IS+4cJhuJsDmwuduyy+Heh9ADNkuatZWby uWXunJ2nAtK3vEKUBLoD5YDQpdeihXEQprYFL4WDZa7c3EHd2sPZEKB3ZGfPY7YgqKBFKv mwgRjEg3yYZNdlPclUQyIWbWsUIsZ4+6O8KfyqmkxBo+t5Bl6PPXrGFdxMn6iZmhJg6Yuz TTQ5P67AMH+0+PH00HLpsVXEwY3cLJ1i3X0xj69NVHGMLTlV88b3h09OhzZllA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1658782479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=G2J39Xzi8xDOtJi9e4mlawiSN0PEQs+b6dj0J/juHNs=; b=c36A+ZHOEjPnapAfWT1tN1tLqiL0uFRYhouBGg1saQBG7C/xoXk110HS0XW4xgNMLXkLLD 4RBdVleiMXi896IRXSqus2ktI33a37zdP0HerQIm1H/IwkDFrIZfvekjk+SFMUaJB98Pla WfZi4/ze5XSWc7QPsur+ShVgq8mpAN7Zz7ZxRHpIaSIJW2JNI28hDXIrtJg7hQzKl13qX8 gewL4soVLs+96ekr9cPUCWSPo5/ZbmDMi2eT6tBxYNWw0PhcL8ATrPhH3WgOnSGwG4S36y Dre6t83VyL8iJ8e4xFm3xGfZbHxan+0+LKo4alm4kDGJaLuPXRfhoKj81CDNUA== Date: Mon, 25 Jul 2022 16:54:12 -0400 Message-Id: <20220725205412.336878-1-antero@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: e43800a5b831aac7d70 X-MBO-RS-META: t7c83yet9g8icm5yt7m7dhd83o7o3toe X-Rspamd-Queue-Id: 4LsC3524Mrz9sTH Received-SPF: pass client-ip=80.241.56.152; envelope-from=antero@mailbox.org; helo=mout-p-102.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Antero Mejr X-ACL-Warn: , Antero Mejr via Guix-patches X-Patchwork-Original-From: Antero Mejr via Guix-patches via From: Antero Mejr X-getmail-retrieved-from-mailbox: Patches * gnu/packages/wm.scm (grimshot): New variable. --- gnu/packages/wm.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 8fef7de77b..9aad6c1c37 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -2742,3 +2742,38 @@ (define-public avizo "Avizo is a simple notification daemon for Sway, mainly intended to be used for multimedia keys.") (license license:gpl3+))) + +(define-public grimshot + (package + (inherit sway) + (name "grimshot") + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (copy-recursively + (string-append #$(package-source this-package) "/contrib") ".") + (substitute* "grimshot" + (("date ") (string-append #$coreutils "/bin/date ")) + (("jq ") (string-append #$jq "/bin/jq ")) + (("swaymsg ") (string-append #$sway "/bin/swaymsg ")) + (("notify-send ") (string-append #$libnotify "/bin/notify-send ")) + (("grim ") (string-append #$grim "/bin/grim ")) + (("slurp ") (string-append #$slurp "/bin/slurp ")) + (("wl-copy ") (string-append #$wl-clipboard "/bin/wl-copy "))) + (delete-file "grimshot.1") + (system + (string-append #$scdoc "/bin/scdoc < grimshot.1.scd > grimshot.1")) + (install-file "grimshot" (string-append #$output "/bin")) + (install-file "grimshot.1" + (string-append #$output "/usr/share/man/man1"))))) + (native-inputs (list scdoc)) + (inputs (list coreutils grim jq libnotify sway wl-clipboard)) + (synopsis "Screenshot utility for the Sway window manager") + (description "Grimshot is a screenshot utility for @code{sway}. It provides +an interface over @code{grim}, @code{slurp} and @code{jq}, and supports storing +the screenshot either directly to the clipboard using @code{wl-copy} or to a +file.")))