123456789101112131415161718192021222324252627282930 |
- #!/bin/sh
- mkdir -p "/run/user/"$(id -u)""
- xidfile="/run/user/"$(id -u)"/glinks-tabbed.xid"
- if [ "$#" -gt 0 ];
- then
- uri="$1"
- fi
- runtabbed() {
- tabbed -cdn Links -r 3 surf -N -e '' "$uri" >"$xidfile" \
- 2>/dev/null &
- }
- if [ ! -r "$xidfile" ];
- then
- runtabbed
- else
- xid=$(cat "$xidfile")
- xprop -id "$xid" >/dev/null 2>&1
- if [ $? -gt 0 ];
- then
- runtabbed
- else
- surf -N -e "$xid" "$uri" >/dev/null 2>&1 &
- fi
- fi
|