scrot does not overwrite files by default
xcymax opened this issue · comments
The sharenix-section
and sharenix-window
scripts weren't working for me and after looking into it I found why.
They are creating a temp file first and then overwriting. However scrot does not overwrite by default and instead it was writing to a new number appended file.
Fix is simple, add the -o flag:
scrot -o -u $sharenixtmp || exit $?
oh, makes sense, weird that your mktemp would generate 2 files with the same name though