aboutsummaryrefslogtreecommitdiff
path: root/home/dot_local
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2026-11-21 12:56:56 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2026-11-21 12:56:56 +0100
commit6b979cf672b10bd2867a8bfcdc142230294e8b61 (patch)
tree4865935eba56bc57e0b378a8f23ab96d7c2439ed /home/dot_local
parent167c7283dc8d63554c7f22dc36772218362d95fd (diff)
more mac updates
Diffstat (limited to 'home/dot_local')
-rw-r--r--home/dot_local/share/bin/executable_qrclip2
-rw-r--r--home/dot_local/share/bin/executable_qrclip.tmpl9
2 files changed, 9 insertions, 2 deletions
diff --git a/home/dot_local/share/bin/executable_qrclip b/home/dot_local/share/bin/executable_qrclip
deleted file mode 100644
index f4f5d36..0000000
--- a/home/dot_local/share/bin/executable_qrclip
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env sh
-maim -usb 4 -c 0,0,0 | zbarimg --raw --quiet -
diff --git a/home/dot_local/share/bin/executable_qrclip.tmpl b/home/dot_local/share/bin/executable_qrclip.tmpl
new file mode 100644
index 0000000..89d2bca
--- /dev/null
+++ b/home/dot_local/share/bin/executable_qrclip.tmpl
@@ -0,0 +1,9 @@
+#!/usr/bin/env sh
+{{- if eq .chezmoi.os "darwin" }}
+tmp="$(mktemp)"
+screencapture -i "$tmp"
+zbarimg --raw --quiet "$tmp"
+rm -f "$tmp"
+{{- else if eq .chezmoi.os "linux" }}
+maim -usb 4 -c 0,0,0 | zbarimg --raw --quiet -
+{{- end }}