chore: update cosmic-settings-subscriptions
This commit is contained in:
parent
546811981e
commit
6b47c3b5b9
2 changed files with 45 additions and 53 deletions
77
Cargo.lock
generated
77
Cargo.lock
generated
|
|
@ -676,7 +676,7 @@ dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"macaddr",
|
"macaddr",
|
||||||
"nix 0.29.0",
|
"nix 0.29.0",
|
||||||
"num-derive 0.4.2",
|
"num-derive",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"pin-project",
|
"pin-project",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
@ -1083,7 +1083,7 @@ dependencies = [
|
||||||
"i18n-embed",
|
"i18n-embed",
|
||||||
"i18n-embed-fl",
|
"i18n-embed-fl",
|
||||||
"image",
|
"image",
|
||||||
"itertools 0.14.0",
|
"itertools",
|
||||||
"libcosmic",
|
"libcosmic",
|
||||||
"memmap2 0.9.5",
|
"memmap2 0.9.5",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
|
|
@ -1241,7 +1241,7 @@ dependencies = [
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"i18n-embed",
|
"i18n-embed",
|
||||||
"i18n-embed-fl",
|
"i18n-embed-fl",
|
||||||
"itertools 0.14.0",
|
"itertools",
|
||||||
"libcosmic",
|
"libcosmic",
|
||||||
"rust-embed",
|
"rust-embed",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
|
@ -1557,18 +1557,18 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-settings-subscriptions"
|
name = "cosmic-settings-subscriptions"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/pop-os/cosmic-settings-subscriptions#f666c7cfcad79547e55a368640784bca51081bd2"
|
source = "git+https://github.com/pop-os/cosmic-settings-subscriptions#613e56f858db9e10d913b6d57e761e58d146ebc7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bluez-zbus",
|
"bluez-zbus",
|
||||||
"cosmic-dbus-networkmanager",
|
"cosmic-dbus-networkmanager",
|
||||||
"futures",
|
"futures",
|
||||||
"iced_futures",
|
"iced_futures",
|
||||||
"itertools 0.13.0",
|
"itertools",
|
||||||
"libpulse-binding",
|
"libpulse-binding",
|
||||||
"log",
|
"log",
|
||||||
"rustix 0.38.44",
|
"rustix 1.0.3",
|
||||||
"secure-string",
|
"secure-string",
|
||||||
"thiserror 1.0.69",
|
"thiserror 2.0.11",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-stream",
|
"tokio-stream",
|
||||||
"tracing",
|
"tracing",
|
||||||
|
|
@ -2129,7 +2129,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
|
checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -3695,15 +3695,6 @@ dependencies = [
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "itertools"
|
|
||||||
version = "0.13.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
|
|
||||||
dependencies = [
|
|
||||||
"either",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "itertools"
|
name = "itertools"
|
||||||
version = "0.14.0"
|
version = "0.14.0"
|
||||||
|
|
@ -3914,7 +3905,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
|
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"windows-targets 0.48.5",
|
"windows-targets 0.52.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -3925,26 +3916,26 @@ checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libpulse-binding"
|
name = "libpulse-binding"
|
||||||
version = "2.28.2"
|
version = "2.29.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b6b1040a6c4c4d1e9e852000f6202df1a02a4f074320de336ab21e4fd317b538"
|
checksum = "441092fb2d05962d74246a00c1b2f8c87c60fb6b38a5cc42227c229a702c0ce5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.3.2",
|
"bitflags 2.8.0",
|
||||||
"libc",
|
"libc",
|
||||||
"libpulse-sys",
|
"libpulse-sys",
|
||||||
"num-derive 0.3.3",
|
"num-derive",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libpulse-sys"
|
name = "libpulse-sys"
|
||||||
version = "1.21.0"
|
version = "1.22.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bc19e110fbf42c17260d30f6d3dc545f58491c7830d38ecb9aaca96e26067a9b"
|
checksum = "b8febf45075a6ac7e36d0c7aa62536217f476f24456854cdad296952852b5cd2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"num-derive 0.3.3",
|
"num-derive",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
"winapi",
|
"winapi",
|
||||||
|
|
@ -3989,6 +3980,12 @@ version = "0.6.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2a385b1be4e5c3e362ad2ffa73c392e53f031eaa5b7d648e64cd87f27f6063d7"
|
checksum = "2a385b1be4e5c3e362ad2ffa73c392e53f031eaa5b7d648e64cd87f27f6063d7"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "linux-raw-sys"
|
||||||
|
version = "0.9.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "litemap"
|
name = "litemap"
|
||||||
version = "0.7.4"
|
version = "0.7.4"
|
||||||
|
|
@ -4375,17 +4372,6 @@ 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-derive"
|
|
||||||
version = "0.3.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn 1.0.109",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-derive"
|
name = "num-derive"
|
||||||
version = "0.4.2"
|
version = "0.4.2"
|
||||||
|
|
@ -4452,7 +4438,7 @@ version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
|
checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro-crate 3.2.0",
|
"proc-macro-crate 1.3.1",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.98",
|
"syn 2.0.98",
|
||||||
|
|
@ -5498,7 +5484,20 @@ dependencies = [
|
||||||
"errno",
|
"errno",
|
||||||
"libc",
|
"libc",
|
||||||
"linux-raw-sys 0.4.15",
|
"linux-raw-sys 0.4.15",
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.59.0",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustix"
|
||||||
|
version = "1.0.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.8.0",
|
||||||
|
"errno",
|
||||||
|
"libc",
|
||||||
|
"linux-raw-sys 0.9.3",
|
||||||
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -6023,7 +6022,7 @@ dependencies = [
|
||||||
"getrandom 0.3.1",
|
"getrandom 0.3.1",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"rustix 0.38.44",
|
"rustix 0.38.44",
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ pub struct Audio {
|
||||||
config: AudioAppletConfig,
|
config: AudioAppletConfig,
|
||||||
player_status: Option<mpris_subscription::PlayerStatus>,
|
player_status: Option<mpris_subscription::PlayerStatus>,
|
||||||
token_tx: Option<calloop::channel::Sender<TokenRequest>>,
|
token_tx: Option<calloop::channel::Sender<TokenRequest>>,
|
||||||
|
channels: Option<sub_pulse::PulseChannels>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Audio {
|
impl Audio {
|
||||||
|
|
@ -399,20 +400,8 @@ impl cosmic::Application for Audio {
|
||||||
Message::ApplyOutputVolume => {
|
Message::ApplyOutputVolume => {
|
||||||
self.output_volume_debounce = false;
|
self.output_volume_debounce = false;
|
||||||
|
|
||||||
self.current_output.as_mut().map(|o| {
|
if let Some(channel) = self.channels.as_mut() {
|
||||||
o.volume
|
channel.set_volume(self.output_volume as f32 / 100.);
|
||||||
.set(o.volume.len(), percent_to_volume(self.output_volume))
|
|
||||||
});
|
|
||||||
|
|
||||||
if let PulseState::Connected(connection) = &mut self.pulse_state {
|
|
||||||
if let Some(device) = &self.current_output {
|
|
||||||
if let Some(name) = &device.name {
|
|
||||||
connection.send(pulse::Message::SetSinkVolumeByName(
|
|
||||||
name.clone(),
|
|
||||||
device.volume,
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Message::ApplyInputVolume => {
|
Message::ApplyInputVolume => {
|
||||||
|
|
@ -667,9 +656,13 @@ impl cosmic::Application for Audio {
|
||||||
input.mute = value;
|
input.mute = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
sub_pulse::Event::Channels(c) => {
|
||||||
|
self.channels = Some(c);
|
||||||
|
}
|
||||||
sub_pulse::Event::DefaultSink(_) => {}
|
sub_pulse::Event::DefaultSink(_) => {}
|
||||||
sub_pulse::Event::DefaultSource(_) => {}
|
sub_pulse::Event::DefaultSource(_) => {}
|
||||||
sub_pulse::Event::CardInfo(_) => {}
|
sub_pulse::Event::CardInfo(_) => {}
|
||||||
|
sub_pulse::Event::Balance(_) => {}
|
||||||
},
|
},
|
||||||
Message::Surface(a) => {
|
Message::Surface(a) => {
|
||||||
return cosmic::task::message(cosmic::Action::Cosmic(
|
return cosmic::task::message(cosmic::Action::Cosmic(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue