From 21ba27be8423b5e3790cefd04306a2f287ffd247 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Tue, 21 Apr 2026 01:24:39 +0100 Subject: fix(rqr): restore zbarcam preview and propagate DISPLAY to XWayland zbarcam needs an X11 display for the live camera preview, which sway provides via XWayland. Two changes to make that reliable: - sway/config: add DISPLAY to the systemd/dbus user-environment imports, so anything launched through those paths (not just direct sway execs) can reach XWayland. - rqr: default DISPLAY to :0 (sway's default XWayland socket) when unset, as a belt-and-suspenders fallback. --- dot_local/bin/executable_rqr | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dot_local/bin/executable_rqr') diff --git a/dot_local/bin/executable_rqr b/dot_local/bin/executable_rqr index 89cb8bf..f00f84c 100755 --- a/dot_local/bin/executable_rqr +++ b/dot_local/bin/executable_rqr @@ -1,6 +1,10 @@ #!/usr/bin/env sh -text="$(zbarcam --nodisplay -q -1 --raw)" +# zbarcam opens an X11 preview window, so DISPLAY must reach XWayland. +# Fall back to :0 (sway's default XWayland display) if it's missing. +export DISPLAY="${DISPLAY:-:0}" + +text="$(zbarcam -q -1 --raw)" printf '%s' "$text" | wl-copy echo "$text" -- cgit v1.2.3-70-g09d2