diff options
author | Clastres Térence | 2016-08-11 17:04:43 +0200 |
---|---|---|
committer | Clastres Térence | 2016-08-11 17:04:43 +0200 |
commit | 8f6a620830b7b917eb5b34f572640fef0f30087c (patch) | |
tree | 38ecfe671f38361d018f48db618eeb6ff89276e2 | |
parent | 36c13b6f727c811b8a4b33ee618a13f68123d943 (diff) | |
download | aur-8f6a620830b7b917eb5b34f572640fef0f30087c.tar.gz |
Fix browser detection code
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | chrome-shutdown-hook.desktop | 2 | ||||
-rw-r--r-- | chrome-shutdown-hook.py | 13 |
4 files changed, 12 insertions, 15 deletions
@@ -1,6 +1,6 @@ pkgbase = chrome-shutdown-hook pkgdesc = Gently shutdown Chrome/Chromium on logout from Gnome Shell. - pkgver = 1.2 + pkgver = 1.2.1 pkgrel = 1 url = https://www.google.com/chrome/index.html arch = any @@ -11,8 +11,8 @@ pkgbase = chrome-shutdown-hook optdepends = gnome-tweak-tool: to enable this hook as a Gnome Startup Application source = chrome-shutdown-hook.desktop source = chrome-shutdown-hook.py - md5sums = 45087b31730315e1ed785205739d9943 - md5sums = 488167eff465bb620bdece25582aba4b + md5sums = e9e039b29bf1c7a027ef6b3a2946b6a9 + md5sums = 5e6f900651799632327ebd1cc74b15b5 pkgname = chrome-shutdown-hook @@ -1,7 +1,7 @@ # Maintainer: Michael Goehler <somebody dot here at gmx dot de> pkgname=chrome-shutdown-hook -pkgver=1.2 +pkgver=1.2.1 pkgrel=1 pkgdesc="Gently shutdown Chrome/Chromium on logout from Gnome Shell." arch=('any') @@ -12,8 +12,8 @@ optdepends=('gnome-tweak-tool: to enable this hook as a Gnome Startup Applicatio license=('GPL') source=("chrome-shutdown-hook.desktop" "chrome-shutdown-hook.py") -md5sums=('45087b31730315e1ed785205739d9943' - '488167eff465bb620bdece25582aba4b') +md5sums=('e9e039b29bf1c7a027ef6b3a2946b6a9' + '5e6f900651799632327ebd1cc74b15b5') package() { cd "${srcdir}" diff --git a/chrome-shutdown-hook.desktop b/chrome-shutdown-hook.desktop index fdb21b43bb69..b3a9b48ff04d 100644 --- a/chrome-shutdown-hook.desktop +++ b/chrome-shutdown-hook.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Name=Chrome Shotdown Hook -Comment=Gently shutdown Chrome on logout from Gnome Shell +Comment=Gently shutdown Chrome/Chromium on logout from Gnome Shell Exec=/usr/bin/chrome-shutdown-hook Icon=view-restore-symbolic Terminal=false diff --git a/chrome-shutdown-hook.py b/chrome-shutdown-hook.py index d8eaa59e3364..88fa746cc19d 100644 --- a/chrome-shutdown-hook.py +++ b/chrome-shutdown-hook.py @@ -22,15 +22,12 @@ def chromium_clean_shutdown(*args): return True def main(): - prog = gnome.init("chrome_clean_shutdown", "1.2") + prog = gnome.init("chrome_clean_shutdown", "1.2.1") client = gnome.ui.master_client() - - if subprocess.call("hash google-chrome-stable", shell=True): - client.connect("save-yourself", chrome_clean_shutdown) - - if subprocess.call("hash chromium", shell=True): - client.connect("save-yourself", chromium_clean_shutdown) - + if (subprocess.call("hash chromium", shell=True) == 0): + client.connect("save-yourself", chromium_clean_shutdown) + if (subprocess.call("hash google-chrome-stable", shell=True) == 0): + client.connect("save-yourself", chrome_clean_shutdown) main() gtk.main() |