dwb: scheme handler (mailto and ftp)

master
Pierre Neidhardt 2013-08-03 16:07:08 +02:00
parent ce9069e7fd
commit d20a482068
2 changed files with 15 additions and 1 deletions

View File

@ -140,7 +140,7 @@ scroll-step=0.00
close-last-tab-policy=clear
foreground-color=#ffffff
message-delay=2
scheme-handler=
scheme-handler=dwb-scheme
default-font-size=12
enable-offline-web-application-cache=true
hints-key-lock=250

14
.scripts/dwb-scheme Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
## TODO: 'urxvt -e' does not seem to work with ftp clients.
TERMCMD=xterm
[ -z "$(command -v xclip)" ] && exit
[ -z "$(command -v xdg-open)" ] && exit
[ -z "$(command -v $TERMCMD)" ] && exit
case ${DWB_SCHEME} in
mailto) echo "${DWB_URI}" | sed -e 's/mailto://' -e 's/?/ /' | xclip -i ;;
ftp) $TERMCMD -e "lftp ${DWB_URI}";;
*) xdg-open "${DWB_URI}"
esac