summaryrefslogtreecommitdiff
path: root/nitroplasm.py
diff options
context:
space:
mode:
Diffstat (limited to 'nitroplasm.py')
-rwxr-xr-xnitroplasm.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/nitroplasm.py b/nitroplasm.py
index aed2ce1..c0b24aa 100755
--- a/nitroplasm.py
+++ b/nitroplasm.py
@@ -21,7 +21,6 @@ from PyQt5.QtWidgets import \
QSizePolicy
import sys
from PyQt5.QtGui import QPixmap
-from Xlib import display
import subprocess
import dbus
import argparse
@@ -105,15 +104,13 @@ class Window(QWidget):
self.layout = self.layout_selector.itemData(index)
def get_displays(self):
- if 'RANDR' in display.Display().list_extensions():
- try:
- output = [l for l in subprocess.check_output(["xrandr"]).decode("utf-8").splitlines()]
- return len([l.split()[0] for l in output if " connected " in l])
- except:
- return 1
- else:
+ try:
+ output = [l for l in subprocess.check_output(["xrandr"]).decode("utf-8").splitlines()]
+ return len([l.split()[0] for l in output if " connected " in l])
+ except:
return 1
+
def set_monitor(self, index):
self.monitor = self.monitor_selector.itemData(index)