Skip to content

Commit d81e9b2

Browse files
authored
Update nbrowser
1 parent 6ec0b74 commit d81e9b2

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

nbrowser

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ for prog in badwolf qutebrowser ephemeral ; do
8787
done
8888

8989
# custom config
90-
[[ -f "${NBROWSER_CONFIG_DIR}/config" ]] && source "${NBROWSER_CONFIG_DIR}/config"
90+
[[ -f "${NBROWSER_CONFIG_DIR}/config" ]] && source "${NBROWSER_CONFIG_DIR}/config"
9191

9292
if ! has _clean_url ;then
9393
_clean_url(){
@@ -158,10 +158,10 @@ open_video_with(){
158158
"Download")
159159
if [ -n "${NBROWSER_DOWNLOADER}" ] ; then
160160
{ setsid -f ${NBROWSER_DOWNLOADER} "$*" >/dev/null 2>&1 ; }
161-
elif has 'youtube-dl'; then
162-
{ setsid -f "${TERMINAL:-st}" -e sh -c "youtube-dl $* || read" >/dev/null 2>&1 ; }
163161
elif has 'yt-dlp'; then
164162
{ setsid -f "${TERMINAL:-st}" -e sh -c "yt-dlp $* || read" >/dev/null 2>&1 ; }
163+
elif has 'youtube-dl'; then
164+
{ setsid -f "${TERMINAL:-st}" -e sh -c "youtube-dl $* || read" >/dev/null 2>&1 ; }
165165
else
166166
_pemx "youtube-dl is not installed in your system!"
167167
fi
@@ -293,7 +293,7 @@ main(){
293293
url_handler "https://www.twitch.tv/${1:7}"
294294
;;
295295

296-
# BANGS
296+
# bangs
297297
"!"*)
298298
local bang="${1/?}"
299299
if [ -f "${NBROWSER_CONFIG_DIR}/bangs/${bang}" ] ; then
@@ -306,7 +306,7 @@ main(){
306306
fi
307307
;;
308308

309-
# Search Engines
309+
# engines
310310
"?"*)
311311
local engine="${1/?}"
312312
if [ -f "${NBROWSER_CONFIG_DIR}/engines/${engine}" ] ; then
@@ -326,16 +326,18 @@ main(){
326326
_pemx "search engine '${engine}' not found!"
327327
fi
328328
;;
329+
329330
*)
330331
if [ -e "$*" ] ; then
331332
case $@ in
332333
*.pdf)
333334
# handle local pdf
334335
[ -z "$NBROWSER_PDF_VIEWER" ] || installed_browsers[0]="PDF Reader : ${NBROWSER_PDF_VIEWER}"
335-
;;
336+
;;
336337
*)
337338
# handle other local files
338339
[ -z "$NBROWSER_HTML_EDITOR" ] || installed_browsers[0]="Text Editor : ${NBROWSER_HTML_EDITOR}"
340+
;;
339341
esac
340342
open_in_browser "$*"
341343
elif [ -f "${NBROWSER_CONFIG_DIR}/engines/${NBROWSER_DEFAULT_SEARCH}" ] ; then

0 commit comments

Comments
 (0)