Port a few more options to zenity and separate dwm from the install script
This commit is contained in:
28
config-files/.local/bin/dm-web
Executable file
28
config-files/.local/bin/dm-web
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
engine="https://www.google.com/search?q="
|
||||
|
||||
declare -A bookmarks=(
|
||||
["YouTube"]="https://www.youtube.com/"
|
||||
["GitHub"]="https://github.com/TrudeEH/dotfiles"
|
||||
["TrudeWeb"]="https://trudeeh.github.io/web/"
|
||||
["Gemini"]="https://gemini.google.com/app"
|
||||
["Element"]="https://app.element.io/#/home"
|
||||
["Gmail"]="https://mail.google.com/mail/u/0/#inbox"
|
||||
["Google Messages"]="https://messages.google.com/web/conversations"
|
||||
["WOL"]="https://wol.jw.org/pt-PT/"
|
||||
["Discord"]="https://discord.com/app"
|
||||
)
|
||||
|
||||
choice=$(printf "%s\n" "${!bookmarks[@]}" | dmenu -i -p "Search:")
|
||||
|
||||
if [[ -n "$choice" ]]; then
|
||||
# Find the matching URL
|
||||
url=${bookmarks[$choice]}
|
||||
|
||||
if [[ -n "$url" ]]; then
|
||||
xdg-open $url
|
||||
else
|
||||
xdg-open $engine$choice
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user