feat: add qutebrowser faster launch to bin

This commit is contained in:
Flinner 2021-08-06 02:39:44 +03:00
parent af82f723de
commit e93258dde1
Signed by: flinner
GPG Key ID: 95CE0DA7F0E58CA6
1 changed files with 16 additions and 0 deletions

16
bin/bin/qutebrowser Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
# initial idea: Florian Bruhin (The-Compiler)
# author: Thore Bödecker (foxxx0)
_url="$1"
_qb_version='1.0.4'
_proto_version=1
_ipc_socket="${XDG_RUNTIME_DIR}/qutebrowser/ipc-$(echo -n "$USER" | md5sum | cut -d' ' -f1)"
_qute_bin="/usr/bin/qutebrowser"
printf '{"args": ["%s"], "target_arg": null, "version": "%s", "protocol_version": %d, "cwd": "%s"}\n' \
"${_url}" \
"${_qb_version}" \
"${_proto_version}" \
"${PWD}" | socat -lf /dev/null - UNIX-CONNECT:"${_ipc_socket}" || "$_qute_bin" "$@" &