diff --git a/home/user/.local/bin/copy b/home/user/.local/bin/copy index dad575b..9a55463 100755 --- a/home/user/.local/bin/copy +++ b/home/user/.local/bin/copy @@ -5,10 +5,10 @@ set -eu case "${OSTYPE:-}" in "linux-gnu"*) - if [ -n "${WAYLAND_DISPLAY}" ]; then + if [ -n "${WAYLAND_DISPLAY:-}" ]; then wl-copy --trim-newline exit 0 - elif [ -n "${DISPLAY}" ]; then + elif [ -n "${DISPLAY:-}" ]; then xclip -selection clipboard -in exit 0 else diff --git a/home/user/.local/bin/pasta b/home/user/.local/bin/pasta index a0fa920..ee37ba3 100755 --- a/home/user/.local/bin/pasta +++ b/home/user/.local/bin/pasta @@ -5,10 +5,10 @@ set -eu case "${OSTYPE:-}" in "linux-gnu"*) - if [ -n "${WAYLAND_DISPLAY}" ]; then + if [ -n "${WAYLAND_DISPLAY:-}" ]; then wl-paste --no-newline exit 0 - elif [ -n "${DISPLAY}" ]; then + elif [ -n "${DISPLAY:-}" ]; then xclip -selection clipboard -out exit 0 else