0.6.0 #1
8 changed files with 76 additions and 76 deletions
|
@ -10,6 +10,7 @@ All notable changes to eww will be listed here, starting at changes since versio
|
||||||
- Fix remove items from systray (By: vnva)
|
- Fix remove items from systray (By: vnva)
|
||||||
- Fix the gtk `stack` widget (By: ovalkonia)
|
- Fix the gtk `stack` widget (By: ovalkonia)
|
||||||
- Fix values in the `EWW_NET` variable (By: mario-kr)
|
- Fix values in the `EWW_NET` variable (By: mario-kr)
|
||||||
|
- Fix the gtk `expander` widget (By: ovalkonia)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
- Update rust toolchain to 1.80.1 (By: w-lfchen)
|
- Update rust toolchain to 1.80.1 (By: w-lfchen)
|
||||||
|
@ -25,7 +26,6 @@ All notable changes to eww will be listed here, starting at changes since versio
|
||||||
- Fix nix flake
|
- Fix nix flake
|
||||||
- Fix `jq` (By: w-lfchen)
|
- Fix `jq` (By: w-lfchen)
|
||||||
- Labels now use gtk's truncation system (By: Rayzeq).
|
- Labels now use gtk's truncation system (By: Rayzeq).
|
||||||
- Fix the gtk `expander` widget (By: ovalkonia)
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
- Add `systray` widget (By: ralismark)
|
- Add `systray` widget (By: ralismark)
|
||||||
|
|
94
Cargo.lock
generated
94
Cargo.lock
generated
|
@ -206,7 +206,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -241,7 +241,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -400,7 +400,7 @@ dependencies = [
|
||||||
"darling",
|
"darling",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -436,9 +436,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.1.13"
|
version = "1.1.14"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48"
|
checksum = "50d2eb3cd3d1bf4529e31c215ee6f93ec5a3d536d9f578f93d9d33ee19562932"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"shlex",
|
"shlex",
|
||||||
]
|
]
|
||||||
|
@ -544,9 +544,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_complete"
|
name = "clap_complete"
|
||||||
version = "4.5.22"
|
version = "4.5.23"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9340e41703683548f486fdfdce615b0520dd220d18b1d4ce5abbc87d461c221b"
|
checksum = "531d7959c5bbb6e266cecdd0f20213639c3a5c3e4d615f97db87661745f781ff"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
]
|
]
|
||||||
|
@ -560,7 +560,7 @@ dependencies = [
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -698,7 +698,7 @@ dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"strsim",
|
"strsim",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -709,7 +709,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"darling_core",
|
"darling_core",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -782,7 +782,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
"unicode-xid",
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -874,7 +874,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -987,14 +987,14 @@ checksum = "311a6d2f1f9d60bff73d2c78a0af97ed27f79672f15c238192a5bbb64db56d00"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fastrand"
|
name = "fastrand"
|
||||||
version = "2.1.0"
|
version = "2.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a"
|
checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "field-offset"
|
name = "field-offset"
|
||||||
|
@ -1108,7 +1108,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1331,7 +1331,7 @@ dependencies = [
|
||||||
"proc-macro-error",
|
"proc-macro-error",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1457,7 +1457,7 @@ dependencies = [
|
||||||
"proc-macro-error",
|
"proc-macro-error",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2070,7 +2070,7 @@ dependencies = [
|
||||||
"phf_shared 0.11.2",
|
"phf_shared 0.11.2",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2239,9 +2239,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.36"
|
version = "1.0.37"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
|
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
|
@ -2333,7 +2333,7 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2428,29 +2428,29 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.208"
|
version = "1.0.209"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2"
|
checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.208"
|
version = "1.0.209"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf"
|
checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.125"
|
version = "1.0.127"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed"
|
checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa",
|
"itoa",
|
||||||
"memchr",
|
"memchr",
|
||||||
|
@ -2466,7 +2466,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2576,7 +2576,7 @@ checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2633,7 +2633,7 @@ dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"rustversion",
|
"rustversion",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2648,9 +2648,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.75"
|
version = "2.0.76"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9"
|
checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -2659,9 +2659,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sysinfo"
|
name = "sysinfo"
|
||||||
version = "0.31.2"
|
version = "0.31.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d4115055da5f572fff541dd0c4e61b0262977f453cc9fe04be83aba25a89bdab"
|
checksum = "2b92e0bdf838cbc1c4c9ba14f9c97a7ec6cdcd1ae66b10e1e42775a25553f45d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"core-foundation-sys",
|
"core-foundation-sys",
|
||||||
"libc",
|
"libc",
|
||||||
|
@ -2753,7 +2753,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2792,7 +2792,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2894,7 +2894,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -3018,7 +3018,7 @@ dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -3040,7 +3040,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
"wasm-bindgen-backend",
|
"wasm-bindgen-backend",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
|
@ -3131,7 +3131,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -3142,7 +3142,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -3429,7 +3429,7 @@ dependencies = [
|
||||||
"proc-macro-crate 3.1.0",
|
"proc-macro-crate 3.1.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
"zvariant_utils",
|
"zvariant_utils",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -3462,7 +3462,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -3487,7 +3487,7 @@ dependencies = [
|
||||||
"proc-macro-crate 3.1.0",
|
"proc-macro-crate 3.1.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
"zvariant_utils",
|
"zvariant_utils",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -3499,5 +3499,5 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.75",
|
"syn 2.0.76",
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
config,
|
|
||||||
daemon_response::DaemonResponseSender,
|
daemon_response::DaemonResponseSender,
|
||||||
display_backend::DisplayBackend,
|
display_backend::DisplayBackend,
|
||||||
error_handling_ctx,
|
error_handling_ctx,
|
||||||
|
@ -24,6 +23,7 @@ use simplexpr::{dynval::DynVal, SimplExpr};
|
||||||
use std::{
|
use std::{
|
||||||
cell::RefCell,
|
cell::RefCell,
|
||||||
collections::{HashMap, HashSet},
|
collections::{HashMap, HashSet},
|
||||||
|
marker::PhantomData,
|
||||||
rc::Rc,
|
rc::Rc,
|
||||||
};
|
};
|
||||||
use tokio::sync::mpsc::UnboundedSender;
|
use tokio::sync::mpsc::UnboundedSender;
|
||||||
|
@ -88,10 +88,6 @@ pub enum DaemonCommand {
|
||||||
/// An opened window.
|
/// An opened window.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct EwwWindow {
|
pub struct EwwWindow {
|
||||||
/// Every window has an id, uniquely identifying it.
|
|
||||||
/// If no specific ID was specified whilst starting the window,
|
|
||||||
/// this will be the same as the window name.
|
|
||||||
pub instance_id: String,
|
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub scope_index: ScopeIndex,
|
pub scope_index: ScopeIndex,
|
||||||
pub gtk_window: Window,
|
pub gtk_window: Window,
|
||||||
|
@ -112,11 +108,13 @@ impl EwwWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct App<B> {
|
pub struct App<B: DisplayBackend> {
|
||||||
pub display_backend: B,
|
|
||||||
pub scope_graph: Rc<RefCell<ScopeGraph>>,
|
pub scope_graph: Rc<RefCell<ScopeGraph>>,
|
||||||
pub eww_config: config::EwwConfig,
|
pub eww_config: config::EwwConfig,
|
||||||
/// Map of all currently open windows by their IDs
|
/// Map of all currently open windows to their unique IDs
|
||||||
|
/// If no specific ID was specified whilst starting the window,
|
||||||
|
/// it will be the same as the window name.
|
||||||
|
/// Therefore, only one window of a given name can exist when not using IDs.
|
||||||
pub open_windows: HashMap<String, EwwWindow>,
|
pub open_windows: HashMap<String, EwwWindow>,
|
||||||
pub instance_id_to_args: HashMap<String, WindowArguments>,
|
pub instance_id_to_args: HashMap<String, WindowArguments>,
|
||||||
/// Window names that are supposed to be open, but failed.
|
/// Window names that are supposed to be open, but failed.
|
||||||
|
@ -132,9 +130,10 @@ pub struct App<B> {
|
||||||
pub window_close_timer_abort_senders: HashMap<String, futures::channel::oneshot::Sender<()>>,
|
pub window_close_timer_abort_senders: HashMap<String, futures::channel::oneshot::Sender<()>>,
|
||||||
|
|
||||||
pub paths: EwwPaths,
|
pub paths: EwwPaths,
|
||||||
|
pub phantom: PhantomData<B>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<B> std::fmt::Debug for App<B> {
|
impl<B: DisplayBackend> std::fmt::Debug for App<B> {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
f.debug_struct("App")
|
f.debug_struct("App")
|
||||||
.field("scope_graph", &*self.scope_graph.borrow())
|
.field("scope_graph", &*self.scope_graph.borrow())
|
||||||
|
@ -573,7 +572,6 @@ fn initialize_window<B: DisplayBackend>(
|
||||||
window.show_all();
|
window.show_all();
|
||||||
|
|
||||||
Ok(EwwWindow {
|
Ok(EwwWindow {
|
||||||
instance_id: window_init.id.clone(),
|
|
||||||
name: window_init.name.clone(),
|
name: window_init.name.clone(),
|
||||||
gtk_window: window,
|
gtk_window: window,
|
||||||
scope_index: window_scope,
|
scope_index: window_scope,
|
||||||
|
|
|
@ -53,32 +53,31 @@ fn main() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unused)]
|
|
||||||
let detected_wayland = detect_wayland();
|
let detected_wayland = detect_wayland();
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
let use_wayland = opts.force_wayland || detected_wayland;
|
let use_wayland = opts.force_wayland || detected_wayland;
|
||||||
#[cfg(all(feature = "wayland", feature = "x11"))]
|
#[cfg(all(feature = "wayland", feature = "x11"))]
|
||||||
let result = if use_wayland {
|
let result = if use_wayland {
|
||||||
log::info!("Running on wayland. force_wayland={}, detected_wayland={}", opts.force_wayland, detected_wayland);
|
log::info!("Running on wayland. force_wayland={}, detected_wayland={}", opts.force_wayland, detected_wayland);
|
||||||
run(opts, eww_binary_name, display_backend::WaylandBackend)
|
run::<display_backend::WaylandBackend>(opts, eww_binary_name)
|
||||||
} else {
|
} else {
|
||||||
log::info!("Running on X11. force_wayland={}, detected_wayland={}", opts.force_wayland, detected_wayland);
|
log::info!("Running on X11. force_wayland={}, detected_wayland={}", opts.force_wayland, detected_wayland);
|
||||||
run(opts, eww_binary_name, display_backend::X11Backend)
|
run::<display_backend::X11Backend>(opts, eww_binary_name)
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(all(not(feature = "wayland"), feature = "x11"))]
|
#[cfg(all(not(feature = "wayland"), feature = "x11"))]
|
||||||
let result = {
|
let result = {
|
||||||
if use_wayland {
|
if use_wayland {
|
||||||
log::warn!("Eww compiled without wayland support. falling back to X11, eventhough wayland was requested.");
|
log::warn!("Eww compiled without wayland support. Falling back to X11, eventhough wayland was requested.");
|
||||||
}
|
}
|
||||||
run(opts, eww_binary_name, display_backend::X11Backend)
|
run::<display_backend::X11Backend>(opts, eww_binary_name)
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(all(feature = "wayland", not(feature = "x11")))]
|
#[cfg(all(feature = "wayland", not(feature = "x11")))]
|
||||||
let result = run(opts, eww_binary_name, display_backend::WaylandBackend);
|
let result = run::<display_backend::WaylandBackend>(opts, eww_binary_name);
|
||||||
|
|
||||||
#[cfg(not(any(feature = "wayland", feature = "x11")))]
|
#[cfg(not(any(feature = "wayland", feature = "x11")))]
|
||||||
let result = run(opts, eww_binary_name, display_backend::NoBackend);
|
let result = run::<display_backend::NoBackend>(opts, eww_binary_name);
|
||||||
|
|
||||||
if let Err(err) = result {
|
if let Err(err) = result {
|
||||||
error_handling_ctx::print_error(err);
|
error_handling_ctx::print_error(err);
|
||||||
|
@ -92,7 +91,7 @@ fn detect_wayland() -> bool {
|
||||||
session_type.contains("wayland") || (!wayland_display.is_empty() && !session_type.contains("x11"))
|
session_type.contains("wayland") || (!wayland_display.is_empty() && !session_type.contains("x11"))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run<B: DisplayBackend>(opts: opts::Opt, eww_binary_name: String, display_backend: B) -> Result<()> {
|
fn run<B: DisplayBackend>(opts: opts::Opt, eww_binary_name: String) -> Result<()> {
|
||||||
let paths = opts
|
let paths = opts
|
||||||
.config_path
|
.config_path
|
||||||
.map(EwwPaths::from_config_dir)
|
.map(EwwPaths::from_config_dir)
|
||||||
|
@ -132,7 +131,7 @@ fn run<B: DisplayBackend>(opts: opts::Opt, eww_binary_name: String, display_back
|
||||||
if !opts.show_logs {
|
if !opts.show_logs {
|
||||||
println!("Run `{} logs` to see any errors while editing your configuration.", eww_binary_name);
|
println!("Run `{} logs` to see any errors while editing your configuration.", eww_binary_name);
|
||||||
}
|
}
|
||||||
let fork_result = server::initialize_server(paths.clone(), None, display_backend, !opts.no_daemonize)?;
|
let fork_result = server::initialize_server::<B>(paths.clone(), None, !opts.no_daemonize)?;
|
||||||
opts.no_daemonize || fork_result == ForkResult::Parent
|
opts.no_daemonize || fork_result == ForkResult::Parent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +163,7 @@ fn run<B: DisplayBackend>(opts: opts::Opt, eww_binary_name: String, display_back
|
||||||
|
|
||||||
let (command, response_recv) = action.into_daemon_command();
|
let (command, response_recv) = action.into_daemon_command();
|
||||||
// start the daemon and give it the command
|
// start the daemon and give it the command
|
||||||
let fork_result = server::initialize_server(paths.clone(), Some(command), display_backend, true)?;
|
let fork_result = server::initialize_server::<B>(paths.clone(), Some(command), true)?;
|
||||||
let is_parent = fork_result == ForkResult::Parent;
|
let is_parent = fork_result == ForkResult::Parent;
|
||||||
if let (Some(recv), true) = (response_recv, is_parent) {
|
if let (Some(recv), true) = (response_recv, is_parent) {
|
||||||
listen_for_daemon_response(recv);
|
listen_for_daemon_response(recv);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
app::{self, DaemonCommand},
|
app::{self, App, DaemonCommand},
|
||||||
config, daemon_response,
|
config, daemon_response,
|
||||||
display_backend::DisplayBackend,
|
display_backend::DisplayBackend,
|
||||||
error_handling_ctx, ipc_server, script_var_handler,
|
error_handling_ctx, ipc_server, script_var_handler,
|
||||||
|
@ -12,6 +12,7 @@ use std::{
|
||||||
cell::RefCell,
|
cell::RefCell,
|
||||||
collections::{HashMap, HashSet},
|
collections::{HashMap, HashSet},
|
||||||
io::Write,
|
io::Write,
|
||||||
|
marker::PhantomData,
|
||||||
os::unix::io::AsRawFd,
|
os::unix::io::AsRawFd,
|
||||||
path::Path,
|
path::Path,
|
||||||
rc::Rc,
|
rc::Rc,
|
||||||
|
@ -22,7 +23,6 @@ use tokio::sync::mpsc::*;
|
||||||
pub fn initialize_server<B: DisplayBackend>(
|
pub fn initialize_server<B: DisplayBackend>(
|
||||||
paths: EwwPaths,
|
paths: EwwPaths,
|
||||||
action: Option<DaemonCommand>,
|
action: Option<DaemonCommand>,
|
||||||
display_backend: B,
|
|
||||||
should_daemonize: bool,
|
should_daemonize: bool,
|
||||||
) -> Result<ForkResult> {
|
) -> Result<ForkResult> {
|
||||||
let (ui_send, mut ui_recv) = tokio::sync::mpsc::unbounded_channel();
|
let (ui_send, mut ui_recv) = tokio::sync::mpsc::unbounded_channel();
|
||||||
|
@ -78,8 +78,7 @@ pub fn initialize_server<B: DisplayBackend>(
|
||||||
|
|
||||||
let (scope_graph_evt_send, mut scope_graph_evt_recv) = tokio::sync::mpsc::unbounded_channel();
|
let (scope_graph_evt_send, mut scope_graph_evt_recv) = tokio::sync::mpsc::unbounded_channel();
|
||||||
|
|
||||||
let mut app = app::App {
|
let mut app: App<B> = app::App {
|
||||||
display_backend,
|
|
||||||
scope_graph: Rc::new(RefCell::new(ScopeGraph::from_global_vars(
|
scope_graph: Rc::new(RefCell::new(ScopeGraph::from_global_vars(
|
||||||
eww_config.generate_initial_state()?,
|
eww_config.generate_initial_state()?,
|
||||||
scope_graph_evt_send,
|
scope_graph_evt_send,
|
||||||
|
@ -93,6 +92,7 @@ pub fn initialize_server<B: DisplayBackend>(
|
||||||
app_evt_send: ui_send.clone(),
|
app_evt_send: ui_send.clone(),
|
||||||
window_close_timer_abort_senders: HashMap::new(),
|
window_close_timer_abort_senders: HashMap::new(),
|
||||||
paths,
|
paths,
|
||||||
|
phantom: PhantomData,
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(screen) = gtk::gdk::Screen::default() {
|
if let Some(screen) = gtk::gdk::Screen::default() {
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
use crate::widgets::window::Window;
|
use crate::widgets::window::Window;
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use gtk::{cairo::Surface, gdk, gdk::ffi::gdk_cairo_surface_create_from_pixbuf, gdk::NotifyType, glib, prelude::*};
|
use gtk::{
|
||||||
|
cairo::Surface,
|
||||||
|
gdk::{self, ffi::gdk_cairo_surface_create_from_pixbuf, NotifyType},
|
||||||
|
glib,
|
||||||
|
prelude::*,
|
||||||
|
};
|
||||||
use std::{cell::RefCell, future::Future, rc::Rc};
|
use std::{cell::RefCell, future::Future, rc::Rc};
|
||||||
|
|
||||||
// DBus state shared between systray instances, to avoid creating too many connections etc.
|
// DBus state shared between systray instances, to avoid creating too many connections etc.
|
||||||
|
|
|
@ -1147,7 +1147,7 @@ const WIDGET_NAME_STACK: &str = "stack";
|
||||||
fn build_gtk_stack(bargs: &mut BuilderArgs) -> Result<gtk::Stack> {
|
fn build_gtk_stack(bargs: &mut BuilderArgs) -> Result<gtk::Stack> {
|
||||||
let gtk_widget = gtk::Stack::new();
|
let gtk_widget = gtk::Stack::new();
|
||||||
|
|
||||||
if bargs.widget_use.children.len() < 1 {
|
if bargs.widget_use.children.is_empty() {
|
||||||
return Err(DiagError(gen_diagnostic!("stack must contain at least one element", bargs.widget_use.span)).into());
|
return Err(DiagError(gen_diagnostic!("stack must contain at least one element", bargs.widget_use.span)).into());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ use crate::window_arguments::WindowArguments;
|
||||||
pub struct WindowInitiator {
|
pub struct WindowInitiator {
|
||||||
pub backend_options: BackendWindowOptions,
|
pub backend_options: BackendWindowOptions,
|
||||||
pub geometry: Option<WindowGeometry>,
|
pub geometry: Option<WindowGeometry>,
|
||||||
pub id: String,
|
|
||||||
pub local_variables: HashMap<VarName, DynVal>,
|
pub local_variables: HashMap<VarName, DynVal>,
|
||||||
pub monitor: Option<MonitorIdentifier>,
|
pub monitor: Option<MonitorIdentifier>,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
@ -37,7 +36,6 @@ impl WindowInitiator {
|
||||||
Ok(WindowInitiator {
|
Ok(WindowInitiator {
|
||||||
backend_options: window_def.backend_options.eval(&vars)?,
|
backend_options: window_def.backend_options.eval(&vars)?,
|
||||||
geometry,
|
geometry,
|
||||||
id: args.instance_id.clone(),
|
|
||||||
monitor,
|
monitor,
|
||||||
name: window_def.name.clone(),
|
name: window_def.name.clone(),
|
||||||
resizable: window_def.eval_resizable(&vars)?,
|
resizable: window_def.eval_resizable(&vars)?,
|
||||||
|
|
Loading…
Add table
Reference in a new issue