summaryrefslogtreecommitdiff
path: root/mac/.qutebrowser/userscripts/qr
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-09-11 17:28:34 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-09-11 17:28:34 +0900
commitfc3af8a3b3af5e3cd35c9c6b075e71e9ce43eb69 (patch)
tree140aa5e044dc46cbcf4c9b1ea5978dd1899e5608 /mac/.qutebrowser/userscripts/qr
parent53f239bf8067e4dda550d947e2a6b93de0c7dd65 (diff)
updates
Diffstat (limited to 'mac/.qutebrowser/userscripts/qr')
-rwxr-xr-xmac/.qutebrowser/userscripts/qr8
1 files changed, 8 insertions, 0 deletions
diff --git a/mac/.qutebrowser/userscripts/qr b/mac/.qutebrowser/userscripts/qr
new file mode 100755
index 0000000..8421524
--- /dev/null
+++ b/mac/.qutebrowser/userscripts/qr
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+pngfile=$(mktemp --suffix=.png)
+trap 'rm -f "$pngfile"' EXIT
+
+qrencode -t PNG -o "$pngfile" -s 10 "$QUTE_URL"
+echo ":open -t file:///$pngfile" >> "$QUTE_FIFO"
+sleep 1 # give qutebrowser time to open the file before it gets removed