From c7d5b898a8cc2eafe836b88971e02c70b657c20a Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Tue, 13 Oct 2015 13:10:47 +0200 Subject: ext/rifle.py: Fix the "X" specifier for Mac OS X On Mac OS X the "$DISPLAY" environmental variable is never set. Checking for it to check if there is a graphical environment available will not work. I think it can be safely assumed that Mac OS X is always running with GUI. Calling it "X" is a bit of a misnomer considering Mac OS X does not use X11, but I think it still conveys the meaning well. --- ranger/ext/rifle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py index 504851b1..5d13a5bf 100755 --- a/ranger/ext/rifle.py +++ b/ranger/ext/rifle.py @@ -231,7 +231,7 @@ class Rifle(object): self._app_flags = argument return True elif function == 'X': - return 'DISPLAY' in os.environ + return sys.platform == 'darwin' or 'DISPLAY' in os.environ elif function == 'env': return bool(os.environ.get(argument)) elif function == 'else': -- cgit 1.4.1-2-gfad0