aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIzhar Firdaus <kagesenshi.87@gmail.com>2014-03-28 06:05:45 +0800
committerIzhar Firdaus <kagesenshi.87@gmail.com>2014-03-28 06:05:45 +0800
commitc3b6c225e3b71f421c4f34ce5bd11886f925bc83 (patch)
tree54a7f9f013eae2755a8c14093c7daea9e98792a7
parent4a462cea3f8066e632dd384539e9e10b288fe83a (diff)
parent86955da1c4d2eeb6b9705a17e75ce975cf8dbd14 (diff)
downloadgnome-shell-extension-stealmyfocus-c3b6c225e3b71f421c4f34ce5bd11886f925bc83.tar.gz
Merge pull request #3 from nebirhos/master
Remove annoying skype popup
-rw-r--r--README.md7
-rw-r--r--extension.js8
-rw-r--r--metadata.json2
3 files changed, 16 insertions, 1 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..26dbba7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,7 @@
+Steal My Focus - Gnome Shell Extension
+======================================
+
+Let windows steal focus. Removes the annoying 'Window is ready'
+notification and focus window immediately.
+
+You can also specify a blacklist for annoying applications (eg. Skype).
diff --git a/extension.js b/extension.js
index 11b7b5c..1127b3a 100644
--- a/extension.js
+++ b/extension.js
@@ -5,6 +5,7 @@ const Lang = imports.lang;
function StealMyFocus() {
this._init();
+ this.blacklist = ["Skype"];
}
StealMyFocus.prototype = {
@@ -14,6 +15,13 @@ StealMyFocus.prototype = {
},
_onWindowDemandsAttention: function(display, window) {
+ for (var i = 0; i < this.blacklist.length; i++) {
+ var name = this.blacklist[i].toLowerCase();
+ if (window.title.toLowerCase().indexOf(name) != -1) {
+ // app in blacklist, return and do nothing
+ return;
+ }
+ }
Main.activateWindow(window);
},
diff --git a/metadata.json b/metadata.json
index 78e2618..65a3471 100644
--- a/metadata.json
+++ b/metadata.json
@@ -6,7 +6,7 @@
"kagesenshi.87@gmail.com"
],
"shell-version": [
- "3.2", "3.5.2"
+ "3.2", "3.4", "3.5.2", "3.6", "3.8"
],
"url": "https://github.com/kagesenshi/gnome-shell-extension-stealmyfocus",
"uuid": "steal-my-focus@kagesenshi.org",