]> code.delx.au - sometimes-steal-my-focus/commitdiff
added libreoffice to whitelist master
authorJames Bunton <jamesbunton@delx.net.au>
Mon, 10 Jun 2019 00:43:15 +0000 (10:43 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Mon, 10 Jun 2019 01:07:39 +0000 (11:07 +1000)
PKGBUILD
extension.js

index 85320d7b4039de26da3f2ccb40bfad9f6778b172..28651995a46de4f1a8853889598d5353fc3f7b82 100644 (file)
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,12 @@
 # Maintainer: James Bunton <jamesbunton@delx.net.au>
 
 pkgname=gnome-shell-extension-sometimes-steal-my-focus
-pkgver=2
+pkgver=4
 pkgrel=1
 pkgdesc="Gnome shell extension to sometimes steal focus"
 arch=('any')
 source=("extension.js" "metadata.json")
-sha512sums=('bf69350311f39bbad260195379fdabd1eadab011ff27359e230a4c1eecf8be023a4642a50987d599f92677043638a707e795ee9252c3d8d13d8fc17dc0c6ec08'
+sha512sums=('1aa48f3e24dd1883a04551a3bf29fc2796dc0744ebe1b8e6f3013fc7ce36e5762b7091da74e5b47dbbc3cd98da970cfd7884dfca1ac61c771b767f66fb8fdc79'
             '3f65531ae52b70ae8ef642742f967b2f4a490b6d09e8561dfe9ea60259238211323bef99abda19c01ba81141092743c9f771a2918a1aadb8a3ac277e76f5e7e8')
 
 package() {
index 61890b7b2592b3dd7ab0942a72e9f716930f6ef5..20ecb79cd798441d12b933194e7e408d1cf7789e 100644 (file)
@@ -4,13 +4,19 @@ const {
 } = imports.ui.main;
 
 const WHITELIST = [
-    "Emacs",
-    "Firefox"
+    "emacs",
+    "firefox",
+    "libreoffice-base",
+    "libreoffice-calc",
+    "libreoffice-draw",
+    "libreoffice-impress",
+    "libreoffice-writer",
+    "soffice"
 ];
 
 const customWindowAttentionHandler = {
     _onWindowDemandsAttention(display, window) {
-        if (WHITELIST.includes(window.wm_class)) {
+        if (WHITELIST.includes(window.wm_class.toLowerCase())) {
             activateWindow(window);
         } else {
             defaultWindowAttentionHandler._onWindowDemandsAttention(display, window);