tightened up Sway support. There shouldn't be any bugs, but with something like this you never know. I3 users should certainly not encounter any bugs from these changes, please yell if something weird happens.

Oh, and finally pushed the ai.py script I have been using for some time without pushing. I guess several months of testing should be fine. lol
This commit is contained in:
Storm Dragon
2025-12-01 02:24:20 -05:00
parent fa9a6f3c7d
commit 63be4fc9e7
7 changed files with 1805 additions and 55 deletions

View File

@@ -329,9 +329,17 @@ if [[ $# -ne 0 ]]; then
notification="${notification/${url}[[:space:]]/}"
url="${url%[[:space:].?!]}"
fi
if command -v xclip &> /dev/null && [[ "${#url}" -gt 3 ]]; then
echo "${url}" | xclip -selection clipboard
notify-send --hint=int:transient:1 -t 500 -r 38 "${notification} The URL has been copied to the clipboard."
if [[ "${#url}" -gt 3 ]]; then
# Copy URL to clipboard using appropriate tool
if [[ -n "${WAYLAND_DISPLAY}" ]] && command -v wl-copy &> /dev/null; then
echo "${url}" | wl-copy
notify-send --hint=int:transient:1 -t 500 -r 38 "${notification} The URL has been copied to the clipboard."
elif command -v xclip &> /dev/null; then
echo "${url}" | xclip -selection clipboard
notify-send --hint=int:transient:1 -t 500 -r 38 "${notification} The URL has been copied to the clipboard."
else
notify-send --hint=int:transient:1 -t 500 -r 38 "${*}"
fi
else
notify-send --hint=int:transient:1 -t 500 -r 38 "${*}"
fi