37 lines
657 B
Bash
Executable File
37 lines
657 B
Bash
Executable File
#!/bin/sh
|
|
case $1 in
|
|
*youtube.com*)
|
|
mpv --ytdl-format='bestvideo[height<=1080]+bestaudio' $1
|
|
;;
|
|
*mp3)
|
|
mpv "$1"
|
|
;;
|
|
http://*|https://*)
|
|
if [ $(cat /etc/hostname) = 'alarm' ]
|
|
then
|
|
exec firefox "$1"
|
|
else
|
|
exec qutebrowser "$1"
|
|
fi
|
|
;;
|
|
gemini://*)
|
|
exec termite -e "amfora $1"
|
|
;;
|
|
mailto://*)
|
|
exec thunderbird "$1"
|
|
;;
|
|
*.pdf)
|
|
exec evince "$1"
|
|
;;
|
|
*.txt)
|
|
exec gedit "$1"
|
|
;;
|
|
*/)
|
|
exec Thunar "$1"
|
|
;;
|
|
*)
|
|
notify-send "no handler for $1, using system xdg"
|
|
exec /usr/bin/xdg-open "$@"
|
|
;;
|
|
esac
|