summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2026-06-25 19:10:20 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2026-06-25 19:10:43 +0200
commite452fb6dcd21447569d88b2edb73a1bd7d194134 (patch)
tree176e4adc34c42c6b74443135cf9c3d3f5b323183 /scripts
parent1fafd18793d3753e9e2acae2cdf3c9f8fe02f1ae (diff)
downloadconfig-e452fb6dcd21447569d88b2edb73a1bd7d194134.tar.gz
config-e452fb6dcd21447569d88b2edb73a1bd7d194134.zip
Copy screenshot to clipboard
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dmenu-screenshot8
1 files changed, 5 insertions, 3 deletions
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 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# Screenshot utility 3# Screenshot utility; if xclip is installed, it copies it to clipboard.
4# Requires: dmenu (or similar), imagemagick 4# Requires: dmenu (or similar), imagemagick, xclip (optional)
5 5
6# Usage: dmenu-screenshot [-m menu] 6# Usage: dmenu-screenshot [-m menu]
7 7
@@ -37,4 +37,6 @@ else
37fi 37fi
38 38
39[ -n "$t" ] && sleep 0.1 && import $op "$filepath" 39[ -n "$t" ] && sleep 0.1 && import $op "$filepath"
40spawn xbanish # This can be removed if you don't use xbanish 40if command -v xclip >/dev/null 2>&1; then
41 xclip -selection clipboard -t image/png < "$filepath"
42fi

Generated with cgit - Back to sebastiano.tronto.net