~tsdh/public-inbox

swayr: Bugfix: find desktop entries in user local folder v1 PROPOSED

~yifeiteng: 1
 Bugfix: find desktop entries in user local folder

 1 files changed, 7 insertions(+), 1 deletions(-)
#818917 arch.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~tsdh/public-inbox/patches/34526/mbox | git am -3
Learn more about email & git

[PATCH swayr] Bugfix: find desktop entries in user local folder Export this patch

From: Yifei Teng <tengyifei88@gmail.com>

Previously the program looked for desktop entries in

  /home/some_user/.local/share/

but that's not correct. It should be

  /home/some_user/.local/share/applications/
Also adds a debug log so it's easier for users to find out which
desktop entries are being considered.
---
 swayr/src/util.rs | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/swayr/src/util.rs b/swayr/src/util.rs
index 7309609..c080a70 100644
--- a/swayr/src/util.rs
+++ b/swayr/src/util.rs
@@ -56,7 +56,9 @@ fn desktop_entry_folders() -> Vec<Box<p::Path>> {

    // XDG_DATA_HOME/applications
    if let Some(dd) = directories::BaseDirs::new() {
        dirs.push(dd.data_local_dir().to_path_buf().into_boxed_path());
        let mut pb = dd.data_local_dir().to_path_buf();
        pb.push("applications/");
        dirs.push(pb.into_boxed_path());
    }

    let default_dirs =
@@ -75,6 +77,10 @@ fn desktop_entry_folders() -> Vec<Box<p::Path>> {
    dirs.sort();
    dirs.dedup();

    for path in &dirs {
        log::debug!("found desktop entry folder: {}", path.display());
    }

    dirs
}

-- 
2.34.2
swayr/patches/arch.yml: SUCCESS in 3m25s

[Bugfix: find desktop entries in user local folder][0] from [~yifeiteng][1]

[0]: https://lists.sr.ht/~tsdh/public-inbox/patches/34526
[1]: mailto:tengyifei88@gmail.com

✓ #818917 SUCCESS swayr/patches/arch.yml https://builds.sr.ht/~tsdh/job/818917
~yifeiteng <yifeiteng@git.sr.ht> writes: