diff options
| -rw-r--r-- | dot_config/sway/config | 4 | ||||
| -rwxr-xr-x | dot_local/bin/executable_rqr | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/dot_config/sway/config b/dot_config/sway/config index bbd2eb0..b341df3 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -151,7 +151,7 @@ bar { } # ── Autostart ───────────────────────────────────────────────────────────────── -exec systemctl --user import-environment WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP -exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP +exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP +exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP exec mako exec "sleep 2 && ~/.config/sway/display-toggle.sh init" 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" |
