fixed some logical errors
This commit is contained in:
parent
f312a9b06a
commit
aa5315906b
1 changed files with 19 additions and 19 deletions
|
@ -2,28 +2,28 @@ function clip {
|
||||||
if [[ $(uname) == "Darwin" ]];then
|
if [[ $(uname) == "Darwin" ]];then
|
||||||
command pbcopy $@
|
command pbcopy $@
|
||||||
|
|
||||||
elif (( "${XDG_SESSION_TYPE}" == "x11" )); then
|
elif [[ "${XDG_SESSION_TYPE}" == "x11" ]]; then
|
||||||
if (( $+commands[xsel] )); then
|
if (( $+commands[xsel] )); then
|
||||||
command xsel -ib $@
|
command xsel -ib $@
|
||||||
elif (( $+commands[xclip] )); then
|
elif (( $+commands[xclip] )); then
|
||||||
command xclip $@
|
command xclip $@
|
||||||
else
|
else
|
||||||
echo "Detected X11, but xsel or xclip are not installed."
|
echo "Detected X11, but xsel or xclip are not installed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif (( -n {WAYLAND_DISPLAY} )); then
|
elif [[ -n "${WAYLAND_DISPLAY}" ]]; then
|
||||||
if (( $+commands[wl-copy] )); then
|
if (( $+commands[wl-copy] )); then
|
||||||
command wl-copy $@
|
command wl-copy $@
|
||||||
else
|
else
|
||||||
echo "Detected Wayland, but wl-copy is not installed."
|
echo "Detected Wayland, but wl-copy is not installed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif (( -n {SSH_CONNECTION} )); then
|
elif [[ -n "${SSH_CONNECTION}" ]]; then
|
||||||
if (( $+commands[lemonade] )); then
|
if (( $+commands[lemonade] )); then
|
||||||
command lemonade copy $@
|
command lemonade copy $@
|
||||||
else
|
else
|
||||||
echo "Detected an SSH connection, but lemonade is not installed."
|
echo "Detected an SSH connection, but lemonade is not installed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "Cannot determine desktop session type, are you running a display server that is not X11 or Wayland?"
|
echo "Cannot determine desktop session type, are you running a display server that is not X11 or Wayland?"
|
||||||
|
|
Reference in a new issue