summaryrefslogtreecommitdiffstatshomepage
path: root/dot_local/bin/executable_wqr
diff options
context:
space:
mode:
authorsommerfeld <sommerfeld@sommerfeld.dev>2026-09-17 15:05:36 +0100
committersommerfeld <sommerfeld@sommerfeld.dev>2026-09-17 15:05:36 +0100
commitaff435a0fb3a56b1d7b738c7dede363440884b3a (patch)
tree07acb41d37760aa169ee42dbeb69da3621cc7489 /dot_local/bin/executable_wqr
parenta7f74c1fa4b89c5829f5896842eb7248c820704c (diff)
downloaddotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.tar.gz
dotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.tar.bz2
dotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.zip
Add the Canonical laptop profile and setup workflows
Diffstat (limited to 'dot_local/bin/executable_wqr')
-rwxr-xr-xdot_local/bin/executable_wqr8
1 files changed, 7 insertions, 1 deletions
diff --git a/dot_local/bin/executable_wqr b/dot_local/bin/executable_wqr
index 5f9d36d..b4cc123 100755
--- a/dot_local/bin/executable_wqr
+++ b/dot_local/bin/executable_wqr
@@ -8,4 +8,10 @@ else
text="$1"
fi
-printf '%s' "$text" | qrencode -t PNG -o - | imv -
+if [ "$(cat "$HOME/.config/dotfiles/role" 2>/dev/null)" = canonical ]; then
+ image=$(mktemp "${XDG_RUNTIME_DIR:?}/dotfiles-qr-XXXXXX.png")
+ printf '%s' "$text" | qrencode -t PNG -o "$image"
+ /usr/bin/xdg-open "$image"
+else
+ printf '%s' "$text" | qrencode -t PNG -o - | imv -
+fi