#!/bin/sh set -e text="$*" if [ -z "$text" ]; then read -r text fi wl-copy "$text" notify-send --urgency=low "copied" "$text" set -x case "$text" in *open.spotify.com*) notify-action -u low -c success -A "onclick=swaymsg exec -- spotify --uri=$text" "spotify link found" "$text" ;; url-launcher://*) text=$(printf "%s" "$text" | sed -e 's,url-launcher://,,') wl-copy "$text" nuke "$text" ;; esac