Merge branch 'halfwit-master'
This commit is contained in:
commit
5a10ca96c5
@ -157,6 +157,7 @@ Contributors, sorted by the number of commits in descending order:
|
|||||||
* Jimmy
|
* Jimmy
|
||||||
* skinnay
|
* skinnay
|
||||||
* Zach-Button
|
* Zach-Button
|
||||||
|
* Halfwit
|
||||||
* Felix Van der Jeugt
|
* Felix Van der Jeugt
|
||||||
* rikn00
|
* rikn00
|
||||||
* Patric Schmitz
|
* Patric Schmitz
|
||||||
|
60
misc/userscripts/qutedmenu
Executable file
60
misc/userscripts/qutedmenu
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Handle open -s && open -t with bemenu
|
||||||
|
|
||||||
|
#:bind o spawn --userscript /path/to/userscripts/qutedmenu open
|
||||||
|
#:bind O spawn --userscript /path/to/userscripts/qutedmenu tab
|
||||||
|
|
||||||
|
# If you would like to set a custom colorscheme/font use these dirs.
|
||||||
|
# https://github.com/halfwit/dotfiles/blob/master/.config/dmenu/bemenucolors
|
||||||
|
readonly confdir=${XDG_CONFIG_HOME:-$HOME/.config}
|
||||||
|
readonly datadir=${XDG_DATA_HOME:-$HOME/.local/share}
|
||||||
|
|
||||||
|
readonly optsfile=$confdir/dmenu/bemenucolors
|
||||||
|
|
||||||
|
create_menu() {
|
||||||
|
# Check quickmarks
|
||||||
|
while read -r url; do
|
||||||
|
printf -- '%s\n' "$url"
|
||||||
|
done < "$confdir"/qutebrowser/quickmarks
|
||||||
|
|
||||||
|
# Next bookmarks
|
||||||
|
while read -r url _; do
|
||||||
|
printf -- '%s\n' "$url"
|
||||||
|
done < "$confdir"/qutebrowser/bookmarks/urls
|
||||||
|
|
||||||
|
# Finally history
|
||||||
|
while read -r _ url; do
|
||||||
|
printf -- '%s\n' "$url"
|
||||||
|
done < "$datadir"/qutebrowser/history
|
||||||
|
}
|
||||||
|
|
||||||
|
get_selection() {
|
||||||
|
opts+=(-p qutebrowser)
|
||||||
|
#create_menu | dmenu -l 10 "${opts[@]}"
|
||||||
|
create_menu | bemenu -l 10 "${opts[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main
|
||||||
|
# https://github.com/halfwit/dotfiles/blob/master/.config/dmenu/font
|
||||||
|
if [[ -s $confdir/dmenu/font ]]; then
|
||||||
|
read -r font < "$confdir"/dmenu/font
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $font ]]; then
|
||||||
|
opts+=(-fn "$font")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -s $optsfile ]]; then
|
||||||
|
source "$optsfile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
url=$(get_selection)
|
||||||
|
url=${url/*http/http}
|
||||||
|
|
||||||
|
# If no selection is made, exit (escape pressed, e.g.)
|
||||||
|
[[ ! $url ]] && exit 0
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
open) printf '%s' "open $url" >> "$QUTE_FIFO" || qutebrowser "$url" ;;
|
||||||
|
tab) printf '%s' "open -t $url" >> "$QUTE_FIFO" || qutebrowser "$url" ;;
|
||||||
|
esac
|
@ -389,6 +389,7 @@ def _get_authors():
|
|||||||
'binix': 'sbinix',
|
'binix': 'sbinix',
|
||||||
'Averrin': 'Alexey "Averrin" Nabrodov',
|
'Averrin': 'Alexey "Averrin" Nabrodov',
|
||||||
'Alexey Nabrodov': 'Alexey "Averrin" Nabrodov',
|
'Alexey Nabrodov': 'Alexey "Averrin" Nabrodov',
|
||||||
|
'Michael': 'Halfwit',
|
||||||
}
|
}
|
||||||
commits = subprocess.check_output(['git', 'log', '--format=%aN'])
|
commits = subprocess.check_output(['git', 'log', '--format=%aN'])
|
||||||
authors = [corrections.get(author, author)
|
authors = [corrections.get(author, author)
|
||||||
|
Loading…
Reference in New Issue
Block a user