File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -686,7 +686,11 @@ cmd_stealth() {
686686 if [ " $is_macos " = yes ]; then
687687 past=$( pbpaste)
688688 else
689- past=$( xsel -o)
689+ if [ " $XDG_SESSION_TYPE " = wayland ]; then
690+ past=$( xl-paste -p)
691+ else
692+ past=$( xsel -o)
693+ fi
690694 fi
691695 printf " \033[0;31mstealth:\033[0m you are in the stealth mode; select any text in any window for a query\n"
692696 printf " \033[0;31mstealth:\033[0m selections longer than $STEALTH_MAX_SELECTION_LENGTH words are ignored\n"
@@ -698,7 +702,11 @@ cmd_stealth() {
698702 if [ " $is_macos " = yes ]; then
699703 current=$( pbpaste)
700704 else
701- current=$( xsel -o)
705+ if [ " $XDG_SESSION_TYPE " = wayland ]; then
706+ current=$( wl-paste -p)
707+ else
708+ current=$( xsel -o)
709+ fi
702710 fi
703711 if [ " $past " != " $current " ]; then
704712 past=$current
You can’t perform that action at this time.
0 commit comments