diff options
author | tsxv478 <atvx717@infraredcombat.xyz> | 2023-11-26 13:15:40 +0300 |
---|---|---|
committer | tsxv478 <atvx717@infraredcombat.xyz> | 2023-11-26 13:15:40 +0300 |
commit | 907335b0ef8b620e9e935e3de4d89d4602f66b25 (patch) | |
tree | 8d9d12643b75113e1fd398fef3765c744686dcbf | |
parent | abff58089633338ab463a1a3be9321f01df94e23 (diff) |
screenshot script
-rwxr-xr-x | scr | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -0,0 +1,13 @@ +#!/bin/sh + +output="$(date '+%y%m%d%H%M%S').png" +xclip_cmd="xclip -selection clipboard -t image/png" + +case "$(printf "selected area\\ncurrent window\\nfull screen\\nselected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -i -c -l 6 -p "Screenshot area?")" in + "selected area") maim -u -s img-sel-"${output}" ;; + "current window") maim -u -B -q -d 0.2 -i "$(xdotool getactivewindow)" img-win-"${output}" ;; + "full screen") maim -u -q -d 0.2 img-full-"${output}" ;; + "selected area (copy)") maim -u -s | ${xclip_cmd} ;; + "current window (copy)") maim -u -B -q -d 0.2 -i "$(xdotool getactivewindow)" | ${xclip_cmd} ;; + "full screen (copy)") maim -u -q -d 0.2 | ${xclip_cmd} ;; +esac |