diff options
Diffstat (limited to 'scripts/open_primary_in_browser.sh')
| -rwxr-xr-x | scripts/open_primary_in_browser.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/open_primary_in_browser.sh b/scripts/open_primary_in_browser.sh index 9fb05d6..9ae8243 100755 --- a/scripts/open_primary_in_browser.sh +++ b/scripts/open_primary_in_browser.sh @@ -1,3 +1,12 @@ #!/bin/bash -eval $BROWSER $(xclip -o -selection primary) +PRIMARY="" + +if [[ ! -z "$WAYLAND_DISPLAY" ]] +then + PRIMARY=$(wl-paste -p) +else + PRIMARY=$(xclip -o -selection primary) +fi + +eval $BROWSER "$PRIMARY" |
