diff options
| author | sommerfeld <sommerfeld@sommerfeld.dev> | 2026-09-17 15:05:36 +0100 |
|---|---|---|
| committer | sommerfeld <sommerfeld@sommerfeld.dev> | 2026-09-17 15:05:36 +0100 |
| commit | aff435a0fb3a56b1d7b738c7dede363440884b3a (patch) | |
| tree | 07acb41d37760aa169ee42dbeb69da3621cc7489 /dot_local/bin/executable_wqr | |
| parent | a7f74c1fa4b89c5829f5896842eb7248c820704c (diff) | |
| download | dotfiles-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-x | dot_local/bin/executable_wqr | 8 |
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 |
