add scripts/qutebrowser
This commit is contained in:
parent
d8967e18c2
commit
20c8605b9c
10
scripts/qutebrowser
Executable file
10
scripts/qutebrowser
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
url="$1"
|
||||
ver='1.6.3'
|
||||
proto=1
|
||||
sock="$XDG_RUNTIME_DIR/qutebrowser/ipc-$(printf "%s" "$USER" | md5sum | cut -d\ -f1)"
|
||||
bin=$(env PATH="$(echo "$PATH" | sed "s|$(dirname "$0"):||g")" sh -c 'command -v qutebrowser')
|
||||
fmt='{"args": ["%s"], "target_arg": null, "version": "%s", "protocol_version": %d, "cwd": "%s"}\n'
|
||||
|
||||
printf "$fmt" "$url" "$ver" "$proto" "$PWD" | nc -U "$sock" 2>/dev/null || "$bin" "$@" &
|
Loading…
Reference in New Issue
Block a user