mirror of
https://github.com/Steve-Tech/YAFI.git
synced 2026-04-19 16:50:36 +00:00
Fix fan control, attempt to make compatible with pipx
This commit is contained in:
@@ -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",
|
"cros_ec_python >= 0.0.2",
|
||||||
"PyGObject"
|
"PyGObject"
|
||||||
]
|
]
|
||||||
classifiers = [
|
classifiers = [
|
||||||
@@ -26,3 +26,6 @@ lpc = ["portio"]
|
|||||||
[project.urls]
|
[project.urls]
|
||||||
Repository = "https://github.com/Steve-Tech/YAFI"
|
Repository = "https://github.com/Steve-Tech/YAFI"
|
||||||
Issues = "https://github.com/Steve-Tech/YAFI/issues"
|
Issues = "https://github.com/Steve-Tech/YAFI/issues"
|
||||||
|
|
||||||
|
[project.gui-scripts]
|
||||||
|
yafi = "yafi:main"
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
from . import yafi
|
from . import yafi
|
||||||
|
yafi.main()
|
||||||
|
|||||||
11
yafi/yafi.py
11
yafi/yafi.py
@@ -93,7 +93,7 @@ class YAFI(Adw.Application):
|
|||||||
fan_percent_scale = thermals_builder.get_object("fan-percent-scale")
|
fan_percent_scale = thermals_builder.get_object("fan-percent-scale")
|
||||||
|
|
||||||
# Don't let the user change the fans if they can't get back to auto
|
# Don't let the user change the fans if they can't get back to auto
|
||||||
if not ec_commands.general.get_cmd_versions(
|
if ec_commands.general.get_cmd_versions(
|
||||||
self.cros_ec, ec_commands.thermal.EC_CMD_THERMAL_AUTO_FAN_CTRL
|
self.cros_ec, ec_commands.thermal.EC_CMD_THERMAL_AUTO_FAN_CTRL
|
||||||
):
|
):
|
||||||
|
|
||||||
@@ -141,6 +141,8 @@ class YAFI(Adw.Application):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
fan_set_rpm.set_sensitive(False)
|
fan_set_rpm.set_sensitive(False)
|
||||||
|
else:
|
||||||
|
fan_mode.set_sensitive(False)
|
||||||
|
|
||||||
# Temperature sensors
|
# Temperature sensors
|
||||||
temperatures = thermals_builder.get_object("temperatures")
|
temperatures = thermals_builder.get_object("temperatures")
|
||||||
@@ -649,6 +651,9 @@ class YAFI(Adw.Application):
|
|||||||
|
|
||||||
self.win.present()
|
self.win.present()
|
||||||
|
|
||||||
|
def main():
|
||||||
|
app = YAFI(application_id="au.stevetech.yafi")
|
||||||
|
app.run(sys.argv)
|
||||||
|
|
||||||
app = YAFI(application_id="au.stevetech.yafi")
|
if __name__ == "__main__":
|
||||||
app.run(sys.argv)
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user