diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-06-25 19:10:20 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-06-25 19:10:43 +0200 |
| commit | e452fb6dcd21447569d88b2edb73a1bd7d194134 (patch) | |
| tree | 176e4adc34c42c6b74443135cf9c3d3f5b323183 /scripts | |
| parent | 1fafd18793d3753e9e2acae2cdf3c9f8fe02f1ae (diff) | |
| download | config-e452fb6dcd21447569d88b2edb73a1bd7d194134.tar.gz config-e452fb6dcd21447569d88b2edb73a1bd7d194134.zip | |
Copy screenshot to clipboard
Diffstat (limited to '')
| -rwxr-xr-x | scripts/dmenu-screenshot | 8 |
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 | |||
| 37 | fi | 37 | fi |
| 38 | 38 | ||
| 39 | [ -n "$t" ] && sleep 0.1 && import $op "$filepath" | 39 | [ -n "$t" ] && sleep 0.1 && import $op "$filepath" |
| 40 | spawn xbanish # This can be removed if you don't use xbanish | 40 | if command -v xclip >/dev/null 2>&1; then |
| 41 | xclip -selection clipboard -t image/png < "$filepath" | ||
| 42 | fi | ||
