13

There must be a setting or a shell script that would clear the terms from the lens every time it's closed.

The behaviour would be:

  1. open lens and type a term.
  2. reopen the lens with super key.
  3. see no search term is pre populating the lens.

The goal is not to just to clear the term, it's how to get the system to automatically do it for me. I don't like having to manually erase the last term used every time, especially if it wasn't useful. One problem this causes is, if the term only returned files, then all subsequent terms also only return files (I am using recoll-scope). I must hit 'esc' to fully clear it, before I'm able to search for an app.

nullsteph
  • 423
  • 2
  • 13
  • Do you know that you can press Esc to remove last search term? – Merlijn Sebrechts Jan 10 '15 at 19:14
  • @Galgalesh of course he can. also he can start to typing another search term without pressing . but as I believe he want to clear that history after closing the dash. – αғsнιη Jan 10 '15 at 19:22
  • @Kasiya that's why I'm posting this as a comment, not an answer. Seeing as this exact question has been asked a lot of times, and OP didn't mention the duplicates, I wasn't sure he knew about that workaround. – Merlijn Sebrechts Jan 10 '15 at 19:26
  • Perhaps this will be fixed in the new version of Unity, since there is very little development going on for the old version, I wouldn't get my hopes up that this is going to get fixed for current versions of Ubuntu. – Minos Jan 12 '15 at 11:52
  • 1
    @nullsteph Do you know You can start to typing for new search without clearing last search or pressing key? – αғsнιη Jan 14 '15 at 19:24
  • 1
    @KasiyA - True. If I type a term, hit Super twice to close and open the lens, I can just start typing. The problem is the scopes are set to the last search. Try this: search ".json" and see a bunch of result files. Hit Super, search "softw" for software center. Expect to see only files matched, and not applications. – nullsteph Jan 15 '15 at 03:51

2 Answers2

3

Disable the HUD history storage:

gsettings set com.canonical.indicator.appmenu.hud store-usage-data false    

Disable all scopes, use the launcher as an application drawer only:

gsettings set com.canonical.Unity.Dash scopes "['home.scope', 'applications.scope', 'files.scope']"
gsettings set com.canonical.Unity.Lenses always-search "['applications.scope', 'files.scope']"
gsettings set com.canonical.Unity.Lenses home-lens-default-view "['applications.scope', 'files.scope']"
gsettings set com.canonical.Unity.Lenses home-lens-priority "['applications.scope', 'files.scope']"
gsettings set com.canonical.Unity.Lenses remote-content-search none    

Via here (more tips as well)

  • 1
    Nice idea, but that defeats the purpose of the lens and scopes, which I like. I like having files.recoll scope, and others. – nullsteph Jan 26 '15 at 00:59
  • 2
    Why the downvote? You only have to use the first command to disable the storing of usage data, the other commands are option. It seems to do what you request, or am I missing something? – David Jackson Jan 27 '15 at 07:44
  • @DavidJackson indeed, the first command solves the problem. – Evandro Silva Jan 27 '15 at 16:17
-1

Have you tryed enter in terminal this:

      mount (lense) /

and you can always unmount the lense, and this might work fine this way.

Michael
  • 2,449
  • 5
  • 19
  • 24