Homeinit: proper dwb extension installation

master
Pierre Neidhardt 2014-04-21 10:03:35 +02:00
parent fed7070e83
commit 12bcf1d052
2 changed files with 7 additions and 51 deletions

View File

@ -54,53 +54,6 @@ previousPatterns : "prev,previous,back,<,\u2190,\xab,\u226a,<<"
});
//>navtools___SCRIPT
//<autoquvi___SCRIPT
/*<autoquvi___DISABLED
extensions.load("autoquvi", {
//<autoquvi___CONFIG
// The quvi command
quvi : "quvi",
// External player command
player : "mplayer %u",
// Whether to automatically play videos when quvi find a playable
// video
autoPlay : true,
// Whether to choose the quality before quvi starts
chooseQuality : true,
// A shortcut that spawns quvi for the current website
shortcut : "",
// A command that spawns quvi for the current website
command : "autoquvi"
//>autoquvi___CONFIG
});
autoquvi___DISABLED>*/
//>autoquvi___SCRIPT
//<downloadhandler___SCRIPT
extensions.load("downloadhandler", {
//<downloadhandler___CONFIG
handler : [
// Each handler must have 2 or 3 properties:
//
// command : command to execute, must contain %f which will be replaced with
// the filepath, this property is mandatory
//
// extension : a filename extension, optional
//
// mimeType : a mimetype, optional
//
// { command : "xpdf %f", mimeType : "application/pdf" }
// { command : "xdvi %f", extension : "dvi" }
]
//>downloadhandler___CONFIG
});
//>downloadhandler___SCRIPT
//<contenthandler___SCRIPT
extensions.load("contenthandler", {
//<contenthandler___CONFIG

View File

@ -72,12 +72,15 @@ if command -v luakit >/dev/null 2>&1; then
fi
## dwb -- Install extensions.
if command -v dwb >/dev/null 2>&1 && [ ! -f "$XDG_DATA_HOME/dwb/extensions/adblock_subscriptions" ] ; then
if command -v dwbem >/dev/null 2>&1; then
echo "==> dwb"
dwbem -Ni adblock_subscriptions
dwbem -Ni navtools
dwbem -Ni contenthandler
[ $(dwbem -l | grep -c "adblock_subscriptions") -eq 0 ] && dwbem -Ni adblock_subscriptions
[ $(dwbem -l | grep -c "navtools") -eq 0 ] && dwbem -Ni navtools
[ $(dwbem -l | grep -c "contenthandler") -eq 0 ] && dwbem -Ni contenthandler
# dwbem -Ni youtube_html5
(cd ~/.config/dwb/userscripts/ && git checkout extension_loader.js)
echo
fi