mirror of
https://github.com/Steve-Tech/YAFI.git
synced 2026-04-20 01:00:37 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b33f75b86 | ||
|
|
076f903fbc | ||
|
|
d65a033523 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -30,7 +30,7 @@ MANIFEST
|
|||||||
# Usually these files are written by a python script from a template
|
# Usually these files are written by a python script from a template
|
||||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
*.manifest
|
*.manifest
|
||||||
*.spec
|
#*.spec
|
||||||
|
|
||||||
# Installer logs
|
# Installer logs
|
||||||
pip-log.txt
|
pip-log.txt
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
include yafi/ui/*.ui
|
|
||||||
include yafi/yafi.gresource
|
include yafi/yafi.gresource
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Yet Another Framework Interface
|
# Yet Another Framework Interface
|
||||||
|
|
||||||
YAFI is another GUI for the Framework Laptop Embedded Controller.
|
YAFI is another GUI for the Framework Laptop Embedded Controller.
|
||||||
It is written in Python with a GTK4 Adwaita theme, and uses the `CrOS_EC_Python` library to communicate with the EC.
|
It is written in Python with a GTK4 Adwaita theme, and uses the [`CrOS_EC_Python`](https://github.com/Steve-Tech/CrOS_EC_Python) library to communicate with the EC.
|
||||||
|
|
||||||
It has support for fan control, temperature monitoring, LED control, and battery limiting.
|
It has support for fan control, temperature monitoring, LED control, and battery limiting.
|
||||||
|
|
||||||
@@ -36,6 +36,11 @@ Install the package with `pip install yafi`.
|
|||||||
|
|
||||||
Pipx is also supported.
|
Pipx is also supported.
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
It is possible to run YAFI on Windows using [gvsbuild](https://github.com/wingtk/gvsbuild/) and installing YAFI via pip. You will also need to copy `WinRing0x64.dll` and `WinRing0x64.sys` to either the same
|
||||||
|
directory as `python.exe`, or to `C:\Windows\System32`.
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
### Fan Control and Temperature Monitoring
|
### Fan Control and Temperature Monitoring
|
||||||
|
|||||||
5
pyinstaller/winyafi.py
Normal file
5
pyinstaller/winyafi.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import os
|
||||||
|
os.environ["GDK_SCALE"] = "2"
|
||||||
|
|
||||||
|
from yafi import main
|
||||||
|
main()
|
||||||
43
pyinstaller/winyafi.spec
Normal file
43
pyinstaller/winyafi.spec
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# -*- mode: python ; coding: utf-8 -*-
|
||||||
|
from PyInstaller.utils.hooks import collect_data_files
|
||||||
|
|
||||||
|
datas = []
|
||||||
|
datas += collect_data_files('yafi')
|
||||||
|
|
||||||
|
|
||||||
|
a = Analysis(
|
||||||
|
['winyafi.py'],
|
||||||
|
pathex=[],
|
||||||
|
binaries=[('WinRing0x64.dll', '.')],
|
||||||
|
datas=datas,
|
||||||
|
hiddenimports=['cros_ec_python'],
|
||||||
|
hookspath=[],
|
||||||
|
hooksconfig={"gi":{"module-versions": {"Gtk": "4.0"}}},
|
||||||
|
runtime_hooks=[],
|
||||||
|
excludes=[],
|
||||||
|
noarchive=False,
|
||||||
|
optimize=0,
|
||||||
|
)
|
||||||
|
pyz = PYZ(a.pure)
|
||||||
|
|
||||||
|
exe = EXE(
|
||||||
|
pyz,
|
||||||
|
a.scripts,
|
||||||
|
a.binaries,
|
||||||
|
a.datas,
|
||||||
|
[],
|
||||||
|
name='winyafi',
|
||||||
|
debug=False,
|
||||||
|
bootloader_ignore_signals=False,
|
||||||
|
strip=False,
|
||||||
|
upx=True,
|
||||||
|
upx_exclude=[],
|
||||||
|
runtime_tmpdir=None,
|
||||||
|
console=False,
|
||||||
|
disable_windowed_traceback=False,
|
||||||
|
argv_emulation=False,
|
||||||
|
target_arch=None,
|
||||||
|
codesign_identity=None,
|
||||||
|
entitlements_file=None,
|
||||||
|
uac_admin=True,
|
||||||
|
)
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "yafi"
|
name = "yafi"
|
||||||
version = "0.1"
|
version = "0.2"
|
||||||
authors = [
|
authors = [
|
||||||
{ name="Steve-Tech" }
|
{ name="Steve-Tech" }
|
||||||
]
|
]
|
||||||
@@ -8,7 +8,7 @@ description = "Yet Another Framework Interface"
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cros_ec_python >= 0.0.2",
|
"cros_ec_python >= 0.0.4",
|
||||||
"PyGObject"
|
"PyGObject"
|
||||||
]
|
]
|
||||||
classifiers = [
|
classifiers = [
|
||||||
|
|||||||
14
yafi/leds.py
14
yafi/leds.py
@@ -95,12 +95,14 @@ class LedsPage(Gtk.Box):
|
|||||||
all_colours = ["Red", "Green", "Blue", "Yellow", "White", "Amber"]
|
all_colours = ["Red", "Green", "Blue", "Yellow", "White", "Amber"]
|
||||||
|
|
||||||
def add_colours(strings, led_id):
|
def add_colours(strings, led_id):
|
||||||
supported_colours = ec_commands.leds.led_control_get_max_values(
|
# Auto and Off should already be present
|
||||||
app.cros_ec, led_id
|
if strings.get_n_items() <= 2:
|
||||||
)
|
supported_colours = ec_commands.leds.led_control_get_max_values(
|
||||||
for i, colour in enumerate(all_colours):
|
app.cros_ec, led_id
|
||||||
if supported_colours[i]:
|
)
|
||||||
strings.append(colour)
|
for i, colour in enumerate(all_colours):
|
||||||
|
if supported_colours[i]:
|
||||||
|
strings.append(colour)
|
||||||
|
|
||||||
add_colours(
|
add_colours(
|
||||||
led_pwr_colour_strings, ec_commands.leds.EcLedId.EC_LED_ID_POWER_LED
|
led_pwr_colour_strings, ec_commands.leds.EcLedId.EC_LED_ID_POWER_LED
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ class YafiApplication(Adw.Application):
|
|||||||
developers=["Stephen Horvath"],
|
developers=["Stephen Horvath"],
|
||||||
issue_url="https://github.com/Steve-Tech/YAFI/issues",
|
issue_url="https://github.com/Steve-Tech/YAFI/issues",
|
||||||
license_type=Gtk.License.GPL_2_0,
|
license_type=Gtk.License.GPL_2_0,
|
||||||
version="0.1.0",
|
version="0.2",
|
||||||
website="https://github.com/Steve-Tech/YAFI",
|
website="https://github.com/Steve-Tech/YAFI",
|
||||||
)
|
)
|
||||||
about.add_acknowledgement_section(None, ["Framework Computer Inc. https://frame.work/"])
|
about.add_acknowledgement_section(None, ["Framework Computer Inc. https://frame.work/"])
|
||||||
|
|||||||
Reference in New Issue
Block a user