Skip to content

Commit

Permalink
expand distribution compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
MK2112 committed Sep 24, 2024
1 parent d184742 commit f3649ac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ Tested on Debian-based distributions.
- [x] `--remove` to set the AppImage directory
- [x] `--move` to enable auto moving of AppImages and link updates
- [x] Setup CI/CD
- [ ] Expand distribution compatibility
- [x] Expand distribution compatibility
- [ ] `--update` to update all managed AppImages (requiring some sort of versioning and web referencing)
- [ ] (Optional) Publish to PyPI
10 changes: 9 additions & 1 deletion appimanage/main.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
#!/usr/bin/env python3

import os
import distro
import shutil
import argparse
import subprocess
import configparser
from pathlib import Path
from xdg_base_dirs import xdg_config_home, xdg_data_home


debian_based = ["ubuntu", "debian", "linuxmint", "pop", "zorin", "elementary", "kali"]

CONFIG_INI = Path(xdg_config_home()) / "appimanage" / "config.ini"
MENU_DIR = Path(xdg_data_home()) / "applications"

if distro.id() in debian_based:
MENU_DIR = Path(xdg_data_home()) / "applications"
else:
MENU_DIR = Path("/usr/share/applications")

# pip uninstall appimanage -y
# pip cache purge
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
packages=find_packages(),
install_requires=[
"xdg-base-dirs",
"distro",
],
entry_points={
"console_scripts": ["appimanage=appimanage.main:main"],
Expand Down

0 comments on commit f3649ac

Please sign in to comment.