feat(config): load cosmic-randr output Lists
This commit is contained in:
parent
416b66b776
commit
bb8e066d6d
18 changed files with 270 additions and 34 deletions
159
Cargo.lock
generated
159
Cargo.lock
generated
|
|
@ -879,6 +879,7 @@ name = "cosmic-comp-config"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-config",
|
"cosmic-config",
|
||||||
|
"cosmic-randr-shell",
|
||||||
"input",
|
"input",
|
||||||
"libdisplay-info",
|
"libdisplay-info",
|
||||||
"ron 0.9.0",
|
"ron 0.9.0",
|
||||||
|
|
@ -941,6 +942,17 @@ dependencies = [
|
||||||
"wayland-server",
|
"wayland-server",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cosmic-randr-shell"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "git+https://github.com/pop-os/cosmic-randr/?branch=kdl-command#12c8c07fedd30572ed123d4463589d33474a0239"
|
||||||
|
dependencies = [
|
||||||
|
"kdl",
|
||||||
|
"slotmap",
|
||||||
|
"thiserror 2.0.14",
|
||||||
|
"tokio",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-settings-config"
|
name = "cosmic-settings-config"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
@ -2695,6 +2707,17 @@ dependencies = [
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "io-uring"
|
||||||
|
version = "0.7.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.9.1",
|
||||||
|
"cfg-if",
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "itoa"
|
name = "itoa"
|
||||||
version = "1.0.15"
|
version = "1.0.15"
|
||||||
|
|
@ -2758,6 +2781,18 @@ dependencies = [
|
||||||
"mutate_once",
|
"mutate_once",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "kdl"
|
||||||
|
version = "6.3.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "12661358400b02cbbf1fbd05f0a483335490e8a6bd1867620f2eeb78f304a22f"
|
||||||
|
dependencies = [
|
||||||
|
"miette",
|
||||||
|
"num",
|
||||||
|
"thiserror 1.0.69",
|
||||||
|
"winnow 0.6.24",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "keyframe"
|
name = "keyframe"
|
||||||
version = "1.1.1"
|
version = "1.1.1"
|
||||||
|
|
@ -3202,6 +3237,28 @@ dependencies = [
|
||||||
"paste",
|
"paste",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "miette"
|
||||||
|
version = "7.6.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5f98efec8807c63c752b5bd61f862c165c115b0a35685bdcfd9238c7aeb592b7"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"miette-derive",
|
||||||
|
"unicode-width",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "miette-derive"
|
||||||
|
version = "7.6.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn 2.0.105",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mime"
|
name = "mime"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
@ -3397,12 +3454,76 @@ dependencies = [
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num"
|
||||||
|
version = "0.4.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23"
|
||||||
|
dependencies = [
|
||||||
|
"num-bigint",
|
||||||
|
"num-complex",
|
||||||
|
"num-integer",
|
||||||
|
"num-iter",
|
||||||
|
"num-rational",
|
||||||
|
"num-traits",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-bigint"
|
||||||
|
version = "0.4.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
|
||||||
|
dependencies = [
|
||||||
|
"num-integer",
|
||||||
|
"num-traits",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-complex"
|
||||||
|
version = "0.4.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
|
||||||
|
dependencies = [
|
||||||
|
"num-traits",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-conv"
|
name = "num-conv"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
|
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-integer"
|
||||||
|
version = "0.1.46"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
|
||||||
|
dependencies = [
|
||||||
|
"num-traits",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-iter"
|
||||||
|
version = "0.1.45"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
"num-integer",
|
||||||
|
"num-traits",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-rational"
|
||||||
|
version = "0.4.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
|
||||||
|
dependencies = [
|
||||||
|
"num-bigint",
|
||||||
|
"num-integer",
|
||||||
|
"num-traits",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-traits"
|
name = "num-traits"
|
||||||
version = "0.2.19"
|
version = "0.2.19"
|
||||||
|
|
@ -5264,6 +5385,23 @@ version = "0.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tokio"
|
||||||
|
version = "1.47.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038"
|
||||||
|
dependencies = [
|
||||||
|
"backtrace",
|
||||||
|
"bytes",
|
||||||
|
"io-uring",
|
||||||
|
"libc",
|
||||||
|
"mio",
|
||||||
|
"pin-project-lite",
|
||||||
|
"signal-hook-registry",
|
||||||
|
"slab",
|
||||||
|
"windows-sys 0.59.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml"
|
name = "toml"
|
||||||
version = "0.5.11"
|
version = "0.5.11"
|
||||||
|
|
@ -5304,7 +5442,7 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_spanned",
|
"serde_spanned",
|
||||||
"toml_datetime",
|
"toml_datetime",
|
||||||
"winnow",
|
"winnow 0.7.12",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -6080,7 +6218,7 @@ version = "0.1.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -6573,6 +6711,15 @@ dependencies = [
|
||||||
"xkbcommon-dl",
|
"xkbcommon-dl",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winnow"
|
||||||
|
version = "0.6.24"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winnow"
|
name = "winnow"
|
||||||
version = "0.7.12"
|
version = "0.7.12"
|
||||||
|
|
@ -6787,7 +6934,7 @@ dependencies = [
|
||||||
"tracing",
|
"tracing",
|
||||||
"uds_windows",
|
"uds_windows",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.59.0",
|
||||||
"winnow",
|
"winnow 0.7.12",
|
||||||
"zbus_macros",
|
"zbus_macros",
|
||||||
"zbus_names",
|
"zbus_names",
|
||||||
"zvariant",
|
"zvariant",
|
||||||
|
|
@ -6816,7 +6963,7 @@ checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"static_assertions",
|
"static_assertions",
|
||||||
"winnow",
|
"winnow 0.7.12",
|
||||||
"zvariant",
|
"zvariant",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -6924,7 +7071,7 @@ dependencies = [
|
||||||
"endi",
|
"endi",
|
||||||
"enumflags2",
|
"enumflags2",
|
||||||
"serde",
|
"serde",
|
||||||
"winnow",
|
"winnow 0.7.12",
|
||||||
"zvariant_derive",
|
"zvariant_derive",
|
||||||
"zvariant_utils",
|
"zvariant_utils",
|
||||||
]
|
]
|
||||||
|
|
@ -6953,5 +7100,5 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"static_assertions",
|
"static_assertions",
|
||||||
"syn 2.0.105",
|
"syn 2.0.105",
|
||||||
"winnow",
|
"winnow 0.7.12",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ bytemuck = "1.23"
|
||||||
calloop = { version = "0.14.2", features = ["executor"] }
|
calloop = { version = "0.14.2", features = ["executor"] }
|
||||||
cosmic-comp-config = { path = "cosmic-comp-config", features = [
|
cosmic-comp-config = { path = "cosmic-comp-config", features = [
|
||||||
"libdisplay-info",
|
"libdisplay-info",
|
||||||
|
"output",
|
||||||
] }
|
] }
|
||||||
cosmic-config = { git = "https://github.com/pop-os/libcosmic/", features = [
|
cosmic-config = { git = "https://github.com/pop-os/libcosmic/", features = [
|
||||||
"calloop",
|
"calloop",
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cosmic-config = { git = "https://github.com/pop-os/libcosmic/" }
|
cosmic-config = { git = "https://github.com/pop-os/libcosmic/" }
|
||||||
|
cosmic-randr-shell = { git = "https://github.com/pop-os/cosmic-randr/", branch = "kdl-command", optional = true }
|
||||||
|
# cosmic-randr-shell = { path = "../../cosmic-randr/shell", optional = true }
|
||||||
input = "0.9.0"
|
input = "0.9.0"
|
||||||
libdisplay-info = { version = "0.2.0", optional = true }
|
libdisplay-info = { version = "0.2.0", optional = true }
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
|
@ -15,5 +17,7 @@ tracing = { version = "0.1.37", features = [
|
||||||
], optional = true }
|
], optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["output"]
|
# XXX before merging remove defaults
|
||||||
|
default = ["output", "randr"]
|
||||||
output = ["ron", "tracing"]
|
output = ["ron", "tracing"]
|
||||||
|
randr = ["cosmic-randr-shell", "output"]
|
||||||
|
|
|
||||||
6
cosmic-comp-config/src/output/mod.rs
Normal file
6
cosmic-comp-config/src/output/mod.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
/// Internal output configurations used by cosmic-comp
|
||||||
|
pub mod comp;
|
||||||
|
|
||||||
|
#[cfg(feature = "randr")]
|
||||||
|
/// cosmic-randr style output configurations
|
||||||
|
pub mod randr;
|
||||||
90
cosmic-comp-config/src/output/randr.rs
Normal file
90
cosmic-comp-config/src/output/randr.rs
Normal file
|
|
@ -0,0 +1,90 @@
|
||||||
|
use std::path::Path;
|
||||||
|
|
||||||
|
use cosmic_randr_shell::{AdaptiveSyncState, List};
|
||||||
|
|
||||||
|
use crate::output::comp::OutputState;
|
||||||
|
|
||||||
|
pub struct CompList {
|
||||||
|
infos: Vec<super::comp::OutputInfo>,
|
||||||
|
outputs: Vec<super::comp::OutputConfig>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<CompList> for cosmic_randr_shell::List {
|
||||||
|
fn from(CompList { infos, outputs }: CompList) -> cosmic_randr_shell::List {
|
||||||
|
let mut list = cosmic_randr_shell::List::default();
|
||||||
|
for (info, output) in infos.into_iter().zip(outputs.into_iter()) {
|
||||||
|
let current = list.modes.insert(cosmic_randr_shell::Mode {
|
||||||
|
size: (output.mode.0 .0 as u32, output.mode.0 .1 as u32),
|
||||||
|
refresh_rate: output.mode.1.unwrap_or_default(),
|
||||||
|
// XXX not in config as far as i can tell
|
||||||
|
preferred: false,
|
||||||
|
});
|
||||||
|
let modes = vec![current];
|
||||||
|
|
||||||
|
// for mode in output. {}
|
||||||
|
list.outputs.insert(cosmic_randr_shell::Output {
|
||||||
|
name: info.connector,
|
||||||
|
enabled: !matches!(output.enabled, OutputState::Disabled),
|
||||||
|
mirroring: match output.enabled {
|
||||||
|
OutputState::Mirroring(m) => Some(m),
|
||||||
|
_ => None,
|
||||||
|
},
|
||||||
|
make: Some(info.make),
|
||||||
|
model: info.model,
|
||||||
|
position: (output.position.0 as i32, output.position.1 as i32),
|
||||||
|
scale: output.scale,
|
||||||
|
transform: Some(match output.transform {
|
||||||
|
crate::output::comp::TransformDef::Normal => {
|
||||||
|
cosmic_randr_shell::Transform::Normal
|
||||||
|
}
|
||||||
|
crate::output::comp::TransformDef::_90 => {
|
||||||
|
cosmic_randr_shell::Transform::Rotate90
|
||||||
|
}
|
||||||
|
crate::output::comp::TransformDef::_180 => {
|
||||||
|
cosmic_randr_shell::Transform::Rotate180
|
||||||
|
}
|
||||||
|
crate::output::comp::TransformDef::_270 => {
|
||||||
|
cosmic_randr_shell::Transform::Rotate270
|
||||||
|
}
|
||||||
|
crate::output::comp::TransformDef::Flipped => {
|
||||||
|
cosmic_randr_shell::Transform::Flipped
|
||||||
|
}
|
||||||
|
crate::output::comp::TransformDef::Flipped90 => {
|
||||||
|
cosmic_randr_shell::Transform::Flipped90
|
||||||
|
}
|
||||||
|
crate::output::comp::TransformDef::Flipped180 => {
|
||||||
|
cosmic_randr_shell::Transform::Flipped180
|
||||||
|
}
|
||||||
|
crate::output::comp::TransformDef::Flipped270 => {
|
||||||
|
cosmic_randr_shell::Transform::Flipped270
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
modes,
|
||||||
|
current: Some(current),
|
||||||
|
adaptive_sync: Some(match output.vrr {
|
||||||
|
crate::output::comp::AdaptiveSync::Enabled => AdaptiveSyncState::Auto,
|
||||||
|
crate::output::comp::AdaptiveSync::Disabled => AdaptiveSyncState::Disabled,
|
||||||
|
crate::output::comp::AdaptiveSync::Force => AdaptiveSyncState::Always,
|
||||||
|
}),
|
||||||
|
xwayland_primary: Some(output.xwayland_primary),
|
||||||
|
// XXX no physical output size in the config
|
||||||
|
physical: (0, 0),
|
||||||
|
adaptive_sync_availability: None,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
list
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn load_outputs(path: Option<impl AsRef<Path>>) -> Vec<List> {
|
||||||
|
let output_config = crate::output::comp::load_outputs(path);
|
||||||
|
output_config
|
||||||
|
.config
|
||||||
|
.into_iter()
|
||||||
|
.map(|(infos, outputs)| {
|
||||||
|
let comp_config = CompList { infos, outputs };
|
||||||
|
List::from(comp_config)
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::output::EdidProduct;
|
use crate::output::comp::EdidProduct;
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct WorkspaceConfig {
|
pub struct WorkspaceConfig {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ use crate::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
use cosmic_comp_config::output::{AdaptiveSync, OutputConfig, OutputState};
|
use cosmic_comp_config::output::comp::{AdaptiveSync, OutputConfig, OutputState};
|
||||||
use libc::dev_t;
|
use libc::dev_t;
|
||||||
use smithay::{
|
use smithay::{
|
||||||
backend::{
|
backend::{
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ use crate::{
|
||||||
|
|
||||||
use anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
use calloop::LoopSignal;
|
use calloop::LoopSignal;
|
||||||
use cosmic_comp_config::output::{AdaptiveSync, OutputState};
|
use cosmic_comp_config::output::comp::{AdaptiveSync, OutputState};
|
||||||
use indexmap::IndexMap;
|
use indexmap::IndexMap;
|
||||||
use render::gles::GbmGlowBackend;
|
use render::gles::GbmGlowBackend;
|
||||||
use smithay::{
|
use smithay::{
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ use crate::{
|
||||||
|
|
||||||
use anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
use calloop::channel::Channel;
|
use calloop::channel::Channel;
|
||||||
use cosmic_comp_config::output::AdaptiveSync;
|
use cosmic_comp_config::output::comp::AdaptiveSync;
|
||||||
use smithay::{
|
use smithay::{
|
||||||
backend::{
|
backend::{
|
||||||
allocator::{
|
allocator::{
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ use crate::{
|
||||||
utils::prelude::*,
|
utils::prelude::*,
|
||||||
};
|
};
|
||||||
use anyhow::{anyhow, Context, Result};
|
use anyhow::{anyhow, Context, Result};
|
||||||
use cosmic_comp_config::output::{OutputConfig, TransformDef};
|
use cosmic_comp_config::output::comp::{OutputConfig, TransformDef};
|
||||||
use smithay::{
|
use smithay::{
|
||||||
backend::{
|
backend::{
|
||||||
drm::NodeType,
|
drm::NodeType,
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ use crate::{
|
||||||
utils::prelude::*,
|
utils::prelude::*,
|
||||||
};
|
};
|
||||||
use anyhow::{anyhow, Context, Result};
|
use anyhow::{anyhow, Context, Result};
|
||||||
use cosmic_comp_config::output::OutputConfig;
|
use cosmic_comp_config::output::comp::OutputConfig;
|
||||||
use smithay::{
|
use smithay::{
|
||||||
backend::{
|
backend::{
|
||||||
allocator::{
|
allocator::{
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,12 @@ pub mod key_bindings;
|
||||||
mod types;
|
mod types;
|
||||||
|
|
||||||
use cosmic::config::CosmicTk;
|
use cosmic::config::CosmicTk;
|
||||||
pub use cosmic_comp_config::output::EdidProduct;
|
pub use cosmic_comp_config::output::comp::EdidProduct;
|
||||||
use cosmic_comp_config::{
|
use cosmic_comp_config::{
|
||||||
input::{DeviceState as InputDeviceState, InputConfig, TouchpadOverride},
|
input::{DeviceState as InputDeviceState, InputConfig, TouchpadOverride},
|
||||||
output::{load_outputs, OutputConfig, OutputInfo, OutputState, OutputsConfig, TransformDef},
|
output::comp::{
|
||||||
|
load_outputs, OutputConfig, OutputInfo, OutputState, OutputsConfig, TransformDef,
|
||||||
|
},
|
||||||
workspace::WorkspaceConfig,
|
workspace::WorkspaceConfig,
|
||||||
CosmicCompConfig, KeyboardConfig, TileBehavior, XkbConfig, XwaylandDescaling,
|
CosmicCompConfig, KeyboardConfig, TileBehavior, XkbConfig, XwaylandDescaling,
|
||||||
XwaylandEavesdropping, ZoomConfig,
|
XwaylandEavesdropping, ZoomConfig,
|
||||||
|
|
@ -141,20 +143,6 @@ impl From<CompTransformDef> for Transform {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "libdisplay-info")]
|
|
||||||
impl From<libdisplay_info::edid::VendorProduct> for EdidProduct {
|
|
||||||
fn from(vp: libdisplay_info::edid::VendorProduct) -> Self {
|
|
||||||
Self {
|
|
||||||
manufacturer: vp.manufacturer,
|
|
||||||
product: vp.product,
|
|
||||||
serial: vp.serial,
|
|
||||||
manufacture_week: vp.manufacture_week,
|
|
||||||
manufacture_year: vp.manufacture_year,
|
|
||||||
model_year: vp.model_year,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Default, Deserialize, Serialize, Clone, PartialEq)]
|
#[derive(Debug, Default, Deserialize, Serialize, Clone, PartialEq)]
|
||||||
pub struct ScreenFilter {
|
pub struct ScreenFilter {
|
||||||
pub inverted: bool,
|
pub inverted: bool,
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ use crate::{
|
||||||
};
|
};
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use calloop::RegistrationToken;
|
use calloop::RegistrationToken;
|
||||||
use cosmic_comp_config::output::{OutputConfig, OutputState};
|
use cosmic_comp_config::output::comp::{OutputConfig, OutputState};
|
||||||
use i18n_embed::{
|
use i18n_embed::{
|
||||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||||
DesktopLanguageRequester,
|
DesktopLanguageRequester,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use cosmic_comp_config::output::{AdaptiveSync, OutputConfig, OutputState};
|
use cosmic_comp_config::output::comp::{AdaptiveSync, OutputConfig, OutputState};
|
||||||
use smithay::{
|
use smithay::{
|
||||||
backend::drm::VrrSupport as Support,
|
backend::drm::VrrSupport as Support,
|
||||||
output::{Output, WeakOutput},
|
output::{Output, WeakOutput},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic_comp_config::output::{OutputConfig, OutputState, TransformDef};
|
use cosmic_comp_config::output::comp::{OutputConfig, OutputState, TransformDef};
|
||||||
use smithay::{output::Output, utils::Point};
|
use smithay::{output::Output, utils::Point};
|
||||||
use tracing::{error, warn};
|
use tracing::{error, warn};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use smithay::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
use cosmic_comp_config::output::OutputState as EnabledState;
|
use cosmic_comp_config::output::comp::OutputState as EnabledState;
|
||||||
|
|
||||||
use cosmic_protocols::output_management::v1::server::{
|
use cosmic_protocols::output_management::v1::server::{
|
||||||
zcosmic_output_configuration_head_v1::{self, ZcosmicOutputConfigurationHeadV1},
|
zcosmic_output_configuration_head_v1::{self, ZcosmicOutputConfigurationHeadV1},
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use calloop::{
|
||||||
timer::{TimeoutAction, Timer},
|
timer::{TimeoutAction, Timer},
|
||||||
LoopHandle,
|
LoopHandle,
|
||||||
};
|
};
|
||||||
use cosmic_comp_config::output::AdaptiveSync;
|
use cosmic_comp_config::output::comp::AdaptiveSync;
|
||||||
use cosmic_protocols::output_management::v1::server::{
|
use cosmic_protocols::output_management::v1::server::{
|
||||||
zcosmic_output_configuration_head_v1::ZcosmicOutputConfigurationHeadV1,
|
zcosmic_output_configuration_head_v1::ZcosmicOutputConfigurationHeadV1,
|
||||||
zcosmic_output_configuration_v1::ZcosmicOutputConfigurationV1,
|
zcosmic_output_configuration_v1::ZcosmicOutputConfigurationV1,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue