diff options
| author | venomade <venomade@venomade.com> | 2026-02-11 11:42:58 +0000 |
|---|---|---|
| committer | venomade <venomade@venomade.com> | 2026-02-11 11:42:58 +0000 |
| commit | 0bd150185551b6d8835d022c15a5f6e832d51113 (patch) | |
| tree | 10bf3f3443df49a44eb47b328b73b7e76b0a4924 /.local/bin/take-slurpshot | |
| parent | 8d688d1107c46b6dfdcaf02fa5c9c4c8a4640e65 (diff) | |
Asahi
Soft reset of dotfiles specific to Asahi, Sway and Neovim.
Diffstat (limited to '.local/bin/take-slurpshot')
| -rwxr-xr-x | .local/bin/take-slurpshot | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/.local/bin/take-slurpshot b/.local/bin/take-slurpshot new file mode 100755 index 0000000..f30fabe --- /dev/null +++ b/.local/bin/take-slurpshot @@ -0,0 +1,18 @@ +#!/bin/bash + +# Generate base filename with timestamp +base_filename=$(date +"%m-%d-%Y_%H-%M-%S") +extension=".png" + +# Initialize full filename +filename="${base_filename}${extension}" +counter=1 + +# Check if file exists and append incremental suffix if needed +while [[ -e "$filename" ]]; do + filename="${base_filename}-${counter}${extension}" + ((counter++)) +done + +# Output the available filename +grim -g "$(slurp)" "$HOME/Pictures/Screenshots/$filename" |
