Fix dm-bm bookmarks

This commit is contained in:
2024-06-07 12:51:24 +01:00
parent 42e65db2b6
commit 87e1e5980a
3 changed files with 20 additions and 2 deletions

14
dotfiles/.local/bin/dm-bm Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
bookmarks_file="$HOME/.local/bin/dmenu-bookmark-sources"
bookmark_entries=$(awk -F'"' '{print $2 "\t" $4}' "$bookmarks_file")
choice=$(echo "$bookmark_entries" | cut -f1 | dmenu -i -p "Select bookmark:")
if [[ -n "$choice" ]]; then
# Find the matching URL
url=$(echo "$bookmark_entries" | awk -v choice="$choice" '$1 == choice {print $2}')
echo $url
xdg-open $url
fi

View File

@@ -0,0 +1,4 @@
"YouTube" "https://www.youtube.com/"
"GitHub" "https://github.com/TrudeEH/dotfiles"
"TrudeWeb" "https://trudeeh.github.io/web/"

View File

@@ -3,6 +3,6 @@ dd "DuckDuckGo" https://duckduckgo.com/?q=
we "Wikipedia (en)" https://en.wikipedia.org/wiki/
wp "Wikipedia (pt)" https://pt.wikipedia.org/wiki/
so "Stack Overflow" https://stackoverflow.com/search?q=
dl "DeepL Translator" https://www.deepl.com/translator#en/pt/
gt "Google Translate" https://translate.google.com.br/?text=
rd "Reverso Context Dictionay" https://context.reverso.net/traducao/ingles-portugues/
yt "YouTube" https://www.youtube.com/results?search_query=