From 2c485ce2b43bd810a88278215b771136a2a17881 Mon Sep 17 00:00:00 2001 From: Martin Michalec Date: Wed, 11 Feb 2026 05:47:33 +0300 Subject: add scripts --- private_dot_local/bin/executable_sway-shot-window-or-selection | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 private_dot_local/bin/executable_sway-shot-window-or-selection (limited to 'private_dot_local/bin/executable_sway-shot-window-or-selection') diff --git a/private_dot_local/bin/executable_sway-shot-window-or-selection b/private_dot_local/bin/executable_sway-shot-window-or-selection new file mode 100644 index 0000000..404764e --- /dev/null +++ b/private_dot_local/bin/executable_sway-shot-window-or-selection @@ -0,0 +1,5 @@ +#!/bin/sh + +geom=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp -b 303030AA -B 303030AA) +file=$(date "+$HOME/multimedia/screenshots/%Y%m%d-%H%M%S.png") +grim -g "$geom" - | tee $file | wl-copy -- cgit v1.3