Still not 100% sure how I want to tokenize this up. For now if I reference a script in a config file, I should probably include it so the env is complete.
13 lines
480 B
Text
Executable file
13 lines
480 B
Text
Executable file
# Make sure our dir is here
|
|
mkdir -p ${XDG_RUNTIME_DIR}/screenshots/
|
|
|
|
# Take a full screenshot of the focused display, display it
|
|
grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | swayimg -f - &
|
|
swayimg_pid=$!
|
|
sleep 0.5
|
|
|
|
# Activate slurp's rectangular select mode to snip a segment of the screenshot we took
|
|
grim -g "$(slurp -dc ff0000)" ${XDG_RUNTIME_DIR}/screenshots/shot_$(date +%s).png
|
|
|
|
# Kill the full screen screenshot display
|
|
kill $swayimg_pid
|