mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-10 23:22:43 +02:00
refactor(client): use public interface exclusively
This commit demotes the komorebi-core crate to a module (core) inside of the komorebi lib, resulting in the komorebi-client crate lib becoming the single public interface for programming in Rust against komorebi. komorebic and komorebi-gui now consume komorebi-client exclusively as the means for sending and receiving messages to and from komorebi, so that anyone wishing to integrate with komorebi will have all of the same functionality to them as I do.
This commit is contained in:
Generated
+7
-25
@@ -742,13 +742,12 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.1.4"
|
version = "1.1.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9711f33475c22aab363b05564a17d7b789bf3dfec5ebabb586adee56f0e271b5"
|
checksum = "324c74f2155653c90b04f25b2a47a8a631360cb908f92a772695f430c7e31052"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"jobserver",
|
"jobserver",
|
||||||
"libc",
|
"libc",
|
||||||
"once_cell",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2325,10 +2324,10 @@ dependencies = [
|
|||||||
"crossbeam-utils",
|
"crossbeam-utils",
|
||||||
"ctrlc",
|
"ctrlc",
|
||||||
"dirs",
|
"dirs",
|
||||||
|
"dunce",
|
||||||
"getset",
|
"getset",
|
||||||
"hex_color",
|
"hex_color",
|
||||||
"hotwatch",
|
"hotwatch",
|
||||||
"komorebi-core",
|
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"miow",
|
"miow",
|
||||||
"nanoid",
|
"nanoid",
|
||||||
@@ -2340,6 +2339,7 @@ dependencies = [
|
|||||||
"schemars",
|
"schemars",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json_lenient",
|
"serde_json_lenient",
|
||||||
|
"serde_yaml",
|
||||||
"shadow-rs",
|
"shadow-rs",
|
||||||
"strum",
|
"strum",
|
||||||
"sysinfo",
|
"sysinfo",
|
||||||
@@ -2362,27 +2362,10 @@ name = "komorebi-client"
|
|||||||
version = "0.1.29"
|
version = "0.1.29"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"komorebi",
|
"komorebi",
|
||||||
"komorebi-core",
|
|
||||||
"serde_json_lenient",
|
"serde_json_lenient",
|
||||||
"uds_windows",
|
"uds_windows",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "komorebi-core"
|
|
||||||
version = "0.1.28"
|
|
||||||
dependencies = [
|
|
||||||
"clap",
|
|
||||||
"color-eyre",
|
|
||||||
"dirs",
|
|
||||||
"dunce",
|
|
||||||
"schemars",
|
|
||||||
"serde",
|
|
||||||
"serde_json_lenient",
|
|
||||||
"serde_yaml",
|
|
||||||
"strum",
|
|
||||||
"windows 0.54.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "komorebi-gui"
|
name = "komorebi-gui"
|
||||||
version = "0.1.29"
|
version = "0.1.29"
|
||||||
@@ -2406,7 +2389,6 @@ dependencies = [
|
|||||||
"dunce",
|
"dunce",
|
||||||
"fs-tail",
|
"fs-tail",
|
||||||
"komorebi-client",
|
"komorebi-client",
|
||||||
"komorebi-core",
|
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"miette",
|
"miette",
|
||||||
"paste",
|
"paste",
|
||||||
@@ -3216,7 +3198,7 @@ dependencies = [
|
|||||||
"cfg-if 1.0.0",
|
"cfg-if 1.0.0",
|
||||||
"libc",
|
"libc",
|
||||||
"petgraph",
|
"petgraph",
|
||||||
"redox_syscall 0.5.2",
|
"redox_syscall 0.5.3",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thread-id",
|
"thread-id",
|
||||||
"windows-targets 0.52.6",
|
"windows-targets 0.52.6",
|
||||||
@@ -3533,9 +3515,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "redox_syscall"
|
name = "redox_syscall"
|
||||||
version = "0.5.2"
|
version = "0.5.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd"
|
checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.6.0",
|
"bitflags 2.6.0",
|
||||||
]
|
]
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,6 @@ resolver = "2"
|
|||||||
members = [
|
members = [
|
||||||
"komorebi",
|
"komorebi",
|
||||||
"komorebi-client",
|
"komorebi-client",
|
||||||
"komorebi-core",
|
|
||||||
"komorebi-gui",
|
"komorebi-gui",
|
||||||
"komorebic",
|
"komorebic",
|
||||||
"komorebic-no-console",
|
"komorebic-no-console",
|
||||||
@@ -16,6 +15,7 @@ dirs = "5"
|
|||||||
dunce = "1"
|
dunce = "1"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = { package = "serde_json_lenient", version = "0.2" }
|
serde_json = { package = "serde_json_lenient", version = "0.2" }
|
||||||
|
serde_yaml = "0.9"
|
||||||
sysinfo = "0.30"
|
sysinfo = "0.30"
|
||||||
uds_windows = "1"
|
uds_windows = "1"
|
||||||
win32-display-data = { git = "https://github.com/LGUG2Z/win32-display-data", rev = "32a45cebf132c3d651ee22c0c40033a6b7edc945" }
|
win32-display-data = { git = "https://github.com/LGUG2Z/win32-display-data", rev = "32a45cebf132c3d651ee22c0c40033a6b7edc945" }
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ If the named pipe exists, `komorebi` will start pushing JSON data of successfull
|
|||||||
|
|
||||||
You may then filter on the `type` key to listen to the events that you are interested in. For a full list of possible
|
You may then filter on the `type` key to listen to the events that you are interested in. For a full list of possible
|
||||||
notification types, refer to the enum variants of `WindowManagerEvent` in `komorebi` and `SocketMessage`
|
notification types, refer to the enum variants of `WindowManagerEvent` in `komorebi` and `SocketMessage`
|
||||||
in `komorebi-core`.
|
in `komorebi::core`.
|
||||||
|
|
||||||
Below is an example of how you can subscribe to and filter on events using a named pipe in `nodejs`.
|
Below is an example of how you can subscribe to and filter on events using a named pipe in `nodejs`.
|
||||||
|
|
||||||
@@ -414,7 +414,7 @@ A TCP listener can optionally be exposed on a port of your choosing with the `--
|
|||||||
provided to `komorebi` or `komorebic start`, no TCP listener will be created.
|
provided to `komorebi` or `komorebic start`, no TCP listener will be created.
|
||||||
|
|
||||||
Once created, your client may send
|
Once created, your client may send
|
||||||
any [SocketMessage](https://github.com/LGUG2Z/komorebi/blob/master/komorebi-core/src/lib.rs#L37) to `komorebi` in the
|
any [SocketMessage](https://github.com/LGUG2Z/komorebi/blob/master/komorebi/src/core/mod.rs#L37) to `komorebi` in the
|
||||||
same way that `komorebic` would.
|
same way that `komorebic` would.
|
||||||
|
|
||||||
This can be used if you would like to create your own alternative to `komorebic` which incorporates scripting and
|
This can be used if you would like to create your own alternative to `komorebic` which incorporates scripting and
|
||||||
|
|||||||
@@ -7,6 +7,5 @@ edition = "2021"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
komorebi = { path = "../komorebi" }
|
komorebi = { path = "../komorebi" }
|
||||||
komorebi-core = { path = "../komorebi-core" }
|
|
||||||
uds_windows = "1"
|
uds_windows = "1"
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
|||||||
+25
-14
@@ -4,6 +4,31 @@
|
|||||||
pub use komorebi::colour::Colour;
|
pub use komorebi::colour::Colour;
|
||||||
pub use komorebi::colour::Rgb;
|
pub use komorebi::colour::Rgb;
|
||||||
pub use komorebi::container::Container;
|
pub use komorebi::container::Container;
|
||||||
|
pub use komorebi::core::config_generation::ApplicationConfigurationGenerator;
|
||||||
|
pub use komorebi::core::resolve_home_path;
|
||||||
|
pub use komorebi::core::AnimationStyle;
|
||||||
|
pub use komorebi::core::ApplicationIdentifier;
|
||||||
|
pub use komorebi::core::Arrangement;
|
||||||
|
pub use komorebi::core::Axis;
|
||||||
|
pub use komorebi::core::BorderImplementation;
|
||||||
|
pub use komorebi::core::BorderStyle;
|
||||||
|
pub use komorebi::core::CustomLayout;
|
||||||
|
pub use komorebi::core::CycleDirection;
|
||||||
|
pub use komorebi::core::DefaultLayout;
|
||||||
|
pub use komorebi::core::Direction;
|
||||||
|
pub use komorebi::core::FocusFollowsMouseImplementation;
|
||||||
|
pub use komorebi::core::HidingBehaviour;
|
||||||
|
pub use komorebi::core::Layout;
|
||||||
|
pub use komorebi::core::MoveBehaviour;
|
||||||
|
pub use komorebi::core::OperationBehaviour;
|
||||||
|
pub use komorebi::core::OperationDirection;
|
||||||
|
pub use komorebi::core::Rect;
|
||||||
|
pub use komorebi::core::Sizing;
|
||||||
|
pub use komorebi::core::SocketMessage;
|
||||||
|
pub use komorebi::core::StackbarLabel;
|
||||||
|
pub use komorebi::core::StackbarMode;
|
||||||
|
pub use komorebi::core::StateQuery;
|
||||||
|
pub use komorebi::core::WindowKind;
|
||||||
pub use komorebi::monitor::Monitor;
|
pub use komorebi::monitor::Monitor;
|
||||||
pub use komorebi::ring::Ring;
|
pub use komorebi::ring::Ring;
|
||||||
pub use komorebi::window::Window;
|
pub use komorebi::window::Window;
|
||||||
@@ -18,20 +43,6 @@ pub use komorebi::StackbarConfig;
|
|||||||
pub use komorebi::State;
|
pub use komorebi::State;
|
||||||
pub use komorebi::StaticConfig;
|
pub use komorebi::StaticConfig;
|
||||||
pub use komorebi::TabsConfig;
|
pub use komorebi::TabsConfig;
|
||||||
pub use komorebi_core::Arrangement;
|
|
||||||
pub use komorebi_core::Axis;
|
|
||||||
pub use komorebi_core::BorderStyle;
|
|
||||||
pub use komorebi_core::CustomLayout;
|
|
||||||
pub use komorebi_core::CycleDirection;
|
|
||||||
pub use komorebi_core::DefaultLayout;
|
|
||||||
pub use komorebi_core::Direction;
|
|
||||||
pub use komorebi_core::Layout;
|
|
||||||
pub use komorebi_core::OperationDirection;
|
|
||||||
pub use komorebi_core::Rect;
|
|
||||||
pub use komorebi_core::SocketMessage;
|
|
||||||
pub use komorebi_core::StackbarLabel;
|
|
||||||
pub use komorebi_core::StackbarMode;
|
|
||||||
pub use komorebi_core::WindowKind;
|
|
||||||
|
|
||||||
use komorebi::DATA_DIR;
|
use komorebi::DATA_DIR;
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "komorebi-core"
|
|
||||||
version = "0.1.28"
|
|
||||||
edition = "2021"
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
clap = { version = "4", features = ["derive"] }
|
|
||||||
serde = { version = "1", features = ["derive"] }
|
|
||||||
serde_json = { workspace = true }
|
|
||||||
serde_yaml = "0.9"
|
|
||||||
strum = { version = "0.26", features = ["derive"] }
|
|
||||||
schemars = "0.8"
|
|
||||||
color-eyre = { workspace = true }
|
|
||||||
windows = { workspace = true }
|
|
||||||
dunce = { workspace = true }
|
|
||||||
dirs = { workspace = true }
|
|
||||||
+2
-2
@@ -11,8 +11,6 @@ edition = "2021"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
komorebi-core = { path = "../komorebi-core" }
|
|
||||||
|
|
||||||
bitflags = { version = "2", features = ["serde"] }
|
bitflags = { version = "2", features = ["serde"] }
|
||||||
clap = { version = "4", features = ["derive"] }
|
clap = { version = "4", features = ["derive"] }
|
||||||
color-eyre = { workspace = true }
|
color-eyre = { workspace = true }
|
||||||
@@ -20,6 +18,7 @@ crossbeam-channel = "0.5"
|
|||||||
crossbeam-utils = "0.8"
|
crossbeam-utils = "0.8"
|
||||||
ctrlc = { version = "3", features = ["termination"] }
|
ctrlc = { version = "3", features = ["termination"] }
|
||||||
dirs = { workspace = true }
|
dirs = { workspace = true }
|
||||||
|
dunce = { workspace = true }
|
||||||
getset = "0.1"
|
getset = "0.1"
|
||||||
hex_color = { version = "3", features = ["serde"] }
|
hex_color = { version = "3", features = ["serde"] }
|
||||||
hotwatch = "0.5"
|
hotwatch = "0.5"
|
||||||
@@ -34,6 +33,7 @@ regex = "1"
|
|||||||
schemars = "0.8"
|
schemars = "0.8"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
serde_yaml = { workspace = true }
|
||||||
strum = { version = "0.26", features = ["derive"] }
|
strum = { version = "0.26", features = ["derive"] }
|
||||||
sysinfo = { workspace = true }
|
sysinfo = { workspace = true }
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
use crate::core::AnimationStyle;
|
||||||
|
use crate::core::Rect;
|
||||||
use color_eyre::Result;
|
use color_eyre::Result;
|
||||||
use komorebi_core::AnimationStyle;
|
|
||||||
use komorebi_core::Rect;
|
|
||||||
|
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ use crate::border_manager::Z_ORDER;
|
|||||||
use crate::WindowsApi;
|
use crate::WindowsApi;
|
||||||
use crate::WINDOWS_11;
|
use crate::WINDOWS_11;
|
||||||
|
|
||||||
use komorebi_core::BorderStyle;
|
use crate::core::BorderStyle;
|
||||||
use komorebi_core::Rect;
|
use crate::core::Rect;
|
||||||
|
|
||||||
use std::sync::atomic::Ordering;
|
use std::sync::atomic::Ordering;
|
||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
mod border;
|
mod border;
|
||||||
|
|
||||||
|
use crate::core::BorderImplementation;
|
||||||
|
use crate::core::BorderStyle;
|
||||||
use crossbeam_channel::Receiver;
|
use crossbeam_channel::Receiver;
|
||||||
use crossbeam_channel::Sender;
|
use crossbeam_channel::Sender;
|
||||||
use crossbeam_utils::atomic::AtomicCell;
|
use crossbeam_utils::atomic::AtomicCell;
|
||||||
use crossbeam_utils::atomic::AtomicConsume;
|
use crossbeam_utils::atomic::AtomicConsume;
|
||||||
use komorebi_core::BorderImplementation;
|
|
||||||
use komorebi_core::BorderStyle;
|
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
@@ -23,6 +23,7 @@ use std::sync::Arc;
|
|||||||
use std::sync::OnceLock;
|
use std::sync::OnceLock;
|
||||||
use windows::Win32::Foundation::HWND;
|
use windows::Win32::Foundation::HWND;
|
||||||
|
|
||||||
|
use crate::core::WindowKind;
|
||||||
use crate::ring::Ring;
|
use crate::ring::Ring;
|
||||||
use crate::workspace_reconciliator::ALT_TAB_HWND;
|
use crate::workspace_reconciliator::ALT_TAB_HWND;
|
||||||
use crate::Colour;
|
use crate::Colour;
|
||||||
@@ -31,7 +32,6 @@ use crate::WindowManager;
|
|||||||
use crate::WindowsApi;
|
use crate::WindowsApi;
|
||||||
use border::border_hwnds;
|
use border::border_hwnds;
|
||||||
use border::Border;
|
use border::Border;
|
||||||
use komorebi_core::WindowKind;
|
|
||||||
|
|
||||||
pub static BORDER_WIDTH: AtomicI32 = AtomicI32::new(8);
|
pub static BORDER_WIDTH: AtomicI32 = AtomicI32::new(8);
|
||||||
pub static BORDER_OFFSET: AtomicI32 = AtomicI32::new(-1);
|
pub static BORDER_OFFSET: AtomicI32 = AtomicI32::new(-1);
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ use serde::Serialize;
|
|||||||
use strum::Display;
|
use strum::Display;
|
||||||
use strum::EnumString;
|
use strum::EnumString;
|
||||||
|
|
||||||
use crate::custom_layout::Column;
|
use super::custom_layout::Column;
|
||||||
use crate::custom_layout::ColumnSplit;
|
use super::custom_layout::ColumnSplit;
|
||||||
use crate::custom_layout::ColumnSplitWithCapacity;
|
use super::custom_layout::ColumnSplitWithCapacity;
|
||||||
use crate::CustomLayout;
|
use super::CustomLayout;
|
||||||
use crate::DefaultLayout;
|
use super::DefaultLayout;
|
||||||
use crate::Rect;
|
use super::Rect;
|
||||||
|
|
||||||
pub trait Arrangement {
|
pub trait Arrangement {
|
||||||
fn calculate(
|
fn calculate(
|
||||||
@@ -6,7 +6,7 @@ use serde::Serialize;
|
|||||||
use strum::Display;
|
use strum::Display;
|
||||||
use strum::EnumString;
|
use strum::EnumString;
|
||||||
|
|
||||||
use crate::ApplicationIdentifier;
|
use super::ApplicationIdentifier;
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone, Copy, Debug, Serialize, Deserialize, Display, EnumString, ValueEnum, JsonSchema,
|
Clone, Copy, Debug, Serialize, Deserialize, Display, EnumString, ValueEnum, JsonSchema,
|
||||||
@@ -12,7 +12,7 @@ use schemars::JsonSchema;
|
|||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
use crate::Rect;
|
use super::Rect;
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
|
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
|
||||||
pub struct CustomLayout(Vec<Column>);
|
pub struct CustomLayout(Vec<Column>);
|
||||||
@@ -5,9 +5,9 @@ use serde::Serialize;
|
|||||||
use strum::Display;
|
use strum::Display;
|
||||||
use strum::EnumString;
|
use strum::EnumString;
|
||||||
|
|
||||||
use crate::OperationDirection;
|
use super::OperationDirection;
|
||||||
use crate::Rect;
|
use super::Rect;
|
||||||
use crate::Sizing;
|
use super::Sizing;
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone,
|
Clone,
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
use crate::custom_layout::Column;
|
use super::custom_layout::Column;
|
||||||
use crate::custom_layout::ColumnSplit;
|
use super::custom_layout::ColumnSplit;
|
||||||
use crate::custom_layout::ColumnSplitWithCapacity;
|
use super::custom_layout::ColumnSplitWithCapacity;
|
||||||
use crate::custom_layout::CustomLayout;
|
use super::custom_layout::CustomLayout;
|
||||||
use crate::DefaultLayout;
|
use super::DefaultLayout;
|
||||||
use crate::OperationDirection;
|
use super::OperationDirection;
|
||||||
|
|
||||||
pub trait Direction {
|
pub trait Direction {
|
||||||
fn index_in_direction(
|
fn index_in_direction(
|
||||||
@@ -2,10 +2,10 @@ use schemars::JsonSchema;
|
|||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
use crate::Arrangement;
|
use super::Arrangement;
|
||||||
use crate::CustomLayout;
|
use super::CustomLayout;
|
||||||
use crate::DefaultLayout;
|
use super::DefaultLayout;
|
||||||
use crate::Direction;
|
use super::Direction;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq)]
|
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq)]
|
||||||
pub enum Layout {
|
pub enum Layout {
|
||||||
@@ -7,8 +7,8 @@ use serde::Serialize;
|
|||||||
use strum::Display;
|
use strum::Display;
|
||||||
use strum::EnumString;
|
use strum::EnumString;
|
||||||
|
|
||||||
use crate::direction::Direction;
|
use super::direction::Direction;
|
||||||
use crate::Axis;
|
use super::Axis;
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone, Copy, Debug, Serialize, Deserialize, Display, EnumString, ValueEnum, JsonSchema,
|
Clone, Copy, Debug, Serialize, Deserialize, Display, EnumString, ValueEnum, JsonSchema,
|
||||||
+5
-8
@@ -8,6 +8,7 @@ pub mod com;
|
|||||||
pub mod ring;
|
pub mod ring;
|
||||||
pub mod colour;
|
pub mod colour;
|
||||||
pub mod container;
|
pub mod container;
|
||||||
|
pub mod core;
|
||||||
pub mod focus_manager;
|
pub mod focus_manager;
|
||||||
pub mod monitor;
|
pub mod monitor;
|
||||||
pub mod monitor_reconciliator;
|
pub mod monitor_reconciliator;
|
||||||
@@ -48,6 +49,7 @@ use std::sync::Arc;
|
|||||||
pub use animation::*;
|
pub use animation::*;
|
||||||
pub use animation_manager::*;
|
pub use animation_manager::*;
|
||||||
pub use colour::*;
|
pub use colour::*;
|
||||||
|
pub use core::*;
|
||||||
pub use process_command::*;
|
pub use process_command::*;
|
||||||
pub use process_event::*;
|
pub use process_event::*;
|
||||||
pub use static_config::*;
|
pub use static_config::*;
|
||||||
@@ -57,15 +59,10 @@ pub use window_manager_event::*;
|
|||||||
pub use windows_api::WindowsApi;
|
pub use windows_api::WindowsApi;
|
||||||
pub use windows_api::*;
|
pub use windows_api::*;
|
||||||
|
|
||||||
|
use crate::core::config_generation::IdWithIdentifier;
|
||||||
|
use crate::core::config_generation::MatchingRule;
|
||||||
|
use crate::core::config_generation::MatchingStrategy;
|
||||||
use color_eyre::Result;
|
use color_eyre::Result;
|
||||||
use komorebi_core::config_generation::IdWithIdentifier;
|
|
||||||
use komorebi_core::config_generation::MatchingRule;
|
|
||||||
use komorebi_core::config_generation::MatchingStrategy;
|
|
||||||
use komorebi_core::AnimationStyle;
|
|
||||||
use komorebi_core::ApplicationIdentifier;
|
|
||||||
use komorebi_core::HidingBehaviour;
|
|
||||||
use komorebi_core::Rect;
|
|
||||||
use komorebi_core::SocketMessage;
|
|
||||||
use os_info::Version;
|
use os_info::Version;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ use schemars::JsonSchema;
|
|||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
use komorebi_core::Rect;
|
use crate::core::Rect;
|
||||||
|
|
||||||
use crate::container::Container;
|
use crate::container::Container;
|
||||||
use crate::ring::Ring;
|
use crate::ring::Ring;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#![deny(clippy::unwrap_used, clippy::expect_used)]
|
#![deny(clippy::unwrap_used, clippy::expect_used)]
|
||||||
|
|
||||||
use crate::border_manager;
|
use crate::border_manager;
|
||||||
|
use crate::core::Rect;
|
||||||
use crate::monitor;
|
use crate::monitor;
|
||||||
use crate::monitor::Monitor;
|
use crate::monitor::Monitor;
|
||||||
use crate::monitor_reconciliator::hidden::Hidden;
|
use crate::monitor_reconciliator::hidden::Hidden;
|
||||||
@@ -10,7 +11,6 @@ use crate::WindowsApi;
|
|||||||
use crossbeam_channel::Receiver;
|
use crossbeam_channel::Receiver;
|
||||||
use crossbeam_channel::Sender;
|
use crossbeam_channel::Sender;
|
||||||
use crossbeam_utils::atomic::AtomicConsume;
|
use crossbeam_utils::atomic::AtomicConsume;
|
||||||
use komorebi_core::Rect;
|
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::sync::atomic::AtomicBool;
|
use std::sync::atomic::AtomicBool;
|
||||||
|
|||||||
@@ -21,23 +21,23 @@ use schemars::gen::SchemaSettings;
|
|||||||
use schemars::schema_for;
|
use schemars::schema_for;
|
||||||
use uds_windows::UnixStream;
|
use uds_windows::UnixStream;
|
||||||
|
|
||||||
use komorebi_core::config_generation::ApplicationConfiguration;
|
use crate::core::config_generation::ApplicationConfiguration;
|
||||||
use komorebi_core::config_generation::IdWithIdentifier;
|
use crate::core::config_generation::IdWithIdentifier;
|
||||||
use komorebi_core::config_generation::MatchingRule;
|
use crate::core::config_generation::MatchingRule;
|
||||||
use komorebi_core::config_generation::MatchingStrategy;
|
use crate::core::config_generation::MatchingStrategy;
|
||||||
use komorebi_core::ApplicationIdentifier;
|
use crate::core::ApplicationIdentifier;
|
||||||
use komorebi_core::Axis;
|
use crate::core::Axis;
|
||||||
use komorebi_core::BorderImplementation;
|
use crate::core::BorderImplementation;
|
||||||
use komorebi_core::FocusFollowsMouseImplementation;
|
use crate::core::FocusFollowsMouseImplementation;
|
||||||
use komorebi_core::Layout;
|
use crate::core::Layout;
|
||||||
use komorebi_core::MoveBehaviour;
|
use crate::core::MoveBehaviour;
|
||||||
use komorebi_core::OperationDirection;
|
use crate::core::OperationDirection;
|
||||||
use komorebi_core::Rect;
|
use crate::core::Rect;
|
||||||
use komorebi_core::Sizing;
|
use crate::core::Sizing;
|
||||||
use komorebi_core::SocketMessage;
|
use crate::core::SocketMessage;
|
||||||
use komorebi_core::StateQuery;
|
use crate::core::StateQuery;
|
||||||
use komorebi_core::WindowContainerBehaviour;
|
use crate::core::WindowContainerBehaviour;
|
||||||
use komorebi_core::WindowKind;
|
use crate::core::WindowKind;
|
||||||
|
|
||||||
use crate::border_manager;
|
use crate::border_manager;
|
||||||
use crate::border_manager::IMPLEMENTATION;
|
use crate::border_manager::IMPLEMENTATION;
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ use color_eyre::Result;
|
|||||||
use crossbeam_utils::atomic::AtomicConsume;
|
use crossbeam_utils::atomic::AtomicConsume;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
use komorebi_core::OperationDirection;
|
use crate::core::OperationDirection;
|
||||||
use komorebi_core::Rect;
|
use crate::core::Rect;
|
||||||
use komorebi_core::Sizing;
|
use crate::core::Sizing;
|
||||||
use komorebi_core::WindowContainerBehaviour;
|
use crate::core::WindowContainerBehaviour;
|
||||||
|
|
||||||
use crate::border_manager;
|
use crate::border_manager;
|
||||||
use crate::border_manager::BORDER_OFFSET;
|
use crate::border_manager::BORDER_OFFSET;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use winput::message_loop;
|
|||||||
use winput::message_loop::Event;
|
use winput::message_loop::Event;
|
||||||
use winput::Action;
|
use winput::Action;
|
||||||
|
|
||||||
use komorebi_core::FocusFollowsMouseImplementation;
|
use crate::core::FocusFollowsMouseImplementation;
|
||||||
|
|
||||||
use crate::window_manager::WindowManager;
|
use crate::window_manager::WindowManager;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
mod stackbar;
|
mod stackbar;
|
||||||
|
|
||||||
use crate::container::Container;
|
use crate::container::Container;
|
||||||
|
use crate::core::StackbarLabel;
|
||||||
|
use crate::core::StackbarMode;
|
||||||
use crate::stackbar_manager::stackbar::Stackbar;
|
use crate::stackbar_manager::stackbar::Stackbar;
|
||||||
use crate::WindowManager;
|
use crate::WindowManager;
|
||||||
use crate::WindowsApi;
|
use crate::WindowsApi;
|
||||||
@@ -9,8 +11,6 @@ use crossbeam_channel::Receiver;
|
|||||||
use crossbeam_channel::Sender;
|
use crossbeam_channel::Sender;
|
||||||
use crossbeam_utils::atomic::AtomicCell;
|
use crossbeam_utils::atomic::AtomicCell;
|
||||||
use crossbeam_utils::atomic::AtomicConsume;
|
use crossbeam_utils::atomic::AtomicConsume;
|
||||||
use komorebi_core::StackbarLabel;
|
|
||||||
use komorebi_core::StackbarMode;
|
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use std::collections::hash_map::Entry;
|
use std::collections::hash_map::Entry;
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ use crate::border_manager::BORDER_OFFSET;
|
|||||||
use crate::border_manager::BORDER_WIDTH;
|
use crate::border_manager::BORDER_WIDTH;
|
||||||
use crate::border_manager::STYLE;
|
use crate::border_manager::STYLE;
|
||||||
use crate::container::Container;
|
use crate::container::Container;
|
||||||
|
use crate::core::BorderStyle;
|
||||||
|
use crate::core::Rect;
|
||||||
|
use crate::core::StackbarLabel;
|
||||||
use crate::stackbar_manager::STACKBARS_CONTAINERS;
|
use crate::stackbar_manager::STACKBARS_CONTAINERS;
|
||||||
use crate::stackbar_manager::STACKBAR_FOCUSED_TEXT_COLOUR;
|
use crate::stackbar_manager::STACKBAR_FOCUSED_TEXT_COLOUR;
|
||||||
use crate::stackbar_manager::STACKBAR_FONT_FAMILY;
|
use crate::stackbar_manager::STACKBAR_FONT_FAMILY;
|
||||||
@@ -15,9 +18,6 @@ use crate::WindowsApi;
|
|||||||
use crate::DEFAULT_CONTAINER_PADDING;
|
use crate::DEFAULT_CONTAINER_PADDING;
|
||||||
use crate::WINDOWS_11;
|
use crate::WINDOWS_11;
|
||||||
use crossbeam_utils::atomic::AtomicConsume;
|
use crossbeam_utils::atomic::AtomicConsume;
|
||||||
use komorebi_core::BorderStyle;
|
|
||||||
use komorebi_core::Rect;
|
|
||||||
use komorebi_core::StackbarLabel;
|
|
||||||
use std::os::windows::ffi::OsStrExt;
|
use std::os::windows::ffi::OsStrExt;
|
||||||
use std::sync::atomic::Ordering;
|
use std::sync::atomic::Ordering;
|
||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ use crate::border_manager::IMPLEMENTATION;
|
|||||||
use crate::border_manager::STYLE;
|
use crate::border_manager::STYLE;
|
||||||
use crate::border_manager::Z_ORDER;
|
use crate::border_manager::Z_ORDER;
|
||||||
use crate::colour::Colour;
|
use crate::colour::Colour;
|
||||||
|
use crate::core::BorderImplementation;
|
||||||
|
use crate::core::StackbarLabel;
|
||||||
|
use crate::core::StackbarMode;
|
||||||
use crate::current_virtual_desktop;
|
use crate::current_virtual_desktop;
|
||||||
use crate::monitor::Monitor;
|
use crate::monitor::Monitor;
|
||||||
use crate::monitor_reconciliator;
|
use crate::monitor_reconciliator;
|
||||||
@@ -41,33 +44,30 @@ use crate::REGEX_IDENTIFIERS;
|
|||||||
use crate::TRAY_AND_MULTI_WINDOW_IDENTIFIERS;
|
use crate::TRAY_AND_MULTI_WINDOW_IDENTIFIERS;
|
||||||
use crate::WINDOWS_11;
|
use crate::WINDOWS_11;
|
||||||
use crate::WORKSPACE_RULES;
|
use crate::WORKSPACE_RULES;
|
||||||
use komorebi_core::BorderImplementation;
|
|
||||||
use komorebi_core::StackbarLabel;
|
|
||||||
use komorebi_core::StackbarMode;
|
|
||||||
|
|
||||||
|
use crate::core::config_generation::ApplicationConfiguration;
|
||||||
|
use crate::core::config_generation::ApplicationConfigurationGenerator;
|
||||||
|
use crate::core::config_generation::ApplicationOptions;
|
||||||
|
use crate::core::config_generation::IdWithIdentifier;
|
||||||
|
use crate::core::config_generation::MatchingRule;
|
||||||
|
use crate::core::config_generation::MatchingStrategy;
|
||||||
|
use crate::core::resolve_home_path;
|
||||||
|
use crate::core::AnimationStyle;
|
||||||
|
use crate::core::ApplicationIdentifier;
|
||||||
|
use crate::core::BorderStyle;
|
||||||
|
use crate::core::DefaultLayout;
|
||||||
|
use crate::core::FocusFollowsMouseImplementation;
|
||||||
|
use crate::core::HidingBehaviour;
|
||||||
|
use crate::core::Layout;
|
||||||
|
use crate::core::MoveBehaviour;
|
||||||
|
use crate::core::OperationBehaviour;
|
||||||
|
use crate::core::Rect;
|
||||||
|
use crate::core::SocketMessage;
|
||||||
|
use crate::core::WindowContainerBehaviour;
|
||||||
use color_eyre::Result;
|
use color_eyre::Result;
|
||||||
use crossbeam_channel::Receiver;
|
use crossbeam_channel::Receiver;
|
||||||
use hotwatch::EventKind;
|
use hotwatch::EventKind;
|
||||||
use hotwatch::Hotwatch;
|
use hotwatch::Hotwatch;
|
||||||
use komorebi_core::config_generation::ApplicationConfiguration;
|
|
||||||
use komorebi_core::config_generation::ApplicationConfigurationGenerator;
|
|
||||||
use komorebi_core::config_generation::ApplicationOptions;
|
|
||||||
use komorebi_core::config_generation::IdWithIdentifier;
|
|
||||||
use komorebi_core::config_generation::MatchingRule;
|
|
||||||
use komorebi_core::config_generation::MatchingStrategy;
|
|
||||||
use komorebi_core::resolve_home_path;
|
|
||||||
use komorebi_core::AnimationStyle;
|
|
||||||
use komorebi_core::ApplicationIdentifier;
|
|
||||||
use komorebi_core::BorderStyle;
|
|
||||||
use komorebi_core::DefaultLayout;
|
|
||||||
use komorebi_core::FocusFollowsMouseImplementation;
|
|
||||||
use komorebi_core::HidingBehaviour;
|
|
||||||
use komorebi_core::Layout;
|
|
||||||
use komorebi_core::MoveBehaviour;
|
|
||||||
use komorebi_core::OperationBehaviour;
|
|
||||||
use komorebi_core::Rect;
|
|
||||||
use komorebi_core::SocketMessage;
|
|
||||||
use komorebi_core::WindowContainerBehaviour;
|
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ use std::sync::atomic::AtomicI32;
|
|||||||
use std::sync::atomic::Ordering;
|
use std::sync::atomic::Ordering;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
use crate::core::config_generation::IdWithIdentifier;
|
||||||
|
use crate::core::config_generation::MatchingRule;
|
||||||
|
use crate::core::config_generation::MatchingStrategy;
|
||||||
use color_eyre::eyre;
|
use color_eyre::eyre;
|
||||||
use color_eyre::Result;
|
use color_eyre::Result;
|
||||||
use crossbeam_utils::atomic::AtomicConsume;
|
use crossbeam_utils::atomic::AtomicConsume;
|
||||||
use komorebi_core::config_generation::IdWithIdentifier;
|
|
||||||
use komorebi_core::config_generation::MatchingRule;
|
|
||||||
use komorebi_core::config_generation::MatchingStrategy;
|
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
use serde::ser::SerializeStruct;
|
use serde::ser::SerializeStruct;
|
||||||
@@ -29,9 +29,9 @@ use serde::Serialize;
|
|||||||
use serde::Serializer;
|
use serde::Serializer;
|
||||||
use windows::Win32::Foundation::HWND;
|
use windows::Win32::Foundation::HWND;
|
||||||
|
|
||||||
use komorebi_core::ApplicationIdentifier;
|
use crate::core::ApplicationIdentifier;
|
||||||
use komorebi_core::HidingBehaviour;
|
use crate::core::HidingBehaviour;
|
||||||
use komorebi_core::Rect;
|
use crate::core::Rect;
|
||||||
|
|
||||||
use crate::animation::Animation;
|
use crate::animation::Animation;
|
||||||
use crate::styles::ExtendedWindowStyle;
|
use crate::styles::ExtendedWindowStyle;
|
||||||
|
|||||||
@@ -22,27 +22,28 @@ use serde::Deserialize;
|
|||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use uds_windows::UnixListener;
|
use uds_windows::UnixListener;
|
||||||
|
|
||||||
use komorebi_core::config_generation::MatchingRule;
|
use crate::core::config_generation::MatchingRule;
|
||||||
use komorebi_core::custom_layout::CustomLayout;
|
use crate::core::custom_layout::CustomLayout;
|
||||||
use komorebi_core::Arrangement;
|
use crate::core::Arrangement;
|
||||||
use komorebi_core::Axis;
|
use crate::core::Axis;
|
||||||
use komorebi_core::BorderStyle;
|
use crate::core::BorderStyle;
|
||||||
use komorebi_core::CycleDirection;
|
use crate::core::CycleDirection;
|
||||||
use komorebi_core::DefaultLayout;
|
use crate::core::DefaultLayout;
|
||||||
use komorebi_core::FocusFollowsMouseImplementation;
|
use crate::core::FocusFollowsMouseImplementation;
|
||||||
use komorebi_core::HidingBehaviour;
|
use crate::core::HidingBehaviour;
|
||||||
use komorebi_core::Layout;
|
use crate::core::Layout;
|
||||||
use komorebi_core::MoveBehaviour;
|
use crate::core::MoveBehaviour;
|
||||||
use komorebi_core::OperationBehaviour;
|
use crate::core::OperationBehaviour;
|
||||||
use komorebi_core::OperationDirection;
|
use crate::core::OperationDirection;
|
||||||
use komorebi_core::Rect;
|
use crate::core::Rect;
|
||||||
use komorebi_core::Sizing;
|
use crate::core::Sizing;
|
||||||
use komorebi_core::StackbarLabel;
|
use crate::core::StackbarLabel;
|
||||||
use komorebi_core::WindowContainerBehaviour;
|
use crate::core::WindowContainerBehaviour;
|
||||||
|
|
||||||
use crate::border_manager;
|
use crate::border_manager;
|
||||||
use crate::border_manager::STYLE;
|
use crate::border_manager::STYLE;
|
||||||
use crate::container::Container;
|
use crate::container::Container;
|
||||||
|
use crate::core::StackbarMode;
|
||||||
use crate::current_virtual_desktop;
|
use crate::current_virtual_desktop;
|
||||||
use crate::load_configuration;
|
use crate::load_configuration;
|
||||||
use crate::monitor::Monitor;
|
use crate::monitor::Monitor;
|
||||||
@@ -80,7 +81,6 @@ use crate::OBJECT_NAME_CHANGE_ON_LAUNCH;
|
|||||||
use crate::REMOVE_TITLEBARS;
|
use crate::REMOVE_TITLEBARS;
|
||||||
use crate::TRAY_AND_MULTI_WINDOW_IDENTIFIERS;
|
use crate::TRAY_AND_MULTI_WINDOW_IDENTIFIERS;
|
||||||
use crate::WORKSPACE_RULES;
|
use crate::WORKSPACE_RULES;
|
||||||
use komorebi_core::StackbarMode;
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct WindowManager {
|
pub struct WindowManager {
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ use windows::Win32::UI::WindowsAndMessaging::WS_EX_TOPMOST;
|
|||||||
use windows::Win32::UI::WindowsAndMessaging::WS_POPUP;
|
use windows::Win32::UI::WindowsAndMessaging::WS_POPUP;
|
||||||
use windows::Win32::UI::WindowsAndMessaging::WS_SYSMENU;
|
use windows::Win32::UI::WindowsAndMessaging::WS_SYSMENU;
|
||||||
|
|
||||||
use komorebi_core::Rect;
|
use crate::core::Rect;
|
||||||
|
|
||||||
use crate::container::Container;
|
use crate::container::Container;
|
||||||
use crate::monitor;
|
use crate::monitor;
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ use schemars::JsonSchema;
|
|||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
use komorebi_core::Axis;
|
use crate::core::Axis;
|
||||||
use komorebi_core::CustomLayout;
|
use crate::core::CustomLayout;
|
||||||
use komorebi_core::CycleDirection;
|
use crate::core::CycleDirection;
|
||||||
use komorebi_core::DefaultLayout;
|
use crate::core::DefaultLayout;
|
||||||
use komorebi_core::Layout;
|
use crate::core::Layout;
|
||||||
use komorebi_core::OperationDirection;
|
use crate::core::OperationDirection;
|
||||||
use komorebi_core::Rect;
|
use crate::core::Rect;
|
||||||
|
|
||||||
use crate::border_manager::BORDER_OFFSET;
|
use crate::border_manager::BORDER_OFFSET;
|
||||||
use crate::border_manager::BORDER_WIDTH;
|
use crate::border_manager::BORDER_WIDTH;
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ edition = "2021"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
komorebi-core = { path = "../komorebi-core" }
|
|
||||||
komorebi-client = { path = "../komorebi-client" }
|
komorebi-client = { path = "../komorebi-client" }
|
||||||
|
|
||||||
clap = { version = "4", features = ["derive", "wrap_help"] }
|
clap = { version = "4", features = ["derive", "wrap_help"] }
|
||||||
|
|||||||
+324
-369
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user