Skip to content

Commit

Permalink
Update wm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
xircon authored Dec 31, 2016
1 parent 93366b1 commit a5d8296
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions wm.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env python
from PyQt4 import QtGui, QtCore


import os
import time
import os.path

#Is compton installed????
compton="/usr/bin/compton"
compx=os.path.isfile(compton)

class Window(QtGui.QWidget):
def __init__(self):
Expand All @@ -31,9 +33,10 @@ def __init__(self):
self.button2.clicked.connect(self.handleButton2)
layout.addWidget(self.button2)

self.button3 = QtGui.QPushButton('Metacity + Compton', self)
self.button3.clicked.connect(self.handleButton3)
layout.addWidget(self.button3)
if compx:
self.button3 = QtGui.QPushButton('Metacity + Compton', self)
self.button3.clicked.connect(self.handleButton3)
layout.addWidget(self.button3)

fname="/usr/bin/xfwm4"
if os.path.isfile(fname):
Expand All @@ -50,9 +53,10 @@ def __init__(self):
self.button5.clicked.connect(self.handleButton5)
layout.addWidget(self.button5)

self.button6 = QtGui.QPushButton('xfwm4 + Compton', self)
self.button6.clicked.connect(self.handleButton6)
layout.addWidget(self.button6)
if compx:
self.button6 = QtGui.QPushButton('xfwm4 + Compton', self)
self.button6.clicked.connect(self.handleButton6)
layout.addWidget(self.button6)

fname="/usr/bin/compiz"
if os.path.isfile(fname):
Expand All @@ -76,10 +80,10 @@ def __init__(self):
self.button8.clicked.connect(self.handleButton8)
layout.addWidget(self.button8)

self.button9 = QtGui.QPushButton('openbox + Compton', self)
self.button9.clicked.connect(self.handleButton9)
#self.button9.setStyleSheet("background-color: green")
layout.addWidget(self.button9)
if compx:
self.button9 = QtGui.QPushButton('openbox + Compton', self)
self.button9.clicked.connect(self.handleButton9)
layout.addWidget(self.button9)

def handleButton1(self):
#Metacity no compositor
Expand Down Expand Up @@ -121,7 +125,7 @@ def handleButton6(self):
def handleButton7(self):
print("Button7")
os.system("killall compton")
os.system("compiz --replace ccp &")
os.system("compiz --replace &")

def handleButton8(self):
print("Button8")
Expand Down

0 comments on commit a5d8296

Please sign in to comment.