2

If there are no windows opened, it doesn't make any sense to have the Windows view as default when we go through Activities.

1

Edit the file /usr/share/gnome-shell/js/ui/viewSelector.js with your favorite text editor. e.g.

gksudo gedit /usr/share/gnome-shell/js/ui/viewSelector.js

Search these lines (Line number = 469) :

_switchDefaultTab: function() {
    if (this._tabs.length > 0)
        this._switchTab(this._tabs[0]);
},

Change them to :

_switchDefaultTab: function() {
    if (this._tabs.length > 0) {
        let appSys = Shell.AppSystem.get_default();
        let allApps = appSys.get_running ();
        if ( allApps.length != 0) {
            this._switchTab(this._tabs[0]);
        } else {
            this._switchTab(this._tabs[1]);
        }
    }
},

And, Save and Restart Gnome-Shell.

  • I still have the Windows view as default. – Alex Góes Fuhrmann Nov 21 '11 at 21:48
  • I tested it in gnome-shell ver. 3.2.1. When there were no windows open, I went applications view through Activities. I don't know why it doesn't work in your gnome-shell,sorry. – wildjiji Nov 22 '11 at 1:23
  • That's alright thank you for the answer, it maybe help others. – Alex Góes Fuhrmann Nov 22 '11 at 23:32
1

Change the method _switchDefaultTab() for this:

 _switchDefaultTab: function() {
   if (this._tabs.length > 0) {
    this._activeTab.hide();        
    this._switchTab(this._tabs[1]); 
   }
},

and add the next code line: "this._activeTab=viewTab"; in the method addViewTab():

addViewTab: function(id, title, pageActor, a11yIcon) {
let viewTab = new ViewTab(id, title, pageActor, a11yIcon);
this._tabs.push(viewTab);
this._tabBox.add(viewTab.title);
this._addTab(viewTab);
this._activeTab= viewTab;

},

all in the file "viewSelector.js".

0

there is extension for this (tested on ubuntu 16.04 tls):

https://extensions.gnome.org/extension/1198/start-overlay-in-application-view/

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.