From cee4bfafafc399583a2f4278ed7b34f4305a6fe0 Mon Sep 17 00:00:00 2001 From: "Mingo.Meo" <57440760+mingo-meo@users.noreply.github.com> Date: Sun, 14 Mar 2021 18:01:27 +0800 Subject: [PATCH] Add files via upload --- monitor.ico | Bin 0 -> 102215 bytes monitor.py | 122 ++++++++++++++++++ monitor.spec | 33 +++++ monitor.ui | 232 +++++++++++++++++++++++++++++++++++ monitor_ui.py | 278 ++++++++++++++++++++++++++++++++++++++++++ pyinstaller_build.bat | 2 + ui2py.bat | 1 + 7 files changed, 668 insertions(+) create mode 100644 monitor.ico create mode 100644 monitor.py create mode 100644 monitor.spec create mode 100644 monitor.ui create mode 100644 monitor_ui.py create mode 100644 pyinstaller_build.bat create mode 100644 ui2py.bat diff --git a/monitor.ico b/monitor.ico new file mode 100644 index 0000000000000000000000000000000000000000..982e80146d13fd947e780c0960e141df758f13c7 GIT binary patch literal 102215 zcmeGl2OyQ-_u5L42BktGN=67p&rVUvEM!%P1|d5h5=~0cLR(5G8JVwCN{TeJtP~kV zG!XCm-}`ua*-HJY|GRbGUFV*A?m6eq@A^IfXaEZk7as$Cda#ZWfFu9_FKz*10sud6S_W>T@*A+-l0ZT6{XDI=pKy!O1ndUVrmevs8!otGb!OGp5Nk!e;MMcFM z@~p!F>BFWwNjXle#k5o zhmNkgmDL)Ov=Du3Mko{LbesfcSXWq@LjsVFlQfhK6VpNt6-$8`y0+Gg92^!_uwDlP zP8k6~X-P+W=&UU*)~Lhk5WZwWLZal=goG<{GU^Nhf>6{PIx8UkEsk5HSID^N8tCfi z*jw^LVMFae{281woB{%Lj*e?A`JJR;T`DTdP`?hk2?+^lGIDZqM`aL;P^J9#NdAs4 zoQ}FqTV!-yI5?P;4VYlFoS7iLDpDy2Yy+bXY8{joNncDHQUd(;7D#-S(=4Erq+rmT z!r*^RkkoZL#v&LbjY;48L;$===_n5Yo~FYuW9r>+VCzW#-Y-M!!{!r^PxtTpWvHF7 zy#vV?%`?0Z6d{o3835|P(@wG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from PySide2.QtCore import Qt +from PySide2.QtWidgets import QApplication +from monitor_ui import Ui_Form +from PySide2 import QtCore +import psutil +import threading +import sys + + +class Stats(Ui_Form): + def __init__(self): + super().__init__() + self.setupUi(self) + # self._init_ui() + # 设置窗口无边框; 设置窗口置顶; + self.setWindowFlags(Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint | Qt.Tool) + # 设置窗口背景透明 + # self.setAttribute(Qt.WA_TranslucentBackground) + # 设置透明度(0~1) + self.setWindowOpacity(0.9) + # 设置鼠标为手状 + self.setCursor(Qt.PointingHandCursor) + # 设置初始值 + self.speed = 0 + self.cpu = 0 + self.receive_pre = -1 + self.sent_pre = -1 + self.one_line = ''.join(['*' for i in range(40)]) + + self.timer = QtCore.QTimer(self) + self.timer.start(1000) + self.timer.timeout.connect(self.update_ui_label) + + def update_ui_label(self): + # 开启独立线程 + threading.Thread(target=self.set_labels, daemon=True).start() + + def set_labels(self): + self.set_net_speed() + self.set_cpu_mem() + + def set_net_speed(self): + # 获取网速,当sent_pre或receive_pre为-1时,初始化窗口 + if self.sent_pre == -1 or self.receive_pre == -1: + upload_bytes = 0 + download_bytes = 0 + self.sent_pre = psutil.net_io_counters().bytes_sent + self.receive_pre = psutil.net_io_counters().bytes_recv + else: + upload_bytes = psutil.net_io_counters().bytes_sent - self.sent_pre + download_bytes = psutil.net_io_counters().bytes_recv - self.receive_pre + self.sent_pre += upload_bytes + self.receive_pre += download_bytes + + self.upspeed.setText('↑' + Stats.standard_net_speed(upload_bytes)) + self.downspeed.setText('↓' + Stats.standard_net_speed(download_bytes)) + + def set_cpu_mem(self): + # 整个进程尽量在1S内结束 + cpu_percent = (psutil.cpu_percent(interval=0, percpu=False)) + mem_percent = psutil.virtual_memory().percent + + if cpu_percent >= 100: + cpu_percent = 99 + if mem_percent >= 100: + mem_percent = 99 + + self.cpu_num.setText("%d" % cpu_percent + '%') + self.mem_num.setText("%d" % mem_percent + '%') + + cpu_lines = ''.join([self.one_line + '\n' for i in range(int(cpu_percent)//10 + 1)]) + mem_lines = ''.join([self.one_line + '\n' for i in range(int(mem_percent) // 10 + 1)]) + + self.cpu_gui.setText(cpu_lines) + self.mem_gui.setText(mem_lines) + + @staticmethod + def standard_net_speed(net_bytes: int): + # xxxB/S + if net_bytes < 1000: + if net_bytes < 100: + return " %sB/S" % str(net_bytes) + else: + return "%sB/S" % str(net_bytes) + # xx.xKB/S or xxxKB/S + elif net_bytes >> 10 < 1000: + if net_bytes // 1024 < 100: + return "%.1fKB/S" % (net_bytes / 1024) + else: + return "%sKB/S" % (net_bytes // 1024) + elif net_bytes >> 20 < 1000: + if net_bytes // 1024**2 < 100: + return "%.1fMB/S" % (net_bytes / 1024**2) + else: + return "%sMB/S" % (net_bytes // 1024**2) + elif net_bytes >> 30 < 1024: + if net_bytes // 1024 ** 3 < 100: + return "%.1fGB/S" % (net_bytes / 1024 ** 3) + else: + return "%sGB/S" % (net_bytes // 1024 ** 3) + else: + return "xx.xB/S" + + +if __name__ == '__main__': + # 设置屏幕自适应 + QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling) + + app = QApplication([]) + # 获取主显示器分辨率 + screen_width = app.primaryScreen().geometry().width() + screen_height = app.primaryScreen().geometry().height() + + stats = Stats() + # 设置最初出现的位置 + window_width = stats.geometry().width() + window_height = stats.geometry().height() + stats.setGeometry(screen_width - window_width - 10, screen_height//2 - 150, window_width, window_height) + + stats.show() + sys.exit(app.exec_()) + diff --git a/monitor.spec b/monitor.spec new file mode 100644 index 0000000..bcfcdc7 --- /dev/null +++ b/monitor.spec @@ -0,0 +1,33 @@ +# -*- mode: python ; coding: utf-8 -*- + +block_cipher = None + + +a = Analysis(['monitor.py'], + pathex=['D:\\pyqtgui\\monitor_git'], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='monitor', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False , icon='monitor.ico') diff --git a/monitor.ui b/monitor.ui new file mode 100644 index 0000000..b30f306 --- /dev/null +++ b/monitor.ui @@ -0,0 +1,232 @@ + + + Form + + + + 0 + 0 + 214 + 141 + + + + + + + background-color: rgb(0, 0, 0); + + + + + 80 + 39 + 22 + 31 + + + + + Agency FB + 1 + 75 + true + false + + + + Qt::LeftToRight + + + color: rgb(85, 170, 255); +border: 1px solid; +border-color: rgb(85, 170, 255); + + + ************************************* +******************************************* +************************************* +*********************************** +************************* +*********************************** +*************************************** +******************************************* +******************************** + + + + + + + + + + +********************************* + + + Qt::AutoText + + + false + + + Qt::AlignBottom|Qt::AlignHCenter + + + false + + + 0 + + + -3 + + + + + + 80 + 21 + 16 + 16 + + + + color: rgb(85, 170, 255); + + + 0% + + + Qt::AlignCenter + + + + + + 120 + 40 + 22 + 31 + + + + + Agency FB + 1 + 75 + true + false + + + + Qt::LeftToRight + + + color: rgb(170, 255, 255); +border: 1px solid; +border-color: rgb(170, 255, 255); + + + ************************************* +******************************************* +************************************* +*********************************** +************************* +*********************************** +*************************************** +******************************************* +******************************** + + + + + + + + + + +********************************* + + + Qt::AutoText + + + false + + + Qt::AlignBottom|Qt::AlignHCenter + + + false + + + 0 + + + -3 + + + + + + 120 + 22 + 18 + 16 + + + + color: rgb(170, 255, 255); + + + 99% + + + Qt::AlignCenter + + + + + + 10 + 60 + 68 + 12 + + + + color: rgb(85, 255, 0); + + + 100.5KB/S + + + + + + 10 + 30 + 54 + 16 + + + + color: rgb(255, 170, 0); + + + 100.5KB/S + + + layoutWidget + cpu_num + cpu_gui + mem_num + mem_gui + downspeed + + + + diff --git a/monitor_ui.py b/monitor_ui.py new file mode 100644 index 0000000..cb88a89 --- /dev/null +++ b/monitor_ui.py @@ -0,0 +1,278 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'monitor.ui' +## +## Created by: Qt User Interface Compiler version 5.15.2 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide2.QtCore import QPropertyAnimation, QRect, Qt, QCoreApplication, QMetaObject +from PySide2.QtGui import QMouseEvent, QFont +from PySide2.QtWidgets import QWidget, QApplication, QMenu, QLabel +from PySide2 import QtWidgets + + +class Ui_Form(QWidget, object): + + def __init__(self): + super().__init__() + self._startPos = None + self._wmGap = None + self.hidden = False + dsk = QApplication.primaryScreen() + self.screen_width = dsk.geometry().width() + self.screen_height = dsk.geometry().height() + self.window_width = 140 + self.window_height = 50 + self.label_size = 'font: 13px' + self.cpu_gui_x = 75 + + def enterEvent(self, event): + self.hide_or_show('show', event) + + def leaveEvent(self, event): + self.hide_or_show('hide', event) + + def hide_or_show(self, mode, event): + # 获取窗口左上角x,y + pos = self.frameGeometry().topLeft() + if mode == 'show' and self.hidden: + # 窗口左上角x + 窗口宽度 大于屏幕宽度,从右侧滑出 + if pos.x() + self.window_width >= self.screen_width: + # 需要留10在里边,否则边界跳动 + self.startAnimation(self.screen_width - self.window_width, pos.y()) + event.accept() + self.hidden = False + # 窗口左上角x 小于0, 从左侧滑出 + elif pos.x() <= 0: + self.startAnimation(0, pos.y()) + event.accept() + self.hidden = False + # 窗口左上角y 小于0, 从上方滑出 + elif pos.y() <= 0: + self.startAnimation(pos.x(), 0) + event.accept() + self.hidden = False + elif mode == 'hide' and (not self.hidden): + if pos.x() + self.window_width >= self.screen_width: + # 留10在外面 + self.startAnimation(self.screen_width - 10, pos.y(), mode, 'right') + event.accept() + self.hidden = True + elif pos.x() <= 0: + # 留10在外面 + self.startAnimation(10 - self.window_width, pos.y(), mode, 'left') + event.accept() + self.hidden = True + elif pos.y() <= 0: + # 留10在外面 + self.startAnimation(pos.x(), 10 - self.window_height, mode, 'up') + event.accept() + self.hidden = True + + def startAnimation(self, x, y, mode='show', direction=None): + animation = QPropertyAnimation(self, b"geometry", self) + # 滑出动画时长 + animation.setDuration(200) + # 隐藏时,只留10在外边,防止跨屏 + # QRect限制其大小,防止跨屏 + num = QApplication.desktop().screenCount() + if mode == 'hide': + if direction == 'right': + animation.setEndValue(QRect(x, y, 10, self.window_height)) + elif direction == 'left': + # 多屏时采用不同的隐藏方法,防止跨屏 + if num < 2: + animation.setEndValue(QRect(x, y, self.window_width, self.window_height)) + else: + animation.setEndValue(QRect(0, y, 10, self.window_height)) + else: + if num < 2: + animation.setEndValue(QRect(x, y, self.window_width, self.window_height)) + else: + animation.setEndValue(QRect(x, 0, self.window_width, 10)) + else: + animation.setEndValue(QRect(x, y, self.window_width, self.window_height)) + animation.start() + + def mouseMoveEvent(self, event: QMouseEvent): + # event.pos()减去最初相对窗口位置,获得移动距离(x,y) + self._wmGap = event.pos() - self._startPos + # 移动窗口,保持鼠标与窗口的相对位置不变 + # 检查是否移除了当前主屏幕 + # 左方界限 + final_pos = self.pos() + self._wmGap + if self.frameGeometry().topLeft().x() + self._wmGap.x() <= 0: + final_pos.setX(0) + # 上方界限 + if self.frameGeometry().topLeft().y() + self._wmGap.y() <= 0: + final_pos.setY(0) + # 右方界限 + if self.frameGeometry().bottomRight().x() + self._wmGap.x() >= self.screen_width: + final_pos.setX(self.screen_width - self.window_width) + # 下方界限 + if self.frameGeometry().bottomRight().y() + self._wmGap.y() >= self.screen_height: + final_pos.setY(self.screen_height - self.window_height) + self.move(final_pos) + + def mousePressEvent(self, event: QMouseEvent): + if event.button() == Qt.LeftButton: + # event.pos() 鼠标相对窗口的位置 + # event.globalPos() 鼠标在屏幕的绝对位置 + self._startPos = event.pos() + if event.button() == Qt.RightButton: + # 创建右键菜单 + menu = QMenu(self) + menu.setStyleSheet(u"background-color: white;\n" + "selection-color: rgb(0, 255, 127);\n" + "selection-background-color: gray;\n" + "font: 8pt;") + # 二级菜单 + size_menu = menu.addMenu('Bkcolor') + light_gray = size_menu.addAction('Light-Gray') + gray = size_menu.addAction('Gray') + black = size_menu.addAction('Black') + + show_menu = menu.addMenu('Show') + show_all = show_menu.addAction('show_all') + speed_only = show_menu.addAction('speed_only') + # 普通菜单 + quit_action = menu.addAction('Exit') + about_action = menu.addAction('About') + # 窗口定位到鼠标处 + action = menu.exec_(self.mapToGlobal(event.pos())) + # 显示网速或全部显示 + if action == show_all: + self.window_width = 140 + self.setGeometry(self.x(), self.y(), self.window_width, 50) + if action == speed_only: + self.window_width = 75 + self.setGeometry(self.x(), self.y(), self.window_width, 50) + # 改变背景色 + if action == light_gray: + self.setStyleSheet(u"background-color: rgb(100, 100, 100)") + if action == gray: + self.setStyleSheet(u"background-color: rgb(50, 50, 50)") + if action == black: + self.setStyleSheet(u"background-color: black") + + if action == quit_action: + QCoreApplication.quit() + if action == about_action: + # 新建MessageBox + msg_box = QtWidgets.QMessageBox() + # 支持HTML输入 + msg_box.about(self, "About", "" + "--------------------------" + "

" + "Author: Mingo.Meo" + "

" + "

" + "Version: 1.0.0" + "

" + "

" + "More: " + "Visit Me" + "

" + "
") + + def mouseReleaseEvent(self, event: QMouseEvent): + if event.button() == Qt.LeftButton: + self._startPos = None + self._wmGap = None + if event.button() == Qt.RightButton: + self._startPos = None + self._wmGap = None + + def setupUi(self, Form): + if not Form.objectName(): + Form.setObjectName(u"Form") + # 设置gui的font,获得小号字体 + font = QFont() + font.setFamily(u"Agency FB") + font.setPointSize(1) + font.setBold(True) + font.setWeight(75) + font.setKerning(False) + + Form.resize(self.window_width, self.window_height) + #Form.setStyleSheet(u"background-color: rgb(89, 89, 89)") + # Form.setStyleSheet(u"background-color: rgb(60, 60, 60)") + Form.setStyleSheet(u"background-color: rgb(50, 50, 50)") + + self.cpu_gui = QLabel(Form) + self.cpu_gui.setObjectName(u"cpu_gui") + self.cpu_gui.setGeometry(QRect(self.cpu_gui_x, 18, 20, 24)) + self.cpu_gui.setFont(font) + self.cpu_gui.setLayoutDirection(Qt.LeftToRight) + self.cpu_gui.setStyleSheet(u"color: rgb(85, 170, 255);\n" + "border: 1px solid;\n" + "border-color: rgb(85, 170, 255);") + self.cpu_gui.setTextFormat(Qt.AutoText) + self.cpu_gui.setScaledContents(False) + self.cpu_gui.setAlignment(Qt.AlignBottom|Qt.AlignHCenter) + self.cpu_gui.setWordWrap(False) + self.cpu_gui.setMargin(0) + self.cpu_gui.setIndent(-3) + + self.cpu_num = QLabel(Form) + self.cpu_num.setObjectName(u"cpu_num") + self.cpu_num.setGeometry(QRect(self.cpu_gui_x, 0, 20, 16)) + self.cpu_num.setStyleSheet(u"color: rgb(85, 170, 255);\n%s" % self.label_size) + self.cpu_num.setAlignment(Qt.AlignCenter) + + self.mem_gui = QLabel(Form) + self.mem_gui.setObjectName(u"mem_gui") + self.mem_gui.setGeometry(QRect(self.cpu_gui_x + 30, 18, 20, 24)) + self.mem_gui.setFont(font) + self.mem_gui.setLayoutDirection(Qt.LeftToRight) + self.mem_gui.setStyleSheet(u"color: rgb(170, 255, 255);\n" + "border: 1px solid;\n" + "border-color: rgb(170, 255, 255);") + self.mem_gui.setTextFormat(Qt.AutoText) + self.mem_gui.setScaledContents(False) + self.mem_gui.setAlignment(Qt.AlignBottom|Qt.AlignHCenter) + self.mem_gui.setWordWrap(False) + self.mem_gui.setMargin(0) + self.mem_gui.setIndent(-3) + + self.mem_num = QLabel(Form) + self.mem_num.setObjectName(u"mem_num") + self.mem_num.setGeometry(QRect(self.cpu_gui_x + 30, 0, 20, 16)) + self.mem_num.setStyleSheet(u"color: rgb(170, 255, 255);\n%s" % self.label_size) + self.mem_num.setAlignment(Qt.AlignCenter) + + self.upspeed = QLabel(Form) + self.upspeed.setObjectName(u"upspeed") + self.upspeed.setGeometry(QRect(0, 5, 70, 16)) + self.upspeed.setStyleSheet(u"color: rgb(255, 170, 0);\n%s" % self.label_size) + + self.downspeed = QLabel(Form) + self.downspeed.setObjectName(u"downspeed") + self.downspeed.setGeometry(QRect(0, 30, 70, 16)) + self.downspeed.setStyleSheet(u"color: rgb(85, 255, 0);\n%s" % self.label_size) + + self.cpu_num.raise_() + self.cpu_gui.raise_() + self.mem_num.raise_() + self.mem_gui.raise_() + self.upspeed.raise_() + self.downspeed.raise_() + + self.retranslateUi(Form) + + QMetaObject.connectSlotsByName(Form) + # setupUi + + def retranslateUi(self, Form): + Form.setWindowTitle("") + one_line = ''.join(['*' for i in range(40)]) + n_line = ''.join([one_line + '\n' for i in range(5)]) + self.cpu_gui.setText(QCoreApplication.translate("Form", n_line, None)) + self.cpu_num.setText(QCoreApplication.translate("Form", u"0%", None)) + self.mem_gui.setText(QCoreApplication.translate("Form", n_line, None)) + self.mem_num.setText(QCoreApplication.translate("Form", u"0%", None)) + self.downspeed.setText(QCoreApplication.translate("Form", u"↓0.0KB/S", None)) + self.upspeed.setText(QCoreApplication.translate("Form", u"↑0.0KB/S", None)) \ No newline at end of file diff --git a/pyinstaller_build.bat b/pyinstaller_build.bat new file mode 100644 index 0000000..ec4aec2 --- /dev/null +++ b/pyinstaller_build.bat @@ -0,0 +1,2 @@ +REM Use pyinstaller.exe under python3.9 +pyinstaller -F -w -i monitor.ico monitor.py \ No newline at end of file diff --git a/ui2py.bat b/ui2py.bat new file mode 100644 index 0000000..eae930f --- /dev/null +++ b/ui2py.bat @@ -0,0 +1 @@ +pyside2-uic.exe monitor.ui > monitor_ui.py \ No newline at end of file