Ubuntu – How to get the list of Dash search plugins (scopes) in command line

13.10lensesscopesunityunity-dash

I am going to disable all or some of Dash search plugins (scopes).
I can do it in Dash GUI one by one (see https://askubuntu.com/a/355523/103599) but it seems to me unpractical as there are 56 plugins installed now.
Therefore I am going to disable them from command line like this:

gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"

But for this I need to know the names of all scopes, not only amazon, ebay, etc… How can I do it?

Best Answer

find /usr/share/unity/scopes/ -name \*.scope -printf "%P "|sed -es':/:-:g'

lists you all locally installed scopes.

With

gsettings set com.canonical.Unity.Lenses disabled-scopes "[$(find /usr/share/unity/scopes/ -name \*.scope -printf "'%P',"|sed -es':/:-:g' -e's/,$//')]"

you can disable all, so you can just enable the ones you want. You need to have at least applications-scopes.scope enabled to use the Dash to manage Scopes.

Related Question