diff options
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" |
