dotfiles/Code/User/History/-2022988a/3Qgu

24 lines
539 B
Python
Executable File

#!/usr/bin/python3
from PyQt5 import QtWidgets
from QTermWidget import QTermWidget
class Terminal(QTermWidget):
def __init__(self, process: str, args: list):
super().__init__(0)
self.finished.connect(self.close)
self.setTerminalSizeHint(False)
self.setColorScheme("DarkPastels")
self.setShellProgram(process)
self.setArgs(args)
self.startShellProgram()
self.show()
app = QtWidgets.QApplication([])
args = ["pacman", "-Syu"]
term = Terminal("sudo", args)
app.exec()