Files
dotfiles-i3/i3/scripts/i3-sc-window.sh
T
2026-01-17 07:07:25 +04:00

8 lines
317 B
Bash
Executable File

#!/bin/bash
window_id=$(xdotool getactivewindow)
window_name=$(xprop -id "$window_id" WM_CLASS | cut -d '"' -f 4)
temp_file="/tmp/i3-sc-window.png"
maim -i "$window_id" "$temp_file"
echo "file://$temp_file" | xclip -selection clipboard -t text/uri-list
notify-send "Screenshot" "Captured window: $window_name" -u low