wow, such improvement, wow
This commit is contained in:
parent
1a42ecfd0a
commit
a17bd2e0f3
|
@ -180,6 +180,8 @@ call plug#end()
|
|||
|
||||
highlight Identifier guifg={{@@ color.accent @@}}
|
||||
|
||||
highlight MatchParen gui=bold guifg=yellow
|
||||
|
||||
"}}}
|
||||
" Keys{{{
|
||||
"
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
# {{@@ header() @@}}
|
||||
|
||||
# Ignore import error
|
||||
# pylint: disable=E0401
|
||||
# pylint: disable=E0401,E0602
|
||||
# type: ignore
|
||||
from qutebrowser.config.configfiles import ConfigAPI
|
||||
from qutebrowser.config.config import ConfigContainer
|
||||
|
||||
config = config
|
||||
c = c
|
||||
# Ignore undefined
|
||||
config: ConfigAPI
|
||||
c: ConfigContainer
|
||||
|
@ -365,6 +368,7 @@ c.fonts.tabs.unselected = "14px {{@@ font.interface @@}}"
|
|||
# }}}
|
||||
# Bindings {{{
|
||||
# Bindings for normal mode
|
||||
config.bind(",d", "spawn --verbose youtube-dl {url}")
|
||||
config.bind(",m", "spawn mpv --fs {url}")
|
||||
config.bind(",r", "spawn --userscript readability")
|
||||
config.bind(";e", "hint links spawn deemix '{hint-url}'")
|
||||
|
@ -388,8 +392,8 @@ config.bind("{{@@ key.right .upper() @@}}", "forward")
|
|||
|
||||
# Bindings for caret mode
|
||||
config.bind("{{@@ key.left @@}}", "move-to-prev-char", mode="caret")
|
||||
config.bind("{{@@ key.down @@}}", "move-to-prev-line", mode="caret")
|
||||
config.bind("{{@@ key.up @@}}", "move-to-next-line", mode="caret")
|
||||
config.bind("{{@@ key.up @@}}", "move-to-prev-line", mode="caret")
|
||||
config.bind("{{@@ key.down @@}}", "move-to-next-line", mode="caret")
|
||||
config.bind("{{@@ key.right @@}}", "move-to-next-char", mode="caret")
|
||||
|
||||
# Bindings for insert mode
|
||||
|
|
|
@ -8,10 +8,10 @@ choose(){
|
|||
choice=$(grep "$(cat $tmpf | cut -d\| -f1| wdmenu)" $tmpf)
|
||||
choiceId="$(echo $choice| cut -d\| -f2)"
|
||||
choiceUrl=http://deezer.com/$sType/$choiceId
|
||||
choicePreview=$( curl -s "api.deezer.com/$sType/$choiceId/$preview_suffix" |
|
||||
choicePreview=$( curl -s "api.deezer.com/$sType/$choiceId/$preview_suffix" |
|
||||
jq -r '.preview, .data[0].preview | select(. != null)' )
|
||||
|
||||
choice=$( echo -e "Preview\nDownload" | wdmenu )
|
||||
choice=$( echo -e "Preview\nDownload\nCopy URL" | wdmenu )
|
||||
if [ "$choice" = Preview ]
|
||||
then
|
||||
mpv --quiet "$choicePreview" &
|
||||
|
@ -27,12 +27,16 @@ choose(){
|
|||
if [ "$choice" = Download ]
|
||||
then
|
||||
notify-send "Starting Download"
|
||||
deemix "$choiceUrl" &&
|
||||
notify-send "Download Successful" ||
|
||||
deemix "$choiceUrl" &&
|
||||
notify-send "Download Successful" ||
|
||||
notify-send "Download Failed"
|
||||
mpc add /
|
||||
mpdDup
|
||||
fi
|
||||
if [ "$choice" = "Copy URL" ]
|
||||
then
|
||||
wl-copy "$choiceUrl"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
@ -52,11 +56,11 @@ case "$sType" in
|
|||
;;
|
||||
album)
|
||||
jqFilter='.data[]| ( .nb_tracks | tostring ) +" - "+.title+" - "+.artist.name+"|"+ ( .id | tostring ) '
|
||||
preview_suffix=tracks
|
||||
preview_suffix=tracks
|
||||
;;
|
||||
artist)
|
||||
jqFilter='.data[]| ( .nb_fan | tostring ) +" - "+.name+"|"+ ( .id | tostring ) '
|
||||
preview_suffix=top
|
||||
preview_suffix=top
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Reference in a new issue