Persist Framework power-button lighting across reboots

This commit is contained in:
ajp_anton committed 2026-10-20 13:30:03 +00:00
1 parent ddb912d4ba
commit dc2372ef3f
10 files changed
+142 -5

No files matched your search

+5 -1
View File
@@ -13,7 +13,7 @@ find_package(KF6Auth REQUIRED)
find_package(KF6Service REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(Systemd REQUIRED IMPORTED_TARGET libsystemd)
add_library(framework-hardware STATIC src/hardware.cpp src/fan.cpp src/cpu.cpp src/power.cpp)
add_library(framework-hardware STATIC src/hardware.cpp src/fan.cpp src/cpu.cpp src/power.cpp src/lighting.cpp)
target_include_directories(framework-hardware PUBLIC src)
target_link_libraries(framework-hardware PUBLIC Qt6::Core)
set(gui_sources src/window.cpp src/chart.cpp src/legend.cpp src/tray.cpp src/traypage.cpp src/colorbutton.cpp src/cpupage.cpp src/valuecontrol.cpp src/tooltip.cpp src/processusage.cpp)
@@ -25,16 +25,20 @@ add_executable(framework-laptop-tools-fan src/fanservice.cpp)
target_link_libraries(framework-laptop-tools-fan PRIVATE framework-hardware PkgConfig::Systemd)
add_executable(framework-laptop-tools-cpu src/cpuservice.cpp)
target_link_libraries(framework-laptop-tools-cpu PRIVATE framework-hardware Qt6::DBus PkgConfig::Systemd)
add_executable(framework-laptop-tools-lighting src/lightingservice.cpp)
target_link_libraries(framework-laptop-tools-lighting PRIVATE framework-hardware)
install(TARGETS framework-laptop-tools DESTINATION ${KDE_INSTALL_BINDIR})
install(TARGETS framework-laptop-tools-helper DESTINATION ${KAUTH_HELPER_INSTALL_DIR})
install(TARGETS framework-laptop-tools-fan DESTINATION libexec)
install(TARGETS framework-laptop-tools-cpu DESTINATION libexec)
install(TARGETS framework-laptop-tools-lighting DESTINATION libexec)
kauth_install_helper_files(framework-laptop-tools-helper se.ajpanton.frameworktools root)
kauth_install_actions(se.ajpanton.frameworktools data/se.ajpanton.frameworktools.actions)
install(FILES data/se.ajpanton.framework-laptop-tools.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES data/framework-laptop-tools.json DESTINATION ${KDE_INSTALL_DATADIR}/fedora-tools/settings)
install(FILES data/framework-laptop-tools-fan.service data/framework-laptop-tools-fan-resume.service DESTINATION /usr/lib/systemd/system)
install(FILES data/framework-laptop-tools-cpu.service DESTINATION /usr/lib/systemd/system)
install(FILES data/framework-laptop-tools-lighting.service DESTINATION /usr/lib/systemd/system)
if(BUILD_TESTING)
find_package(Qt6 6.8 REQUIRED COMPONENTS Test)
add_executable(test-hardware tests/test-hardware.cpp)