diff options
| author | 2026-04-21 01:24:39 +0100 | |
|---|---|---|
| committer | 2026-04-21 01:24:39 +0100 | |
| commit | 21ba27be8423b5e3790cefd04306a2f287ffd247 (patch) | |
| tree | 284e155c6d65a873e56a7af6f75c9d1b3a7f3cd8 /dot_local/bin/executable_rqr | |
| parent | 1f3c2328c19c3db5e835acc1c43b30435baabe3c (diff) | |
| download | dotfiles-21ba27be8423b5e3790cefd04306a2f287ffd247.tar.gz dotfiles-21ba27be8423b5e3790cefd04306a2f287ffd247.tar.bz2 dotfiles-21ba27be8423b5e3790cefd04306a2f287ffd247.zip | |
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.
Diffstat (limited to 'dot_local/bin/executable_rqr')
| -rwxr-xr-x | dot_local/bin/executable_rqr | 6 |
1 files changed, 5 insertions, 1 deletions
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" |
