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.

6
  • Do you know that you can press Esc to remove last search term? Jan 10 '15 at 19:14
  • @Galgalesh of course he can. also he can start to typing another search term without pressing <Esc>. but as I believe he want to clear that history after closing the dash. 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. Jan 10 '15 at 19:26
  • 1
    @nullsteph Do you know You can start to typing for new search without clearing last search or pressing <Esc> key? 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 3:51
3
+50

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)

3
  • 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 0: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? Jan 27 '15 at 7:44
  • @DavidJackson indeed, the first command solves the problem. 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.

2
  • I haven't tried this yet. What exactly does this do, and how could I reverse it?
    – nullsteph
    Jan 25 '15 at 23:30
  • unbmount (lense) / and it will reverse it.
    – Michael
    Feb 1 '15 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.