0.6.0 #1

Merged
pogmommy merged 89 commits from 0.6.0 into main 2025-07-04 20:29:26 -07:00
4 changed files with 18 additions and 2 deletions
Showing only changes of commit 510b824e75 - Show all commits

View file

@ -11,6 +11,7 @@ All notable changes to eww will be listed here, starting at changes since versio
- Fix the gtk `stack` widget (By: ovalkonia)
- Fix values in the `EWW_NET` variable (By: mario-kr)
- Fix the gtk `expander` widget (By: ovalkonia)
- Fix wayland monitor names support (By: dragonnn)
### Features
- Update rust toolchain to 1.80.1 (By: w-lfchen)

1
Cargo.lock generated
View file

@ -941,6 +941,7 @@ dependencies = [
"eww_shared_util",
"extend",
"futures",
"gdk-sys",
"gdkx11",
"grass",
"gtk",

View file

@ -23,9 +23,12 @@ notifier_host.workspace = true
gtk-layer-shell = { version = "0.8.1", optional = true }
gdkx11 = { version = "0.18", optional = true }
x11rb = { version = "0.13.1", features = ["randr"], optional = true }
gdk-sys = "0.18.0"
ordered-stream = "0.2.0"
grass.workspace = true
anyhow.workspace = true
bincode.workspace = true
chrono.workspace = true
@ -35,7 +38,6 @@ codespan-reporting.workspace = true
derive_more.workspace = true
extend.workspace = true
futures.workspace = true
grass.workspace = true
gtk.workspace = true
itertools.workspace = true
libc.workspace = true

View file

@ -625,6 +625,18 @@ fn get_gdk_monitor(identifier: Option<MonitorIdentifier>) -> Result<Monitor> {
Ok(monitor)
}
/// Get the name of monitor plug for given monitor number
/// workaround gdk not providing this information on wayland in regular calls
/// gdk_screen_get_monitor_plug_name is deprecated but works fine for that case
fn get_monitor_plug_name(display: &gdk::Display, monitor_num: i32) -> Option<&str> {
unsafe {
use glib::translate::ToGlibPtr;
let plug_name_pointer = gdk_sys::gdk_screen_get_monitor_plug_name(display.default_screen().to_glib_none().0, monitor_num);
use std::ffi::CStr;
CStr::from_ptr(plug_name_pointer).to_str().ok()
}
}
/// Returns the [Monitor][gdk::Monitor] structure corresponding to the identifer.
/// Outside of x11, only [MonitorIdentifier::Numeric] is supported
pub fn get_monitor_from_display(display: &gdk::Display, identifier: &MonitorIdentifier) -> Option<gdk::Monitor> {
@ -642,7 +654,7 @@ pub fn get_monitor_from_display(display: &gdk::Display, identifier: &MonitorIden
MonitorIdentifier::Name(name) => {
for m in 0..display.n_monitors() {
if let Some(model) = display.monitor(m).and_then(|x| x.model()) {
if model == *name {
if model == *name || Some(name.as_str()) == get_monitor_plug_name(display, m) {
return display.monitor(m);
}
}