This file is indexed.

/usr/share/gnome-shell/extensions/multi-monitors-add-on@spin83/indicator.js is in gnome-shell-extension-multi-monitors 0.00~git20171014.1.df5d6e4-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/*
Copyright (C) 2014  spin83

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, visit https://www.gnu.org/licenses/.
*/

const Lang = imports.lang;

const St = imports.gi.St;

const Util = imports.misc.util;

const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
const PanelMenu = imports.ui.panelMenu;

const Gettext = imports.gettext.domain('multi-monitors-add-on');
const _ = Gettext.gettext;
const Convenience = imports.misc.extensionUtils.getCurrentExtension().imports.convenience;

var MultiMonitorsIndicator = new Lang.Class({
	Name: 'MultiMonitorsIndicator',
	Extends: PanelMenu.Button,
	
	_init: function() {
		this.parent(0.0, "MultiMonitorsAddOn", false);
		
		Convenience.initTranslations();
		
		this.text = null;

		this._mmStatusIcon = new St.BoxLayout({ style_class: 'multimonitor-status-indicators-box' });
		this._mmStatusIcon.hide();
		this.actor.add_child(this._mmStatusIcon);
		this._leftRightIcon = true;

		this.menu.addAction(_("Preferences"), Lang.bind(this, this._onPreferences));
//		this.menu.addAction(_("Init 2nd monitor"), Lang.bind(this, this._onInit2ndMonitor));
		
		this._viewMonitorsId = Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._viewMonitors));
		this.connect('destroy', Lang.bind(this, this._onDestroy));
		this._viewMonitors();
	},	
		
	_onDestroy: function(actor) {
		Main.layoutManager.disconnect(this._viewMonitorsId);
	},
	
	_syncIndicatorsVisible: function() {
        this._mmStatusIcon.visible = this._mmStatusIcon.get_children().some(function(actor) {
            return actor.visible;
        });
    },
	
	_viewMonitors: function() {
		let monitors = this._mmStatusIcon.get_children();
	
		let monitorChange = Main.layoutManager.monitors.length - monitors.length;
		if(monitorChange>0){
			global.log("Add Monitors ...");
			for(let idx = 0; idx<monitorChange; idx++){
				let icon;
				icon = new St.Icon({style_class: 'system-status-icon multimonitor-status-icon'});
				this._mmStatusIcon.add_child(icon);
				icon.connect('notify::visible', Lang.bind(this, this._syncIndicatorsVisible));
				
				if(this._leftRightIcon)
					icon.icon_name = 'multi-monitors-l-symbolic';
				else
					icon.icon_name = 'multi-monitors-r-symbolic';
				this._leftRightIcon = !this._leftRightIcon;
			}
			this._syncIndicatorsVisible();
		}
		else if(monitorChange<0){
			global.log("Remove Monitors ...");
			monitorChange = -monitorChange;
			
			for(let idx = 0; idx<monitorChange; idx++){
				let icon = this._mmStatusIcon.get_last_child();
				this._mmStatusIcon.remove_child(icon);
				icon.destroy();
				this._leftRightIcon = !this._leftRightIcon;
			}
		}
	},
	
	_onPreferences: function()
	{
		Util.spawn(["gnome-shell-extension-prefs", "multi-monitors-add-on@spin83"]);
	},
	
	_onInit2ndMonitor: function()
	{
		Util.spawn(["intel-virtual-output"]);
	},
	
	_hideHello: function() {
	    Main.uiGroup.remove_actor(this.text);
	    this.text = null;
	},
	
	_showHello: function() {
	    if (!this.text) {
	        this.text = new St.Label({ style_class: 'helloworld-label', text: _("Multi Monitors Add-On") });
	        Main.uiGroup.add_actor(this.text);
	    }

	    this.text.opacity = 255;

	    let monitor = Main.layoutManager.primaryMonitor;

	    this.text.set_position(Math.floor(monitor.width / 2 - this.text.width / 2),
	                      Math.floor(monitor.height / 2 - this.text.height / 2));

	    Tweener.addTween(this.text,
	                     { opacity: 0,
	                       time: 4,
	                       transition: 'easeOutQuad',
	                       onComplete: Lang.bind(this, this._hideHello) });

	},
});