diff options
author | Michael Göhler | 2016-05-22 23:04:14 +0200 |
---|---|---|
committer | Michael Göhler | 2016-05-22 23:04:14 +0200 |
commit | 6bd964ddc30202aece25111941ccc37f7c5f5a16 (patch) | |
tree | 85240674bcd1f5ec0e0a5d3934de330dced1ed65 | |
parent | e2efc1db1d78c4e7fb151548cf34f0305799f0ca (diff) | |
download | aur-6bd964ddc30202aece25111941ccc37f7c5f5a16.tar.gz |
simplified code
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | chrome-shutdown-hook.py | 12 |
3 files changed, 8 insertions, 12 deletions
@@ -1,6 +1,6 @@ pkgbase = chrome-shutdown-hook pkgdesc = Gently shutdown Chrome on logout from Gnome Shell. - pkgver = 1.0 + pkgver = 1.1 pkgrel = 1 url = https://www.google.com/chrome/index.html arch = any @@ -12,7 +12,7 @@ pkgbase = chrome-shutdown-hook source = chrome-shutdown-hook.desktop source = chrome-shutdown-hook.py md5sums = 45087b31730315e1ed785205739d9943 - md5sums = a493eb5fd62e90dcd3935f78d977087c + md5sums = b5025192b032fb0e3dfa92c9684a3c8c pkgname = chrome-shutdown-hook @@ -1,7 +1,7 @@ # Maintainer: Michael Goehler <somebody dot here at gmx dot de> pkgname=chrome-shutdown-hook -pkgver=1.0 +pkgver=1.1 pkgrel=1 pkgdesc="Gently shutdown Chrome on logout from Gnome Shell." arch=('any') @@ -13,7 +13,7 @@ license=('GPL') source=("chrome-shutdown-hook.desktop" "chrome-shutdown-hook.py") md5sums=('45087b31730315e1ed785205739d9943' - 'a493eb5fd62e90dcd3935f78d977087c') + 'b5025192b032fb0e3dfa92c9684a3c8c') package() { cd "${srcdir}" diff --git a/chrome-shutdown-hook.py b/chrome-shutdown-hook.py index 58cf6bc7be97..543754054afd 100644 --- a/chrome-shutdown-hook.py +++ b/chrome-shutdown-hook.py @@ -13,19 +13,15 @@ import gnome import gnome.ui import gtk -class Namespace: pass -ns = Namespace() -ns.dialog = None +def chrome_clean_shutdown(*args): + subprocess.call("/usr/bin/pkill -15 -P 1 chrome", shell=True) + return True def main(): - prog = gnome.init("chrome_clean_shutdown", "1.0", gnome.libgnome_module_info_get(), sys.argv, []) + prog = gnome.init("chrome_clean_shutdown", "1.1") client = gnome.ui.master_client() client.connect("save-yourself", chrome_clean_shutdown) -def chrome_clean_shutdown(*args): - subprocess.call("/usr/bin/pkill -15 -P 1 chrome", shell=True) - return True - main() gtk.main() |