2
* Copyright (C) 2010 Canonical, Ltd.
5
* Olivier Tilloy <olivier.tilloy@canonical.com>
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; version 3.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
25
var aa = BamfMatcher.active_application()
26
console.log("active application: " + aa.name)
27
var aw = BamfMatcher.active_window()
28
console.log("active window: " + aw.name)
29
var running = BamfMatcher.running_applications()
30
console.log("running applications:")
31
for (var i = 0; i < running.size(); ++i) {
32
var app = running.at(i)
33
console.log(" » " + app.name)
34
var windows = app.windows()
35
for (var j = 0; j < windows.size(); ++j) {
36
var window = windows.at(j)
37
console.log(" » " + window.name)
43
function onActiveWindowChanged() {
44
var aw = BamfMatcher.active_window()
46
console.log("active window changed to: " + aw.name)
49
Component.onCompleted: info()