How to use xdotool - automation GUI application
Task
To refresh Shotwell thumbnails cache.
Description
Shotwell create thumbnail for every picture it display so when you scroll through gallery it will rebuild it. Problem is when storage is slow (SMB over WiFi) it takes some time.
Idea
Force Shotwell to scroll all gallery
Solution
Find id of Shotwell window:
jaqb@linux:~$ xdotool search --onlyvisible --name shotwell 2098671 2099432
As you can see sometimes there are two of them (I don't know why)
Switch to that window an send Page_Down / Next key check.
jaqb@linux:~$ xdotool windowactivate 2099432 --sync key Next
Repeat many many (1000) times but give some time (22s) to refresh all visible pictures. I've prepared bash script:
jaqb@linux:~$ cat ./shotwell-cache-refresh.bash #!/bin/bash xdotool windowactivate --sync $1 for x in `seq 1000`; do sleep 22 xdotool key Next done EOF
After confirmation which identifier is good (2099432) you can run:
jaqb@ubuntu-16:~$ ./shotwell-cache-refresh.bash 209943
and do something more interesting than just typing Page_Down key for more than 6h.
Kommentare
Bitte melden Sie sich Logan oder registrieren Sie sich um kommentieren zu können.