From e93258dde12fa334e29d8b9c83f201de72c936de Mon Sep 17 00:00:00 2001 From: Flinner Date: Fri, 6 Aug 2021 02:39:44 +0300 Subject: [PATCH] feat: add qutebrowser faster launch to bin --- bin/bin/qutebrowser | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 bin/bin/qutebrowser diff --git a/bin/bin/qutebrowser b/bin/bin/qutebrowser new file mode 100755 index 0000000..836d0eb --- /dev/null +++ b/bin/bin/qutebrowser @@ -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" "$@" & +