From 057a7d24ecd2d4360c59c77b71ccd85b33cd7785 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 27 Jan 2026 07:53:00 -0600 Subject: feat(hyprland): screenshot script with fuzzel menu Replaced inline grim/satty keybindings with screenshot script that captures to file then presents fuzzel menu: Copy Path, Copy Image, or Annotate. Bindings: $mod+S (region), $mod+Print (fullscreen). --- dotfiles/hyprland/.local/bin/screenshot | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 dotfiles/hyprland/.local/bin/screenshot (limited to 'dotfiles/hyprland/.local/bin/screenshot') diff --git a/dotfiles/hyprland/.local/bin/screenshot b/dotfiles/hyprland/.local/bin/screenshot new file mode 100755 index 0000000..3e61291 --- /dev/null +++ b/dotfiles/hyprland/.local/bin/screenshot @@ -0,0 +1,23 @@ +#!/bin/sh +# Screenshot tool with fuzzel menu +# Usage: screenshot [region|fullscreen] + +DIR="$HOME/pictures/screenshots" +mkdir -p "$DIR" +FILE="$DIR/$(date +%Y.%m.%d-%H%M%S).png" + +# Capture +case "${1:-region}" in + region) grim -g "$(slurp)" "$FILE" || exit 1 ;; + fullscreen) grim "$FILE" || exit 1 ;; +esac + +# Menu +CHOICE=$(printf '󰅍 Copy Path\n󰋩 Copy Image\n󰏫 Annotate' | \ + fuzzel --dmenu --prompt "Screenshot: " --width 20 --lines 3) + +case "$CHOICE" in + *"Copy Path"*) echo -n "$FILE" | wl-copy ;; + *"Copy Image"*) wl-copy < "$FILE" ;; + *"Annotate"*) satty --filename "$FILE" --output-filename "$FILE" --copy-command wl-copy ;; +esac -- cgit v1.2.3