summaryrefslogtreecommitdiff
path: root/ar/.config/qutebrowser/userscripts/qr
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-17 09:16:56 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-17 09:16:56 +0900
commitb930c710a29410daa2368258db69d9830a656c5d (patch)
tree5665d798d2601619940230a0e6dfaecd61dcab57 /ar/.config/qutebrowser/userscripts/qr
parent6560acee5bf5fce09b6ced1c9a3d3d111459878d (diff)
updates
Diffstat (limited to 'ar/.config/qutebrowser/userscripts/qr')
-rwxr-xr-xar/.config/qutebrowser/userscripts/qr8
1 files changed, 8 insertions, 0 deletions
diff --git a/ar/.config/qutebrowser/userscripts/qr b/ar/.config/qutebrowser/userscripts/qr
new file mode 100755
index 0000000..8421524
--- /dev/null
+++ b/ar/.config/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