diff --git a/multibrowse.py b/multibrowse.py index 52cc499..5d974fb 100755 --- a/multibrowse.py +++ b/multibrowse.py @@ -30,9 +30,6 @@ # Init associated system platform = System() - # Close existing windows - platform.close_existing_browsers() - # Sort displays by y, then by x for consistent ordering displays = sorted(sorted(platform.displays, key=itemgetter('x')), key=itemgetter('y')) diff --git a/systems/__init__.py b/systems/__init__.py index f2a53fe..52e8b43 100755 --- a/systems/__init__.py +++ b/systems/__init__.py @@ -14,11 +14,6 @@ def browser_path(self): "Return the path to the Chrome executable" pass - @abstractmethod - def close_existing_browsers(self): - "Close all existing instances of Chrome" - pass - @abstractmethod def displays(self): "Return info about attached displays and their properties" diff --git a/systems/linux.py b/systems/linux.py index 57a8000..30dd929 100644 --- a/systems/linux.py +++ b/systems/linux.py @@ -22,9 +22,6 @@ def browser_path(self): pass raise FileNotFoundError("No supported browsers found!") - def close_existing_browsers(self): - return call(['killall', '-9', 'chrome'], stdout=DEVNULL, stderr=DEVNULL) - @property @lru_cache() def displays(self): diff --git a/systems/mac.py b/systems/mac.py index 087cc75..f516e9e 100644 --- a/systems/mac.py +++ b/systems/mac.py @@ -16,12 +16,6 @@ class System(BaseSystem): def browser_path(self): return os.path.join('/', 'Applications', 'Google Chrome.app', 'Contents', 'MacOS', 'Google Chrome') - def close_existing_browsers(self): - result = call(['killall', 'Google Chrome'], stdout=DEVNULL, stderr=DEVNULL) - # Give some time to shut down - sleep(2) - return result - @property @lru_cache() def displays(self): diff --git a/systems/win.py b/systems/win.py index 36e07be..9a28cde 100644 --- a/systems/win.py +++ b/systems/win.py @@ -18,9 +18,6 @@ class System(BaseSystem): def browser_path(self): return os.path.join('C:\\', 'Program Files (x86)', 'Google', 'Chrome', 'Application', 'chrome.exe') - def close_existing_browsers(self): - return call('taskkill /f /im chrome.exe', stdout=DEVNULL, stderr=DEVNULL) - @property @lru_cache() def displays(self):