m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-19 00:53:42 -05:00

buku fzfmenu - sqlite3 query example

MahouShoujoMivutilde
2020-12-30 16:03:33 +03:00
parent 0a4d828941
commit 686e6410c9

@@ -1522,7 +1522,15 @@ buku -p -f 4 |
awk '{print $1}' | xargs -d '\n' -I{} -n1 -r xdg-open '{}'
```
Now you can bind on some key, e.g. with [sxhkd](https://github.com/baskerville/sxhkd) in sxhkdrc:
If you have `sqlite` installed - you can use it to query DB directly (which takes about ~2ms compared to buku's ~100ms).
To do that, replace the `buku -p -f 4` with
```sh
sqlite3 -separator $'\t' "$HOME/.local/share/buku/bookmarks.db" "SELECT id,URL,metadata,tags FROM bookmarks" | awk -F $'\t' '{gsub(/(^,|,$)/,"",$4); printf "%s\t%s\t%s\t%s\n", $1, $2, $3, $4}'
```
Now you can bind it on some key, e.g. with [sxhkd](https://github.com/baskerville/sxhkd) in sxhkdrc:
```
super + shift + u
@@ -1532,7 +1540,6 @@ super + shift + u
![demo](https://i.imgur.com/Vc3GKhW.png)
### i3
Fuzzy search desktop entries and launch the appropriate application.
```