aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--dot_config/zsh/dot_zprofile4
-rwxr-xr-xdot_local/bin/executable_rqr4
2 files changed, 4 insertions, 4 deletions
diff --git a/dot_config/zsh/dot_zprofile b/dot_config/zsh/dot_zprofile
index 32b9245..3a4af62 100644
--- a/dot_config/zsh/dot_zprofile
+++ b/dot_config/zsh/dot_zprofile
@@ -81,6 +81,10 @@ export INPUTRC="$XDG_CONFIG_HOME/sh/inputrc"
# ── Wayland ───────────────────────────────────────────────────────────────────
export XDG_CURRENT_DESKTOP=sway
export MOZ_ENABLE_WAYLAND=1
+# Point X clients at sway's (lazy) XWayland socket. XWayland spawns on demand
+# when the first X client connects; setting DISPLAY unconditionally avoids
+# "unable to open X display" errors from tools like zbarcam.
+export DISPLAY="${DISPLAY:-:0}"
# ── XDG cleanup: keep $HOME tidy ─────────────────────────────────────────────
# https://wiki.archlinux.org/title/XDG_Base_Directory#Partial
diff --git a/dot_local/bin/executable_rqr b/dot_local/bin/executable_rqr
index f00f84c..335f55b 100755
--- a/dot_local/bin/executable_rqr
+++ b/dot_local/bin/executable_rqr
@@ -1,9 +1,5 @@
#!/usr/bin/env sh
-# 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