Closed CubeTheThird closed 2 years ago
I can see the "better be safe than sorry" reasoning behind this suggestion. But there's also a small setback: every time p3wm
is launched, there will be a randomized suffix appended to the path like /tmp/p3wm-DEADBEEF
which might make it harder for a user to find the temporary files on their own.
Looking at my own /tmp
folder right now: tmux, by default, stores its socket at /tmp/tmux-$UID
. That looks like a good middle ground to me: easily recognizable, less chance to conflict.
Fix commited in 6e9ef11
Fix included in release 0.7.0
While unlikely, there is a slight chance that the creation of the temporary directory could fail, due to the way it's somewhat hard-coded. It seems that mktemp is already being used to create temporary files, however (IMO) this should equally be used to create the directory too.
This could be done simply as:
tmpdir=$(mktemp -d)