mirror of
https://github.com/miracle-wm-org/miracle-wm.git
synced 2024-11-23 04:08:27 +03:00
Make the example more true
This commit is contained in:
parent
cde75070d3
commit
d158d619c6
3
.gitignore
vendored
3
.gitignore
vendored
@ -34,4 +34,5 @@
|
||||
# Custom
|
||||
mir-builder.*
|
||||
build
|
||||
Technical_Test_-_Software_Engineer_-_Mir_-_Google_Docs.pdf
|
||||
Technical_Test_-_Software_Engineer_-_Mir_-_Google_Docs.pdf
|
||||
.cache
|
@ -5,7 +5,9 @@ set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_COMPILER g++)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
set(ENV{PKG_CONFIG_PATH} "/usr/local/lib/pkgconfig/")
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
@ -17,4 +19,4 @@ find_package(OpenGL REQUIRED)
|
||||
add_executable(compositor src/main.cpp)
|
||||
|
||||
target_include_directories(compositor PUBLIC SYSTEM ${MIRAL_INCLUDE_DIRS})
|
||||
target_link_libraries( compositor ${MIRAL_LDFLAGS})
|
||||
target_link_libraries( compositor ${MIRAL_LDFLAGS})
|
15
src/main.cpp
15
src/main.cpp
@ -68,11 +68,26 @@ int main(int argc, char const* argv[]) {
|
||||
};
|
||||
};
|
||||
|
||||
Keymap config_keymap;
|
||||
|
||||
auto run_startup_apps = [&](std::string const& apps)
|
||||
{
|
||||
for (auto i = begin(apps); i != end(apps); )
|
||||
{
|
||||
auto const j = find(i, end(apps), ':');
|
||||
external_client_launcher.launch(std::vector<std::string>{std::string{i, j}});
|
||||
if ((i = j) != end(apps)) ++i;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return runner.run_with(
|
||||
{
|
||||
set_window_management_policy<MinimalWindowManager>(),
|
||||
WaylandExtensions{},
|
||||
X11Support{},
|
||||
AppendEventFilter{quit_on_ctrl_alt_bksp},
|
||||
config_keymap
|
||||
});
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Loading…
Reference in New Issue
Block a user