#!/bin/sh

db=$HOME/.local/share/qutebrowser/history.sqlite
url=$(sqlite3 "$db" "select title,url from History" | tac | awk '!a[$0]++' | rofi -dmenu | awk -F '|' '{print $NF}')

[ -z "$url" ] && exit
qutebrowser "$url"
