From 0bd150185551b6d8835d022c15a5f6e832d51113 Mon Sep 17 00:00:00 2001 From: venomade Date: Wed, 11 Feb 2026 11:42:58 +0000 Subject: Asahi Soft reset of dotfiles specific to Asahi, Sway and Neovim. --- .local/bin/take-slurpshot | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 .local/bin/take-slurpshot (limited to '.local/bin/take-slurpshot') 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" -- cgit 1.4.1-2-gfad0