LaunchyQt icon indicating copy to clipboard operation
LaunchyQt copied to clipboard

Enhancement, or Possible already? Type in Website/URL

Open tomahawk51 opened this issue 4 years ago • 8 comments

I recall in OGLaunchy, I could enter a URL or website, hit enter, and go there in the default browser. "google.com" or "www.bing.com"

Is this possible now? If not, this would solve seemingly my last need!

tomahawk51 avatar Feb 09 '21 00:02 tomahawk51

There are a few ways to do this currently. See if one of the following works for you.

  • For search engines, use the WebSearchPy plugin. There are many search engines pre-defined and you can add more if you like. For instance, you could type 'gg', then press the Tab key, enter your search term and the Google search results page will be brought up in your default browser.
  • You can open a URL by passing it as an argument to your browser of choice. Type as much of the browser name as necessary until your preferred browser becomes the chosen app to launch, then press the Tab key and enter the URL you'd like to have opened.
  • Create a directory of URL shortcuts, and add it to your catalog. This is great if you have a lot of predefined sites you'd like to launch. Launchy will index them, making it so you don't need to type in the full URL each time.

DustinLuck avatar Jul 21 '21 19:07 DustinLuck

I don't mean to hijack a thread - well actually I do, but if my question is better served as a separate thread just let me know. I've been a Launchy user since the last update (circa 2014), but just installed it on a new computer and started running into issues where it DID NOT respect my default browser. Instead, every time I used Weby for a Google search search, or to launch a website that I had saved...It will ask me "How do you want to open it?" and then give me options for Chrome first (my default), Edge...because yeah, and then Microsoft store. Even if I check the "Always use this app" box, it happens the next time. So after some searching, I discovered LaunchyQT and gave it a try - no complaints yet, maybe the Python plugins will really be up my alley, but the issue is still there and WebSearchPy doesn't resolve it! I'm working on downloading a decompiler or something to look at the .dll file(s) and seeing if I can figure anything out, but seems weird and ask-worthy that Weby and WebSearchPy are both failing to invoke my default search engine!

Has anyone seen this before?

GraphiteWingedBird avatar Aug 10 '21 05:08 GraphiteWingedBird

@GraphiteWingedBird Hi, WebSearchPy uses python webbrowser to open web links, which will choose system default browser. You can find it in the following code. https://github.com/samsonwang/LaunchyQt/blob/19526c2c931ff48b454400bce12b14ae3350a2fb/src/Plugins/WebSearchPy/WebSearchPy.py#L61 I guess it is your system configuration fail to setup a default web browser. There is another way around, you can modify WebSearchPy's code to use a predefined web browser.

samsonwang avatar Aug 10 '21 15:08 samsonwang

@samsonwang I see, I'm guessing this is a niche problem then that you don't run into often and (sadly) I might not be able to remedy. I was running Launchy 'Portable' more or less on a computer that I don't have admin rights to install programs, so that might be the issue here as well getting my default browser settings without the right permission to see them.

It looks like webbrowser.get('chrome').open(url) would work, but if I'm not mistaken I'll need to reference where Chrome.exe is in currently installed and since it is going to be in the 'off limits' land of C:/Program Files...I'm guessing I'll fail unless I'm able to use a shortcut from elsewhere...

webbrowser.register('chrome', None, webbrowser.BackgroundBrowser("C://Program Files//Google//Chrome//Application//chrome.exe")) webbrowser.get('chrome').open(url)

How does that look as far as code to try and give it a whirl?

GraphiteWingedBird avatar Aug 10 '21 21:08 GraphiteWingedBird

@GraphiteWingedBird It looks good, and I am considering add a config panel for this in WebSearchPy.

samsonwang avatar Aug 11 '21 10:08 samsonwang

A config panel might be helpful, I think I can tweak it on my side; but after uninstalling LaunchyOG and LaunchyQT multiple times, I've determined that something about my computer is just 'off' and I can't quite figure it out. Overriding to Chrome all the time will be good enough for now, but deep down this issue will haunt me.

@samsonwang - Would implementing something in the configuration for WebSearchPy also truly address @tomahawk51's request? I think in LaunchyOG once you defined a specific Weby query as your 'default' it allowed you to jump to websites without typing "gg" or any type of key. It was most helpful when you searched for something and didn't type "goo"+TAB before the search terms. As long as Launchy didn't find a file or folder that matched your search terms, it would use your default Weby query to launch that URL or search item. Long way of saying that I don't see a 'default' in Thruster/WebSearchPy

GraphiteWingedBird avatar Aug 13 '21 21:08 GraphiteWingedBird

Here's my last comment on here as I found a workaround, I'm not sure where to document this for others since I couldn't find anyone else that was afflicted by Launchy ignoring their browser of choice - but after much ado, I ended up creating a Runner entry with the name Google that executes Chrome itself "C:\Program Files\Google\Chrome\Application\chrome.exe" with the arguments "--single-argument https://www.google.com/search?q=$$" - that was the only way that I could get tabbed input to parse correctly ($1+$2+$3+$n... didn't work). For whatever reason on the afflicted computer, if I personally open CMD.exe then "start https://www.google.com/search?q=<Search Stuff>" opens in Chrome fine. However if Runner/Launchy is used to open CDM.exe then "start https://www.google.com" will ask me which browser to use. So I'm presuming those two are related and somehow default settings outside of my current user config aren't set or aren't being respected. I haven't figured out why.

@tomahawk51 - sorry again for stealing your question thread, but I think the functionality you are asking about already exists as mentioned by @DustinLuck. If you have the full URL and want to open it in Chrome for example, just type "Chrome" hit tab and then type in the URL

GraphiteWingedBird avatar Aug 16 '21 13:08 GraphiteWingedBird