from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import sys
class Example(QMainWindow):
def __init__(self):
super().__init__()
self.movie_screen = QLabel(self)
self.movie_screen.setGeometry(300, 50, 500, 500)
self.setFixedSize(600, 600)
self.setWindowFlags(Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint | Qt.MSWindowsFixedSizeDialogHint)
self.movie_screen.setWindowFlags(Qt.MSWindowsFixedSizeDialogHint)
self.setAttribute(Qt.WA_TranslucentBackground)
self.movie_screen.setAttribute(Qt.WA_TranslucentBackground)
self.movie = QMovie("loading.gif")
self.movie_screen.setMovie(self.movie)
self.movie.start()
if __name__ == "__main__":
qApp = QApplication([])
app = Example()
app.show()
qApp.exec()
[root@y500-fedora ~]# cat /etc/systemd/system/foo.service
[Unit]
Description=foo
[Service]
ExecStart=/bin/bash -c "while true; do /bin/inotifywait -qq --event close_write /sys/class/backlight/acpi_video0/brightness; su myusername -c '/bin/xbacklight -display :0 -set $(cat /sys/class/backlight/acpi_video0/brightness)'; done"
[Install]
WantedBy=multi-user.target