Make clip alias work on wayland

This commit is contained in:
Alexander Rosenberg 2023-10-30 00:39:26 -07:00
parent 11d6c98b03
commit 6d1873b6cd
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -44,7 +44,13 @@ SAVEHIST=10000
# Tools for graphical sessions
export BROWSER=mullvad-browser
export READER=zathura
alias clip="xclip -selection clipboard"
if [[ -v WAYLAND_DISPLAY ]]; then
function clip {
(( ${#} >= 1 )) && (cat "${@}" | wl-copy) || wl-copy
}
else
alias clip="xclip -selection clipboard"
fi
# I mess this up a lot
alias cd..="cd .."