terminal is now xiate

This commit is contained in:
Franzi 2021-04-17 12:06:15 +02:00
parent ba39e3f3be
commit 99bda4ba71
Signed by: kunsi
GPG key ID: 12E3D2136B818350
5 changed files with 28 additions and 3 deletions

13
.bin/xiate-link-handler Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh
# $1 = "explicit" or "match"
# $2 = URL
# Save all links to a file for debugging (and, yeah, to have a history).
linkhist=/tmp/xiate-link-history-$USER/history
install -dm0700 "$(dirname "$linkhist")"
printf "%s [%s] [%s]\n" "$(date)" "$1" "$2" >>"$linkhist"
printf "%s" "$2" | xclip -selection clipboard
notify-send -u low -t 5000 -a xiate-link-handler "copied link to clipboard" "$(printf "%s" "$2")"