diff --git a/dotfiles/.local/bin/dm-bm b/dotfiles/.local/bin/dm-bm new file mode 100755 index 00000000..15b6fc55 --- /dev/null +++ b/dotfiles/.local/bin/dm-bm @@ -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 + diff --git a/dotfiles/.local/bin/dmenu-bookmark-sources b/dotfiles/.local/bin/dmenu-bookmark-sources new file mode 100644 index 00000000..44989871 --- /dev/null +++ b/dotfiles/.local/bin/dmenu-bookmark-sources @@ -0,0 +1,4 @@ +"YouTube" "https://www.youtube.com/" +"GitHub" "https://github.com/TrudeEH/dotfiles" +"TrudeWeb" "https://trudeeh.github.io/web/" + diff --git a/dotfiles/.local/bin/dmenu-websearch-sources b/dotfiles/.local/bin/dmenu-websearch-sources index 79f6f25b..e78efe34 100644 --- a/dotfiles/.local/bin/dmenu-websearch-sources +++ b/dotfiles/.local/bin/dmenu-websearch-sources @@ -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= +