From e452fb6dcd21447569d88b2edb73a1bd7d194134 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 25 Jun 2026 19:10:20 +0200 Subject: Copy screenshot to clipboard --- scripts/dmenu-screenshot | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'scripts/dmenu-screenshot') diff --git a/scripts/dmenu-screenshot b/scripts/dmenu-screenshot index e2e8adf..d2fbbf7 100755 --- a/scripts/dmenu-screenshot +++ b/scripts/dmenu-screenshot @@ -1,7 +1,7 @@ #!/bin/sh -# Screenshot utility -# Requires: dmenu (or similar), imagemagick +# Screenshot utility; if xclip is installed, it copies it to clipboard. +# Requires: dmenu (or similar), imagemagick, xclip (optional) # Usage: dmenu-screenshot [-m menu] @@ -37,4 +37,6 @@ else fi [ -n "$t" ] && sleep 0.1 && import $op "$filepath" -spawn xbanish # This can be removed if you don't use xbanish +if command -v xclip >/dev/null 2>&1; then + xclip -selection clipboard -t image/png < "$filepath" +fi -- cgit v1.3