Skip to content

Commit

Permalink
👷 scx: use scx_loader to start/stop scheds (#28)
Browse files Browse the repository at this point in the history
Take into consideration the scx_loader configuration:
Load the configuration or use default values if it is not present.
Following this, the user has the option to manually edit the
configuration file using their preferred text editor.

If the scx.service is currently running or enabled, disable it to avoid
any potential conflicts with scx_loader.
  • Loading branch information
vnepogodin authored Nov 18, 2024
1 parent 9107cab commit 2a3a7e7
Show file tree
Hide file tree
Showing 8 changed files with 783 additions and 89 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ include(CPM)
find_package(Python3 REQUIRED COMPONENTS Interpreter)
find_package(Threads REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(Qt6 COMPONENTS Widgets LinguistTools Concurrent REQUIRED)
find_package(Qt6 COMPONENTS Widgets LinguistTools Concurrent DBus REQUIRED)
pkg_check_modules(
LIBALPM
REQUIRED
Expand Down Expand Up @@ -119,6 +119,7 @@ qt_add_executable(${PROJECT_NAME}
"${CMAKE_BINARY_DIR}/compile_options.hpp"
src/config-options.hpp src/config-options.cpp
src/conf-window.hpp src/conf-window.cpp
src/scx_utils.hpp src/scx_utils.cpp
src/schedext-window.hpp src/schedext-window.cpp
src/conf-patches-page.hpp src/conf-patches-page.ui
src/conf-options-page.hpp src/conf-options-page.ui
Expand All @@ -140,9 +141,9 @@ enable_sanitizers(project_options)
include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR})

corrosion_import_crate(MANIFEST_PATH "config-option-lib/Cargo.toml" FLAGS "${CARGO_FLAGS}")
corrosion_add_cxxbridge(config-option-lib-cxxbridge CRATE config_option_lib MANIFEST_PATH "config-option-lib/Cargo.toml" FILES lib.rs)
corrosion_add_cxxbridge(config-option-lib-cxxbridge CRATE config_option_lib MANIFEST_PATH "config-option-lib/Cargo.toml" FILES lib.rs scx_loader_config.rs)

target_link_libraries(${PROJECT_NAME} PRIVATE project_warnings project_options Qt6::Widgets Qt6::Concurrent Threads::Threads fmt::fmt frozen::frozen config-option-lib-cxxbridge PkgConfig::LIBALPM PkgConfig::LIBGLIB)
target_link_libraries(${PROJECT_NAME} PRIVATE project_warnings project_options Qt6::Widgets Qt6::Concurrent Qt6::DBus Threads::Threads fmt::fmt frozen::frozen config-option-lib-cxxbridge PkgConfig::LIBALPM PkgConfig::LIBGLIB)

option(ENABLE_UNITY "Enable Unity builds of projects" OFF)
if(ENABLE_UNITY)
Expand Down
2 changes: 2 additions & 0 deletions config-option-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

pub mod scx_loader_config;

use std::fs;
use std::io::Write;

Expand Down
Loading

0 comments on commit 2a3a7e7

Please sign in to comment.