summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2015-10-13 13:10:47 +0200
committerWojciech Siewierski <wojciech.siewierski@onet.pl>2015-10-13 13:21:31 +0200
commitc7d5b898a8cc2eafe836b88971e02c70b657c20a (patch)
treed393619181f8752e4b16f61185f09fb9a38c5ff5 /ranger
parent91d784a677604c4bb82db3007c5606a258971acc (diff)
downloadranger-c7d5b898a8cc2eafe836b88971e02c70b657c20a.tar.gz
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.
Diffstat (limited to 'ranger')
-rwxr-xr-xranger/ext/rifle.py2
1 files changed, 1 insertions, 1 deletions
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':