scripts reorganize

This commit is contained in:
2026-10-06 22:34:05 +02:00
parent a2a056a68d
commit 0734bee219
60 changed files with 824 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# This script allows the user to make a screenshot (through slurp)
# and will then open said screenshot from the clipboard into feh
# it will also make the feh window floating, and move it to the original position of the selection
slop=$(slurp -f "%x,%y %wx%h" || exit 1)
# If the capture was cancelled, out will be empty
if [[ -n "$slop" ]]; then
# get x,y of selection
coords=$(echo "$slop" | awk -F' ' '{print $1}')
x=$(echo "$coords" | awk -F',' '{print $1}')
y=$(echo "$coords" | awk -F',' '{print $2}')
grim -g "$slop" - | wl-copy
grim -g "$slop" - | feh - -T notitle --class 'floatme' &
pid="$!"
while [[ -z $(wmctrl -lp | awk -vpid=$pid '$3==pid {print $1; exit}') ]]; do
sleep 0.05
done
hyprctl dispatch "hl.dsp.window.move({ x = \"$x\", y = \"$y\", relative = false})"
fi