chore: Update dependencies
This commit is contained in:
parent
1d031d99c1
commit
563128904b
7 changed files with 415 additions and 354 deletions
|
|
@ -7,28 +7,28 @@ edition = "2018"
|
|||
publish = false
|
||||
|
||||
[dependencies]
|
||||
async-pidfd = "0.1"
|
||||
fork = "0.1"
|
||||
freedesktop-desktop-entry = "0.4.1"
|
||||
futures-lite = "1"
|
||||
gtk = "0.14"
|
||||
human_format = "1.0"
|
||||
human-sort = "0.2"
|
||||
new_mime_guess = "3"
|
||||
async-pidfd = "0.1.4"
|
||||
fork = "0.1.18"
|
||||
freedesktop-desktop-entry = "0.5.0"
|
||||
futures-lite = "1.12.0"
|
||||
gtk = "0.15.4"
|
||||
human_format = "1.0.3"
|
||||
human-sort = "0.2.2"
|
||||
new_mime_guess = "4.0.1"
|
||||
pop-launcher = { path = "../" }
|
||||
postage = { version = "0.4", features = ["futures-traits"] }
|
||||
regex = "1"
|
||||
ron = "0.7"
|
||||
serde = "1"
|
||||
serde_json = "1.0"
|
||||
slab = "0.4"
|
||||
smol = "1"
|
||||
strsim = "0.10"
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = "0.3"
|
||||
urlencoding = "2"
|
||||
zbus = "1"
|
||||
zvariant = "2.9"
|
||||
postage = { version = "0.4.1", features = ["futures-traits"] }
|
||||
regex = "1.5.4"
|
||||
ron = "0.7.0"
|
||||
serde = "1.0.136"
|
||||
serde_json = "1.0.79"
|
||||
slab = "0.4.5"
|
||||
smol = "1.2.5"
|
||||
strsim = "0.10.0"
|
||||
tracing = "0.1.31"
|
||||
tracing-subscriber = "0.3.9"
|
||||
urlencoding = "2.1.0"
|
||||
zbus = "2.1.1"
|
||||
zvariant = "3.1.2"
|
||||
ward = "2.1.0"
|
||||
isahc = "1.5.0"
|
||||
isahc = "1.6.0"
|
||||
url = "2.2.2"
|
||||
|
|
|
|||
|
|
@ -94,7 +94,8 @@ impl<W: AsyncWrite + Unpin> App<W> {
|
|||
.as_ref()
|
||||
.map(|x| x.split(':').collect::<Vec<&str>>());
|
||||
|
||||
for (src, path) in DesktopIter::new(default_paths()) {
|
||||
for path in DesktopIter::new(default_paths()) {
|
||||
let src = PathSource::guess_from(&path);
|
||||
if let Ok(bytes) = std::fs::read_to_string(&path) {
|
||||
if let Ok(entry) = DesktopEntry::decode(&path, &bytes) {
|
||||
// Do not show if our desktop is defined in `NotShowIn`.
|
||||
|
|
@ -304,6 +305,7 @@ fn path_string(source: &PathSource) -> Cow<'static, str> {
|
|||
PathSource::LocalNix => "Nix".into(),
|
||||
PathSource::Nix => "Nix (System)".into(),
|
||||
PathSource::System => "System".into(),
|
||||
PathSource::SystemLocal => "Local (System)".into(),
|
||||
PathSource::SystemFlatpak => "Flatpak (System)".into(),
|
||||
PathSource::SystemSnap => "Snap (System)".into(),
|
||||
PathSource::Other(other) => Cow::Owned(other.clone()),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use freedesktop_desktop_entry as fde;
|
|||
use futures_lite::{AsyncWrite, AsyncWriteExt, StreamExt};
|
||||
use pop_launcher::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{convert::TryFrom, fs, path::PathBuf};
|
||||
use std::{convert::TryFrom, fs, path::PathBuf, sync::Arc};
|
||||
use zbus::Connection;
|
||||
use zvariant::{Signature, Type};
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ impl Type for Item {
|
|||
}
|
||||
|
||||
pub async fn main() {
|
||||
let connection = match Connection::new_session() {
|
||||
let connection = match Connection::session().await {
|
||||
Ok(conn) => conn,
|
||||
Err(_) => {
|
||||
let mut out = async_stdout();
|
||||
|
|
@ -67,24 +67,27 @@ struct App<W> {
|
|||
impl<W: AsyncWrite + Unpin> App<W> {
|
||||
fn new(connection: Connection, tx: W) -> Self {
|
||||
Self {
|
||||
desktop_entries: fde::Iter::new(fde::default_paths()).collect(),
|
||||
desktop_entries: fde::Iter::new(fde::default_paths())
|
||||
.map(|path| (fde::PathSource::guess_from(&path), path))
|
||||
.collect(),
|
||||
entries: Vec::new(),
|
||||
connection,
|
||||
tx,
|
||||
}
|
||||
}
|
||||
|
||||
fn call_method<A: Serialize + Type>(
|
||||
async fn call_method<A: Serialize + Type>(
|
||||
&mut self,
|
||||
method: &str,
|
||||
args: &A,
|
||||
) -> zbus::Result<zbus::Message> {
|
||||
) -> zbus::Result<Arc<zbus::Message>> {
|
||||
self.connection
|
||||
.call_method(Some(DEST), PATH, Some(DEST), method, args)
|
||||
.await
|
||||
}
|
||||
|
||||
async fn reload(&mut self) {
|
||||
if let Ok(message) = self.call_method("WindowList", &()) {
|
||||
if let Ok(message) = self.call_method("WindowList", &()).await {
|
||||
self.entries = message
|
||||
.body::<Vec<Item>>()
|
||||
.expect("pop-shell returned invalid WindowList response");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue