Skip to content

Commit

Permalink
add flatpaks path
Browse files Browse the repository at this point in the history
  • Loading branch information
lighttigerXIV committed Nov 18, 2024
1 parent 2a1aaab commit ba9af44
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tux-icons"
version = "0.3.0"
version = "0.3.1"
edition = "2021"
license = "MIT"
description = "A library for getting desktop icons in linux"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cargo add tux-icons
Or add it manually in cargo.toml:
```toml
[dependencies]
tux-icons = "0.3.0"
tux-icons = "0.3.1"
```

# Usage
Expand Down
11 changes: 11 additions & 0 deletions src/paths/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ pub fn get_backup_dirs() -> Vec<PathBuf> {
let usr_hicolor = PathBuf::from("/usr/share/icons/hicolor");
let usr_pixmap = PathBuf::from("/usr/share/pixmaps");

let flatpak_apps = PathBuf::from("/var/lib/flatpak/app/");
let home_flatpak_apps = home_dir.join(".local/share/flatpak");

let mut dirs = Vec::<PathBuf>::new();

if local_hicolor.exists() {
Expand All @@ -32,6 +35,14 @@ pub fn get_backup_dirs() -> Vec<PathBuf> {
dirs.push(usr_pixmap);
}

if flatpak_apps.exists(){
dirs.push(flatpak_apps);
}

if home_flatpak_apps.exists(){
dirs.push(home_flatpak_apps);
}

dirs
}

Expand Down

0 comments on commit ba9af44

Please sign in to comment.