excalith / excalith-start-page

Terminal-inspired, clean, feature-rich and customizable browser start page for geeks. Has built-in editor for customizing.
https://excalith-start-page.vercel.app
MIT License
552 stars 163 forks source link

[FEATURE] Changing default search to use "I feel lucky" option #76

Open mureev opened 5 months ago

mureev commented 5 months ago

Please Describe The Feature You Would Like To See

I am pushing the boundaries of the original config and struggle to add an argument to search query to switch parameters of the search in a way that "I feel lucky" option is used.

The idea is to type on start page "github", hit enter and get githuib opened even if GitHub is not saved as a link, instead of getting search engine page by default".

In this example I would like to get a query like this "https://duckduckgo.com/?q=!ducky+github" by using "https://duckduckgo.com/?q=!ducky+" as setting for search config. Yet its not giving me the result that I want

excalith commented 5 months ago

That is a great idea! I just tested the queries on my end, and it successfully redirected me to the page. What I did was:

  1. Update the settings with the duckduckgo query with bang
  2. Write "excalith start page" to prompt area to trigger default search
  3. App launches the duckduckgo and redirects to this github repository

Here is my settings for the default:

"search": {
   "default": "https://duckduckgo.com/?q=!ducky+{}",
}

And also you can define a "Feeling Lucky" shortcut as well

{
   "alias": "dd",
   "name": "DuckDuckGo Feeling Lucky",
   "url": "https://duckduckgo.com/?q=!ducky+{}"
}

They both seem to work on my end. If it does not redirect you to the page, you might need to give permission to redirect. If it redirects to a wrong page, I am not sure if it is related to our query since I tried bunch of different searches with different keywords.

Let me know what happens with the changes I mentioned above

Cheers

mureev commented 5 months ago

thanks for checking. you won't believe it :) it seems we hit yet another Safari problem. It works in Chrome, but not in Safari.

2024-03-26 в 17 14 52

what is even more interesting, that its only an issue with default search. dd shortcut works well even in Safari

excalith commented 5 months ago

I laughed so hard, which led me think if it was an issue on my side :D I would definetely think your config might be wrong if you haven't already tested it in chrome. Just in case, you are using the settings.json for changes, right? Could you try config reset command if you haven't already? Maybe it was your former attempts on Safari. Just a wild guess, and probably you already done that.

The code should replace {} with the query, it seems it appended your query after the {} somehow. I have to check the code for a possible mistake just in case.

mureev commented 4 months ago

I did try few things: reset, incognito tabs, etc. and getting to the same conclusion. last argument that issue is present on iPhone. If possible, would you try it on your Mac too? whenever you have time...