Compare commits

..

3 Commits

Author SHA1 Message Date
Emre AKYÜZ
20fd7ade0d
Merge 56304e551d578a28dcc3df57c5cd88e5e15f2417 into 07952026753f1bbeaf5b6c4eb5414a9c51536041 2023-11-19 19:18:00 +03:00
Emre AKYÜZ
56304e551d
Improve comments. 2023-11-19 19:17:29 +03:00
Emre AKYÜZ
2a5cf35142
Add some comments and an example URL 2023-11-19 18:51:54 +03:00

View File

@ -4,6 +4,8 @@ URLQUERY_FILE="$HOME/.local/share/urlquery"
CLIPBOARD="xclip -o"
ACTION_MENU='@@'
# For additional search function, see information on open_bookmark function below
DMENU() {
dmenu -i -l $1 -p "$2"
}
@ -16,7 +18,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"
}
}
@ -83,7 +85,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"*) # Add your additional search keywords here similarly.
QUERY=$(echo "" | DMENU 0 "Search")
URL="${URL}${QUERY}"
;;