Fix dm-bm bookmarks
This commit is contained in:
14
dotfiles/.local/bin/dm-bm
Executable file
14
dotfiles/.local/bin/dm-bm
Executable 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
|
||||
|
||||
4
dotfiles/.local/bin/dmenu-bookmark-sources
Normal file
4
dotfiles/.local/bin/dmenu-bookmark-sources
Normal file
@@ -0,0 +1,4 @@
|
||||
"YouTube" "https://www.youtube.com/"
|
||||
"GitHub" "https://github.com/TrudeEH/dotfiles"
|
||||
"TrudeWeb" "https://trudeeh.github.io/web/"
|
||||
|
||||
@@ -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=
|
||||
|
||||
|
||||
Reference in New Issue
Block a user