Files
nix/scripts/screenshot-selection.sh
2026-03-27 23:14:29 +02:00

12 lines
360 B
Bash
Executable File

#!/usr/bin/env bash
# do NOT use $PATH for this!!
SS_PATH=$(timeout 30s bun run /etc/nixos/scripts/bin/handleScreenshot.ts selection)
echo "$SS_PATH"
if [[ -n "$SS_PATH" && "$SS_PATH" == /home/kris/Pictures/Screenshots/* ]]; then
wl-copy < "$SS_PATH"
notify-send -a dotfiles-screenshot -i "$SS_PATH" "Screenshot" "selection copied to clipboard!"
fi