diff --git a/compile_wlcs.sh b/compile_wlcs.sh deleted file mode 100755 index be9c814..0000000 --- a/compile_wlcs.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -WLCS_SHA=26c5a8cfef265b4ae021adebfec90d758c08792e - -if [ -f "./wlcs/wlcs" ] && [ "$(cd wlcs; git rev-parse HEAD)" = "${WLCS_SHA}" ] ; then - echo "WLCS commit 26c5a8c is already compiled" -else - echo "Compiling WLCS" - git clone https://github.com/canonical/wlcs - cd wlcs || exit - # checkout a specific revision - git reset --hard "${WLCS_SHA}" - cmake -DWLCS_BUILD_ASAN=False -DWLCS_BUILD_TSAN=False -DWLCS_BUILD_UBSAN=False -DCMAKE_EXPORT_COMPILE_COMMANDS=1 . - make -fi diff --git a/justfile b/justfile index ca3b7cb..2f24ad5 100644 --- a/justfile +++ b/justfile @@ -78,6 +78,7 @@ install-protos-root: # [root] Install the Lua library (requires Luarocks) install-lua-lib-root: #!/usr/bin/env bash + set -euxo pipefail cd "{{rootdir}}/api/lua" luarocks make --lua-version "{{lua_version}}" @@ -92,3 +93,29 @@ run *args: # Run `cargo test` test *args: cargo test {{args}} + +compile-wlcs: + #!/usr/bin/env bash + set -euxo pipefail + + WLCS_SHA=26c5a8cfef265b4ae021adebfec90d758c08792e + + cd "{{rootdir}}" + + if [ -f "./wlcs/wlcs" ] && [ "$(cd wlcs; git rev-parse HEAD)" = "${WLCS_SHA}" ] ; then + echo "WLCS commit 26c5a8c is already compiled" + else + echo "Compiling WLCS" + git clone https://github.com/canonical/wlcs + cd wlcs || exit + # checkout a specific revision + git reset --hard "${WLCS_SHA}" + cmake -DWLCS_BUILD_ASAN=False -DWLCS_BUILD_TSAN=False -DWLCS_BUILD_UBSAN=False -DCMAKE_EXPORT_COMPILE_COMMANDS=1 . + make + fi + +wlcs *args: compile-wlcs + #!/usr/bin/env bash + set -euxo pipefail + cargo build -p wlcs_pinnacle + RUST_BACKTRACE=1 RUST_LOG=warn ./wlcs/wlcs target/debug/libwlcs_pinnacle.so {{args}} diff --git a/wlcs_pinnacle/src/config.rs b/wlcs_pinnacle/src/config.rs index ef46ff0..f961007 100644 --- a/wlcs_pinnacle/src/config.rs +++ b/wlcs_pinnacle/src/config.rs @@ -1,13 +1,20 @@ use pinnacle::state::Pinnacle; mod inner { use pinnacle_api::layout::{CyclingLayoutManager, MasterStackLayout}; + use pinnacle_api::output::OutputSetup; use pinnacle_api::window::rules::{WindowRule, WindowRuleCondition}; use pinnacle_api::ApiModules; #[pinnacle_api::config(modules)] async fn main() { - #[allow(unused_variables)] - let ApiModules { layout, window, .. } = modules; + let ApiModules { + layout, + window, + output, + .. + } = modules; + + output.setup([OutputSetup::new_with_matcher(|_| true).with_tags(["1"])]); window.add_window_rule( WindowRuleCondition::default().all(vec![]),