mirror of
https://github.com/Steve-Tech/YAFI.git
synced 2026-04-20 01:00:37 +00:00
Compare commits
9 Commits
0.6
...
copilot/ca
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25b93e7597 | ||
|
|
90a994a685 | ||
|
|
7b123da001 | ||
|
|
c8fd626446 | ||
|
|
0f6fee40ae | ||
|
|
4a788c2395 | ||
|
|
d2f34c9b5a | ||
|
|
4958722edd | ||
|
|
23b54ee397 |
2
.github/FUNDING.yml
vendored
Normal file
2
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
github: [Steve-Tech]
|
||||
thanks_dev: u/gh/steve-tech
|
||||
10
README.md
10
README.md
@@ -11,6 +11,8 @@ You can download the latest release from the [Releases page](https://github.com/
|
||||
|
||||
There are builds for Flatpak, and PyInstaller for portable execution on Linux or Windows.
|
||||
|
||||
YAFI is also available on [Flathub](https://flathub.org/en/apps/au.stevetech.yafi): `flatpak install flathub au.stevetech.yafi`.
|
||||
|
||||
### Linux
|
||||
|
||||
To allow YAFI to communicate with the EC, you need to copy the [`60-cros_ec_python.rules`](60-cros_ec_python.rules) file to `/etc/udev/rules.d/` and reload the rules with `sudo udevadm control --reload-rules && sudo udevadm trigger`.
|
||||
@@ -21,6 +23,8 @@ If your Laptop's BIOS supports Framework's EC driver, there is no need to instal
|
||||
|
||||
Otherwise, YAFI supports the [PawnIO](https://pawnio.eu/) driver, and will be automatically used if installed and there is no Framework driver available. YAFI will need to be run as administrator to communicate with the driver.
|
||||
|
||||
Currently the PawnIO driver does not support Framework 13 mainboards with 11th, 12th, or 13th Gen Intel CPUs.
|
||||
|
||||
## Building
|
||||
|
||||
### Flatpak
|
||||
@@ -88,3 +92,9 @@ This error occurs when `/dev/cros_ec` is not found, and the `CrOS_EC_Python` lib
|
||||
You can either update your kernel to have a working `cros_ec_dev` driver, or run YAFI as root.
|
||||
|
||||
It can also occur if you do not have a CrOS EC, like on non Framework laptops.
|
||||
|
||||
## Disclaimer
|
||||
|
||||
YAFI is not affiliated with Framework Computer Inc. in any way.
|
||||
|
||||
YAFI is licensed under the [GPL-2.0-or-later license](COPYING), and comes with no warranty or guarantee of any kind. Use at your own risk.
|
||||
|
||||
@@ -7,7 +7,19 @@
|
||||
<name>Yet Another Framework Interface</name>
|
||||
<summary>YAFI is another GUI for the Framework Laptop Embedded Controller</summary>
|
||||
<description>
|
||||
<p>It is written in Python with a GTK4 Adwaita theme, and uses the `CrOS_EC_Python` library to communicate with the EC.</p>
|
||||
<p>It is written in Python with a GTK4 Adwaita theme, and uses the CrOS_EC_Python library to communicate with the EC.</p>
|
||||
<p>YAFI has the capability for the following features:</p>
|
||||
<ul>
|
||||
<li>Fan control and temperature monitoring</li>
|
||||
<li>LED control</li>
|
||||
<li>Battery statistics</li>
|
||||
<li>Battery limiting</li>
|
||||
<li>Hardware information</li>
|
||||
</ul>
|
||||
|
||||
<p>You will need to install the udev rules to allow non-root access to the EC device. See the README for more information.</p>
|
||||
|
||||
<p>YAFI is not affiliated with Framework Computer Inc. in any way.</p>
|
||||
</description>
|
||||
|
||||
<developer id="au.stevetech">
|
||||
|
||||
11
yafi/leds.py
11
yafi/leds.py
@@ -48,11 +48,19 @@ class LedsPage(Gtk.Box):
|
||||
ec_commands.framework_laptop.set_fp_led_level(app.cros_ec, value)
|
||||
self.led_pwr.set_subtitle(["High", "Medium", "Low"][value])
|
||||
|
||||
try:
|
||||
current_fp_level = ec_commands.framework_laptop.get_fp_led_level(
|
||||
app.cros_ec
|
||||
).value
|
||||
self.led_pwr_scale.set_value(abs(current_fp_level - 2))
|
||||
self.led_pwr.set_subtitle(["High", "Medium", "Low"][current_fp_level])
|
||||
except ValueError:
|
||||
# LED isn't a normal value
|
||||
current_fp_level = ec_commands.framework_laptop.get_fp_led_level_int(
|
||||
app.cros_ec
|
||||
)
|
||||
self.led_pwr.set_subtitle(f"Custom ({current_fp_level}%)")
|
||||
|
||||
self.led_pwr_scale.connect("value-changed", handle_led_pwr)
|
||||
except ec_exceptions.ECError as e:
|
||||
if e.ec_status == ec_exceptions.EcStatus.EC_RES_INVALID_COMMAND:
|
||||
@@ -111,6 +119,9 @@ class LedsPage(Gtk.Box):
|
||||
else:
|
||||
raise e
|
||||
|
||||
# Power LED does not support Blue, even though Intel models think they do
|
||||
leds[ec_commands.leds.EcLedId.EC_LED_ID_POWER_LED][2] = 0
|
||||
|
||||
def handle_led_colour(combobox, led_id):
|
||||
colour = combobox.get_selected() - 2
|
||||
match colour:
|
||||
|
||||
@@ -135,8 +135,9 @@ class YafiApplication(Adw.Application):
|
||||
about = Adw.AboutDialog(
|
||||
application_icon="au.stevetech.yafi",
|
||||
application_name="Yet Another Framework Interface",
|
||||
comments="YAFI is another GUI for the Framework Laptop Embedded Controller.\n"
|
||||
+ "It is written in Python with a GTK3 theme, and uses the `CrOS_EC_Python` library to communicate with the EC.",
|
||||
comments="YAFI is another GUI for the Framework Laptop Embedded Controller.\n\n"
|
||||
+ "It is written in Python with a GTK4 Adwaita theme, and uses the CrOS_EC_Python library to communicate with the EC.\n\n"
|
||||
+ "YAFI is not affiliated with Framework Computer Inc. in any way.",
|
||||
copyright="© 2025 Stephen Horvath",
|
||||
developer_name="Stephen Horvath",
|
||||
developers=["Stephen Horvath https://github.com/Steve-Tech"],
|
||||
|
||||
Reference in New Issue
Block a user