Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

feat: basic folder structure

Lars Berger5a990c420407
diff --git a/.gitignore b/.gitignore
index fecc066b..a4877c0f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -145,12 +145,6 @@ publish/
# NuGet Packages
*.nupkg
-# The packages folder can be ignored because of Package Restore
-**/packages/*
-# except build/, which is used as an MSBuild target.
-!**/packages/build/
-# Uncomment if necessary however generally it will be regenerated when needed
-#!**/packages/repositories.config
# Microsoft Azure Build Output
csx/
@@ -235,3 +229,5 @@ _Pvt_Extensions
# IDEA files
.idea/
+
+target
diff --git a/Cargo.lock b/Cargo.lock
new file mode 100644
index 00000000..86996a43
--- /dev/null
+++ b/Cargo.lock
@@ -0,0 +1,759 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "addr2line"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "anstream"
+version = "0.6.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648"
+dependencies = [
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7"
+dependencies = [
+ "anstyle",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.80"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1"
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "backtrace"
+version = "0.3.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
+dependencies = [
+ "addr2line",
+ "cc",
+ "cfg-if",
+ "libc",
+ "miniz_oxide",
+ "object",
+ "rustc-demangle",
+]
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bytes"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
+
+[[package]]
+name = "cc"
+version = "1.0.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "clap"
+version = "4.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da"
+dependencies = [
+ "clap_builder",
+ "clap_derive",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "clap_lex",
+ "strsim",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce"
+
+[[package]]
+name = "colorchoice"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
+
+[[package]]
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
+name = "getrandom"
+version = "0.2.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi",
+]
+
+[[package]]
+name = "gimli"
+version = "0.28.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
+
+[[package]]
+name = "hashbrown"
+version = "0.14.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
+
+[[package]]
+name = "heck"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+
+[[package]]
+name = "hermit-abi"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd"
+
+[[package]]
+name = "indexmap"
+version = "2.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177"
+dependencies = [
+ "equivalent",
+ "hashbrown",
+]
+
+[[package]]
+name = "ipc-client"
+version = "0.0.0"
+dependencies = [
+ "anyhow",
+]
+
+[[package]]
+name = "ipc-server"
+version = "0.0.0"
+dependencies = [
+ "ipc-client",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
+
+[[package]]
+name = "libc"
+version = "0.2.153"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
+
+[[package]]
+name = "lock_api"
+version = "0.4.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "memchr"
+version = "2.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7"
+dependencies = [
+ "adler",
+]
+
+[[package]]
+name = "mio"
+version = "0.8.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09"
+dependencies = [
+ "libc",
+ "wasi",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "num_cpus"
+version = "1.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
+dependencies = [
+ "hermit-abi",
+ "libc",
+]
+
+[[package]]
+name = "object"
+version = "0.32.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "parking_lot"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "windows-targets 0.48.5",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.78"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "regex"
+version = "1.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
+
+[[package]]
+name = "ryu"
+version = "1.0.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1"
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "serde"
+version = "1.0.197"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.197"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.114"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_yaml"
+version = "0.9.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f"
+dependencies = [
+ "indexmap",
+ "itoa",
+ "ryu",
+ "serde",
+ "unsafe-libyaml",
+]
+
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
+
+[[package]]
+name = "socket2"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
+dependencies = [
+ "libc",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "strsim"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01"
+
+[[package]]
+name = "syn"
+version = "2.0.50"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "tokio"
+version = "1.36.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931"
+dependencies = [
+ "backtrace",
+ "bytes",
+ "libc",
+ "mio",
+ "num_cpus",
+ "parking_lot",
+ "pin-project-lite",
+ "signal-hook-registry",
+ "socket2",
+ "tokio-macros",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
+
+[[package]]
+name = "unsafe-libyaml"
+version = "0.2.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b"
+
+[[package]]
+name = "utf8parse"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+
+[[package]]
+name = "uuid"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a"
+dependencies = [
+ "getrandom",
+]
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "watcher"
+version = "0.0.0"
+dependencies = [
+ "ipc-client",
+]
+
+[[package]]
+name = "windows"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be"
+dependencies = [
+ "windows-core",
+ "windows-implement",
+ "windows-interface",
+ "windows-targets 0.52.0",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
+dependencies = [
+ "windows-targets 0.52.0",
+]
+
+[[package]]
+name = "windows-implement"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12168c33176773b86799be25e2a2ba07c7aab9968b37541f1094dbd7a60c8946"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "windows-interface"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d8dc32e0095a7eeccebd0e3f09e9509365ecb3fc6ac4d6f5f14a3f6392942d1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets 0.48.5",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+dependencies = [
+ "windows-targets 0.52.0",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
+dependencies = [
+ "windows_aarch64_gnullvm 0.48.5",
+ "windows_aarch64_msvc 0.48.5",
+ "windows_i686_gnu 0.48.5",
+ "windows_i686_msvc 0.48.5",
+ "windows_x86_64_gnu 0.48.5",
+ "windows_x86_64_gnullvm 0.48.5",
+ "windows_x86_64_msvc 0.48.5",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
+dependencies = [
+ "windows_aarch64_gnullvm 0.52.0",
+ "windows_aarch64_msvc 0.52.0",
+ "windows_i686_gnu 0.52.0",
+ "windows_i686_msvc 0.52.0",
+ "windows_x86_64_gnu 0.52.0",
+ "windows_x86_64_gnullvm 0.52.0",
+ "windows_x86_64_msvc 0.52.0",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
+
+[[package]]
+name = "wm"
+version = "0.0.0"
+dependencies = [
+ "anyhow",
+ "clap",
+ "ipc-client",
+ "ipc-server",
+ "regex",
+ "serde",
+ "serde_json",
+ "serde_yaml",
+ "tokio",
+ "uuid",
+ "watcher",
+ "windows",
+]
diff --git a/Cargo.toml b/Cargo.toml
new file mode 100644
index 00000000..8e7cf122
--- /dev/null
+++ b/Cargo.toml
@@ -0,0 +1,30 @@
+[workspace]
+resolver = "2"
+members = [
+ "packages/ipc-client",
+ "packages/ipc-server",
+ "packages/watcher",
+ "packages/wm",
+]
+
+[workspace.dependencies]
+regex = "1"
+tokio = { version = "1", features = ["full"] }
+windows = { version = "0.52", features = [
+ "implement",
+ "Win32_System_Com",
+ "Win32_UI_Shell_Common",
+ "Win32_Foundation",
+ "Win32_Graphics_Dwm",
+ "Win32_Graphics_Gdi",
+ "Win32_System_LibraryLoader",
+ "Win32_System_RemoteDesktop",
+ "Win32_System_Threading",
+ "Win32_UI_Accessibility",
+ "Win32_UI_HiDpi",
+ "Win32_UI_Input_KeyboardAndMouse",
+ "Win32_UI_Shell",
+ "Win32_UI_Shell_Common",
+ "Win32_UI_WindowsAndMessaging",
+ "Win32_System_SystemServices",
+] }
diff --git a/packages/ipc-client/Cargo.toml b/packages/ipc-client/Cargo.toml
new file mode 100644
index 00000000..fb0c5a79
--- /dev/null
+++ b/packages/ipc-client/Cargo.toml
@@ -0,0 +1,7 @@
+[package]
+name = "ipc-client"
+version = "0.0.0"
+edition = "2021"
+
+[dependencies]
+anyhow = "1"
diff --git a/packages/ipc-client/src/lib.rs b/packages/ipc-client/src/lib.rs
new file mode 100644
index 00000000..a361c02f
--- /dev/null
+++ b/packages/ipc-client/src/lib.rs
@@ -0,0 +1,7 @@
+use std::env::ArgsOs;
+
+use anyhow::Result;
+
+pub fn send_raw(_message: ArgsOs) -> Result<()> {
+ Ok(())
+}
diff --git a/packages/ipc-server/Cargo.toml b/packages/ipc-server/Cargo.toml
new file mode 100644
index 00000000..afb4ecb4
--- /dev/null
+++ b/packages/ipc-server/Cargo.toml
@@ -0,0 +1,7 @@
+[package]
+name = "ipc-server"
+version = "0.0.0"
+edition = "2021"
+
+[dependencies]
+ipc-client = { path = "../ipc-client" }
diff --git a/packages/ipc-server/src/lib.rs b/packages/ipc-server/src/lib.rs
new file mode 100644
index 00000000..6e95421b
--- /dev/null
+++ b/packages/ipc-server/src/lib.rs
@@ -0,0 +1,3 @@
+pub fn add(a: i32, b: i32) -> i32 {
+ a + b
+}
diff --git a/packages/watcher/Cargo.toml b/packages/watcher/Cargo.toml
new file mode 100644
index 00000000..073878cf
--- /dev/null
+++ b/packages/watcher/Cargo.toml
@@ -0,0 +1,7 @@
+[package]
+name = "watcher"
+version = "0.0.0"
+edition = "2021"
+
+[dependencies]
+ipc-client = { path = "../ipc-client" }
diff --git a/packages/watcher/src/lib.rs b/packages/watcher/src/lib.rs
new file mode 100644
index 00000000..6e95421b
--- /dev/null
+++ b/packages/watcher/src/lib.rs
@@ -0,0 +1,3 @@
+pub fn add(a: i32, b: i32) -> i32 {
+ a + b
+}
diff --git a/packages/wm/Cargo.toml b/packages/wm/Cargo.toml
new file mode 100644
index 00000000..b5ee91a1
--- /dev/null
+++ b/packages/wm/Cargo.toml
@@ -0,0 +1,22 @@
+[package]
+name = "wm"
+version = "0.0.0"
+description = "GlazeWM is a tiling window manager for Windows inspired by i3 and Polybar."
+repository = "https://github.com/glzr-io/glazewm"
+license = "GPL-3"
+edition = "2021"
+
+[dependencies]
+ipc-client = { path = "../ipc-client" }
+ipc-server = { path = "../ipc-server" }
+watcher = { path = "../watcher" }
+
+anyhow = "1"
+clap = { version = "4", features = ["derive"] }
+uuid = { version = "1", features = ["v4"] }
+serde = { version = "1", features = ["derive"] }
+serde_json = "1"
+serde_yaml = "0.9"
+regex = { workspace = true }
+tokio = { workspace = true }
+windows = { workspace = true }
diff --git a/packages/wm/src/cli.rs b/packages/wm/src/cli.rs
new file mode 100644
index 00000000..1988a0c8
--- /dev/null
+++ b/packages/wm/src/cli.rs
@@ -0,0 +1,29 @@
+use std::process;
+
+use anyhow::Result;
+use clap::{Parser, Subcommand};
+
+#[derive(Parser, Debug)]
+#[clap(author, version, about, long_about = None, arg_required_else_help = true)]
+pub struct Cli {
+ #[command(subcommand)]
+ pub command: CliCommand,
+}
+
+#[derive(Subcommand, Debug)]
+pub enum CliCommand {
+ /// Start the window manager.
+ Start {
+ /// Custom path to user config file.
+ #[clap(short, long)]
+ config: String,
+ },
+
+ /// Query the window manager's state.
+ Query {
+ windows: bool,
+ monitors: bool,
+ binding_mode: bool,
+ focused_container: bool,
+ },
+}
diff --git a/packages/wm/src/common/mod.rs b/packages/wm/src/common/mod.rs
new file mode 100644
index 00000000..b386c534
--- /dev/null
+++ b/packages/wm/src/common/mod.rs
@@ -0,0 +1,3 @@
+mod units;
+
+pub use units::*;
diff --git a/packages/wm/src/common/platform/event_listener.rs b/packages/wm/src/common/platform/event_listener.rs
new file mode 100644
index 00000000..e69de29b
diff --git a/packages/wm/src/common/platform/monitors.rs b/packages/wm/src/common/platform/monitors.rs
new file mode 100644
index 00000000..e69de29b
diff --git a/packages/wm/src/common/platform/windows.rs b/packages/wm/src/common/platform/windows.rs
new file mode 100644
index 00000000..e69de29b
diff --git a/packages/wm/src/common/units.rs b/packages/wm/src/common/units.rs
new file mode 100644
index 00000000..a350b3af
--- /dev/null
+++ b/packages/wm/src/common/units.rs
@@ -0,0 +1,27 @@
+use regex::Regex;
+use std::str::FromStr;
+
+pub enum Unit {
+ Pixel,
+ Percentage,
+ None,
+}
+
+/// Parses a string containing a number followed by a unit (px, %).
+///
+/// Returns a tuple where the first element is a float, and the second
+/// element is the unit as an enum value.
+pub fn extract_units(amount_with_units: &str) -> (f32, Unit) {
+ let units_regex = Regex::new(r"(\d+)(%|ppt|px)?").unwrap();
+
+ let captures = units_regex.captures(amount_with_units).unwrap();
+ let amount = f32::from_str(&captures[1]).unwrap_or(0.0);
+
+ let unit = match captures.get(2).map_or("", |m| m.as_str()) {
+ "px" => Unit::Pixel,
+ "%" => Unit::Percentage,
+ _ => Unit::None,
+ };
+
+ (amount, unit)
+}
diff --git a/packages/wm/src/containers/container.rs b/packages/wm/src/containers/container.rs
new file mode 100644
index 00000000..7799bd47
--- /dev/null
+++ b/packages/wm/src/containers/container.rs
@@ -0,0 +1,213 @@
+use uuid::Uuid;
+
+use super::container_type::ContainerType;
+
+pub trait Container {
+ /// A unique identifier for the container.
+ fn id(&self) -> Uuid;
+
+ /// Derived container type (eg. `ContainerType.Monitor`).
+ fn r#type(&self) -> ContainerType;
+
+ fn height(&self) -> u32;
+ fn width(&self) -> u32;
+ fn x(&self) -> u32;
+ fn y(&self) -> u32;
+
+ fn parent(&self) -> Box<dyn Container>;
+ fn children(&self) -> Vec<Box<dyn Container>>;
+
+ /// The order of which child containers last had focus.
+ fn child_focus_order(&self) -> Vec<Box<dyn Container>>;
+
+ // /// The child container that last had focus.
+ // public Container LastFocusedChild => ChildFocusOrder.ElementAtOrDefault(0);
+
+ // /// Index of this container in parent's child focus order.
+ // public int FocusIndex => this is RootContainer ? 0 : Parent.ChildFocusOrder.IndexOf(this);
+
+ // public List<Container> SelfAndSiblings =>
+ // this is RootContainer ? new List<Container>() { this } : Parent.Children;
+
+ // public IEnumerable<Container> Siblings =>
+ // this is RootContainer
+ // ? Array.Empty<Container>()
+ // : Parent.Children.Where(children => children != this);
+
+ // /// Index of this container amongst its siblings.
+ // public int Index => this is RootContainer ? 0 : Parent.Children.IndexOf(this);
+
+ // /// Get the last focused descendant by traversing downwards.
+ // public Container LastFocusedDescendant
+ // {
+ // get
+ // {
+ // var lastFocusedDescendant = LastFocusedChild;
+
+ // while (lastFocusedDescendant?.LastFocusedChild != null)
+ // lastFocusedDescendant = lastFocusedDescendant.LastFocusedChild;
+
+ // return lastFocusedDescendant;
+ // }
+ // }
+
+ // /// The sibling at the next index to this container.
+ // public Container NextSibling => SelfAndSiblings.ElementAtOrDefault(Index + 1);
+
+ // /// The sibling at the previous index to this container.
+ // public Container PreviousSibling => SelfAndSiblings.ElementAtOrDefault(Index - 1);
+
+ // // TODO: Rename to SelfAndDescendants and change to getter.
+ // public IEnumerable<Container> Flatten()
+ // {
+ // return new[] { this }.Concat(Children.SelectMany(children => children.Flatten()));
+ // }
+
+ // public IEnumerable<Container> SelfAndAncestors => new[] { this }.Concat(Ancestors);
+
+ // public IEnumerable<Container> Ancestors
+ // {
+ // get
+ // {
+ // var parent = Parent;
+
+ // while (parent != null)
+ // {
+ // yield return parent;
+ // parent = parent.Parent;
+ // }
+ // }
+ // }
+
+ // public IEnumerable<Container> SelfAndDescendants => new[] { this }.Concat(Descendants);
+
+ // /// Breadth-first downward traversal from a single container.
+ // public IEnumerable<Container> Descendants
+ // {
+ // get
+ // {
+ // var queue = new Queue<Container>();
+
+ // foreach (var child in Children)
+ // queue.Enqueue(child);
+
+ // while (queue.Count > 0)
+ // {
+ // var current = queue.Dequeue();
+ // yield return current;
+ // foreach (var child in current.Children)
+ // queue.Enqueue(child);
+ // }
+ // }
+ // }
+
+ // /// Leaf nodes (ie. windows and workspaces) in order of last focus.
+ // public IEnumerable<Container> DescendantFocusOrder
+ // {
+ // get
+ // {
+ // var stack = new Stack<Container>();
+ // stack.Push(this);
+
+ // // Do a depth-first search using child focus order.
+ // while (stack.Count > 0)
+ // {
+ // var current = stack.Pop();
+
+ // // Get containers that have no children. Descendant also cannot be the container itself.
+ // if (current != this && !current.HasChildren())
+ // yield return current;
+
+ // // Reverse the child focus order so that the first element is pushed last/popped first.
+ // foreach (var focusChild in current.ChildFocusOrder.AsEnumerable().Reverse())
+ // stack.Push(focusChild);
+ // }
+ // }
+ // }
+
+ // public void InsertChild(int targetIndex, Container child)
+ // {
+ // Children.Insert(targetIndex, child);
+ // ChildFocusOrder.Add(child);
+ // child.Parent = this;
+ // }
+
+ // public void RemoveChild(Container child)
+ // {
+ // child.Parent = null;
+ // Children.Remove(child);
+ // ChildFocusOrder.Remove(child);
+ // }
+
+ // public bool IsDetached()
+ // {
+ // return Parent is null || Index == -1;
+ // }
+
+ // public bool HasChildren()
+ // {
+ // return Children.Count > 0;
+ // }
+
+ // public bool HasSiblings()
+ // {
+ // return Siblings.Any();
+ // }
+
+ // public Rect ToRect()
+ // {
+ // return new Rect()
+ // {
+ // Left = X,
+ // Right = X + Width,
+ // Top = Y,
+ // Bottom = Y + Height,
+ // };
+ // }
+
+ // public IEnumerable<Container> ChildrenOfType<T>()
+ // {
+ // return Children.Where(container => typeof(T).IsAssignableFrom(container.GetType()));
+ // }
+
+ // public IEnumerable<Container> SiblingsOfType<T>()
+ // {
+ // return Siblings.Where(container => typeof(T).IsAssignableFrom(container.GetType()));
+ // }
+
+ // public IEnumerable<Container> SelfAndSiblingsOfType<T>()
+ // {
+ // return SelfAndSiblings.Where(container => typeof(T).IsAssignableFrom(container.GetType()));
+ // }
+
+ // public Container NextSiblingOfType<T>()
+ // {
+ // return SelfAndSiblings
+ // .Skip(Index + 1)
+ // .FirstOrDefault(container => typeof(T).IsAssignableFrom(container.GetType()));
+ // }
+
+ // public Container PreviousSiblingOfType<T>()
+ // {
+ // return SelfAndSiblings
+ // .Take(Index)
+ // .Reverse()
+ // .FirstOrDefault(container => typeof(T).IsAssignableFrom(container.GetType()));
+ // }
+
+ // /// Get the last focused child that matches the given type.
+ // public Container LastFocusedChildOfType<T>()
+ // {
+ // return ChildFocusOrder.Find(
+ // container => typeof(T).IsAssignableFrom(container.GetType())
+ // );
+ // }
+
+ // /// Get the last focused descendant that matches the given type.
+ // public Container LastFocusedDescendantOfType<T>()
+ // {
+ // return DescendantFocusOrder.FirstOrDefault(
+ // container => typeof(T).IsAssignableFrom(container.GetType())
+ // );
+ // }
+}
diff --git a/packages/wm/src/containers/container_type.rs b/packages/wm/src/containers/container_type.rs
new file mode 100644
index 00000000..c300b6cf
--- /dev/null
+++ b/packages/wm/src/containers/container_type.rs
@@ -0,0 +1,15 @@
+use serde::{Deserialize, Serialize};
+
+#[derive(Debug, Deserialize, Clone, Serialize)]
+#[serde(tag = "type", rename_all = "snake_case")]
+pub enum ContainerType {
+ RootContainer,
+ Monitor,
+ Workspace,
+ SplitContainer,
+ FloatingWindow,
+ TilingWindow,
+ MinimizedWindow,
+ MaximizedWindow,
+ FullscreenWindow,
+}
diff --git a/packages/wm/src/containers/mod.rs b/packages/wm/src/containers/mod.rs
new file mode 100644
index 00000000..f64f25d3
--- /dev/null
+++ b/packages/wm/src/containers/mod.rs
@@ -0,0 +1,5 @@
+mod container;
+mod container_type;
+
+pub use container::*;
+pub use container_type::*;
diff --git a/packages/wm/src/containers/tiling_container.rs b/packages/wm/src/containers/tiling_container.rs
new file mode 100644
index 00000000..2d2fad3a
--- /dev/null
+++ b/packages/wm/src/containers/tiling_container.rs
@@ -0,0 +1,4 @@
+pub trait TilingContainer {
+ fn is_tiling_active(&self) -> bool;
+ fn size_percentage(&self) -> f32;
+}
diff --git a/packages/wm/src/main.rs b/packages/wm/src/main.rs
new file mode 100644
index 00000000..e755dfc0
--- /dev/null
+++ b/packages/wm/src/main.rs
@@ -0,0 +1,26 @@
+use clap::Parser;
+use ipc_client;
+
+use crate::cli::{Cli, CliCommand};
+
+mod cli;
+mod common;
+mod containers;
+// mod monitors;
+// mod user_config;
+// mod windows;
+mod wm_state;
+mod workspaces;
+
+#[tokio::main]
+async fn main() {
+ let cli = Cli::parse();
+
+ match cli.command {
+ CliCommand::Start { config } => {}
+ _ => {
+ let args = std::env::args_os();
+ ipc_client::send_raw(args).unwrap()
+ }
+ }
+}
diff --git a/packages/wm/src/windows/window.rs b/packages/wm/src/windows/window.rs
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/packages/wm/src/windows/window.rs
@@ -0,0 +1 @@
+
diff --git a/packages/wm/src/wm_state.rs b/packages/wm/src/wm_state.rs
new file mode 100644
index 00000000..e69de29b
diff --git a/packages/wm/src/workspaces/mod.rs b/packages/wm/src/workspaces/mod.rs
new file mode 100644
index 00000000..c1f22fe9
--- /dev/null
+++ b/packages/wm/src/workspaces/mod.rs
@@ -0,0 +1,3 @@
+mod workspace;
+
+pub use workspace::*;
diff --git a/packages/wm/src/workspaces/workspace.rs b/packages/wm/src/workspaces/workspace.rs
new file mode 100644
index 00000000..bf2f70e7
--- /dev/null
+++ b/packages/wm/src/workspaces/workspace.rs
@@ -0,0 +1,66 @@
+use uuid::Uuid;
+
+use crate::containers::{Container, ContainerType};
+
+pub struct Workspace {
+ id: Uuid,
+ name: String,
+ display_name: String,
+ keep_alive: bool,
+ outer_gaps: RectDelta,
+}
+
+impl Workspace {
+ pub fn new(
+ name: String,
+ display_name: String,
+ keep_alive: bool,
+ outer_gaps: RectDelta,
+ ) -> Self {
+ Self {
+ id: Uuid::new_v4(),
+ name,
+ display_name,
+ keep_alive,
+ outer_gaps,
+ }
+ }
+}
+
+impl Container for Workspace {
+ fn id(&self) -> Uuid {
+ self.id
+ }
+
+ fn r#type(&self) -> ContainerType {
+ ContainerType::Workspace
+ }
+
+ fn height(&self) -> u32 {
+ todo!()
+ }
+
+ fn width(&self) -> u32 {
+ todo!()
+ }
+
+ fn x(&self) -> u32 {
+ todo!()
+ }
+
+ fn y(&self) -> u32 {
+ todo!()
+ }
+
+ fn parent(&self) -> Box<dyn Container> {
+ todo!()
+ }
+
+ fn children(&self) -> Vec<Box<dyn Container>> {
+ todo!()
+ }
+
+ fn child_focus_order(&self) -> Vec<Box<dyn Container>> {
+ todo!()
+ }
+}
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
new file mode 100644
index 00000000..5d56faf9
--- /dev/null
+++ b/rust-toolchain.toml
@@ -0,0 +1,2 @@
+[toolchain]
+channel = "nightly"
diff --git a/rustfmt.toml b/rustfmt.toml
new file mode 100644
index 00000000..d0912512
--- /dev/null
+++ b/rustfmt.toml
@@ -0,0 +1,2 @@
+tab_spaces = 2
+max_width = 75