You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for dragon.
No issue here just a note: This is may be of use for someone else as well (just realized I got a few points at SO for it, so why not share):
Function: Hotkey to start script -> select area -> click into drop area. Done.
It uses scrot to make a screenshot of a selected area, then dragon, to create a drag window top left, then xdotool to click and drag that to the point where you click.
Here the script
2.bin$ cat drag_into
#!/usr/bin/env bash
doc="$0 <filename|'shot'>Drags a given file to where the mouse is using dragon. Click to drop it (anywere).If filename is 'shot' then the file will be a shot of a an area to be selected(i.e. ideal to be triggered by a hotkey)."
cmd_shot="shot"
file=
exit_help () { echo -e "$doc";exit 1; }
select_shot_area () {
# create screen shot
notify-send "Select area - we'll shoot it and drag to where the mouse is."cd"$HOME/Pictures/shots/"||exit 1
rm -f "latest.png"
scrot -s '%Y-%m-%d_$wx$h_scrot.png' -e 'ln -s $f latest.png'
file="`readlink latest.png`"
}
main () {
file="$1"test -z "$file" -o "$file" == "-h"&& exit_help
eval"$(xdotool getmouselocation --shell)"# into $X and $Ytest"$file" == "$cmd_shot"&& { select_shot_area ||return 1; }
killall dragon 2>/dev/null # No accidential drops of wrong items ...
dragon --and-exit "$file"&whiletrue;do
xid="$(xdotool search --onlyvisible --class dragon | head -n 2)"test -z "$xid"||break
sleep 0.05
done
xdotool mousemove --sync -w "$xid" 1 1 mousedown 1 mousemove $X$Y
notify-send "Click to drop $file..."
}
main "$@"
The text was updated successfully, but these errors were encountered:
Hi, thanks for dragon.
No issue here just a note: This is may be of use for someone else as well (just realized I got a few points at SO for it, so why not share):
Function: Hotkey to start script -> select area -> click into drop area. Done.
It uses scrot to make a screenshot of a selected area, then dragon, to create a drag window top left, then xdotool to click and drag that to the point where you click.
Here the script
The text was updated successfully, but these errors were encountered: