Adds script to handle different types of link from newsboat
This commit is contained in:
parent
ddb3af4de1
commit
62917582aa
1 changed files with 20 additions and 0 deletions
20
bin/.bin/linkhandler
Executable file
20
bin/.bin/linkhandler
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# A script to open urls
|
||||
# For example, open images with sxiv
|
||||
|
||||
# This is necesary becuase environment variables are lost when calling from newsboat for some reason
|
||||
|
||||
notify-send "I get here"
|
||||
|
||||
url="$1"
|
||||
browser="${BROWSER:-firefox-developer-edition}"
|
||||
|
||||
notify-send "Opening" "$url"
|
||||
|
||||
case "$url" in
|
||||
*"//invidio.us/"*) open-youtube "$url"; exit 0 ;;
|
||||
*) $browser "$url"; exit 0 ;;
|
||||
esac
|
||||
|
||||
exit 1
|
Loading…
Add table
Add a link
Reference in a new issue