Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extremely Improved Bookmarks (Search + Strip URL + More) #1312

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
7 changes: 5 additions & 2 deletions .local/bin/browser_bookmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ URLQUERY_FILE="$HOME/.local/share/urlquery"
CLIPBOARD="xclip -o"
ACTION_MENU='@@'

# For additional search function, add keywords under open_bookmark function's
# case condition next to search and wiki keywords.

DMENU() {
dmenu -i -l $1 -p "$2"
}
Expand All @@ -16,7 +19,7 @@ error_notify() {
ensure_file_exists() {
[ -f "$URLQUERY_FILE" ] || {
notify-send "$URLQUERY_FILE does not exist. Creating it now."
touch "$URLQUERY_FILE"
echo "SearXNG=https://searx.tiekoetter.com/search?q=" > "$URLQUERY_FILE"
}
}

Expand Down Expand Up @@ -83,7 +86,7 @@ open_bookmark() {
URL=$(grep "^$SELECTION=" "$URLQUERY_FILE" | cut -d= -f2-)
[ -z "$URL" ] && notify-send "Bookmark not found." && exit 1
case "$URL" in
*"search"*|*"wiki"*)
*"search"*|*"wiki"*|*"packages"*)
emrakyz marked this conversation as resolved.
Show resolved Hide resolved
QUERY=$(echo "" | DMENU 0 "Search")
URL="${URL}${QUERY}"
;;
Expand Down