Either is guaranteed to exist by POSIX, as opposed to ~/tmp. --- surf-open.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/surf-open.sh b/surf-open.sh index c22edc2..4dfce4a 100755 --- a/surf-open.sh +++ b/surf-open.sh @@ -3,7 +3,7 @@ # See the LICENSE file for copyright and license details. # -xidfile="$HOME/tmp/tabbed-surf.xid" +xidfile="${TMPDIR=/tmp}/tabbed-surf-$USER.xid" uri="" if [ "$#" -gt 0 ]; @@ -12,6 +12,8 @@ then fi runtabbed() { + touch "$xidfile" + chmod 600 "$xidfile" tabbed -dn tabbed-surf -r 2 surf -e '' "$uri" >"$xidfile" \ 2>/dev/null & } -- 2.33.3