Skip to content

Commit 6a5f8b4

Browse files
committed
feat: add native desktop GUI and installation support with desktop entry
1 parent e671b20 commit 6a5f8b4

6 files changed

Lines changed: 73 additions & 2 deletions

File tree

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,15 @@ After installation, the CLI is available as `archpkg`.
155155
ArchPkg Helper provides a professional native desktop application for graphical package management:
156156

157157
```sh
158-
# Launch the GUI (works immediately after install.sh)
158+
# Launch from command line
159159
archpkg gui
160+
161+
# Or find it in your application menu
162+
# Look for "archpkg helper" in System/Package Manager category
160163
```
161164

165+
The GUI appears in your desktop environment's application menu (GNOME Activities, KDE Application Menu, XFCE Application Finder, etc.) after installation.
166+
162167
**GUI Features:**
163168
- **Search & Install Tab**: Search packages across all sources with real-time trust scores
164169
- Visual trust indicators (color-coded)

archpkg-helper.desktop

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[Desktop Entry]
2+
Version=1.0
3+
Type=Application
4+
Name=archpkg helper
5+
GenericName=Package Manager
6+
Comment=Cross-distribution package manager with GUI
7+
Exec=archpkg gui
8+
Icon=system-software-install
9+
Terminal=false
10+
Categories=System;PackageManager;Settings;
11+
Keywords=package;install;update;software;pacman;apt;dnf;aur;flatpak;snap;
12+
StartupNotify=true
13+
StartupWMClass=archpkg-helper

install.sh

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,47 @@ EOF
240240
echo "[✔] Profile configured: $ARCHPKG_USER_MODE"
241241
fi
242242

243+
##############################################
244+
# 9. Install desktop entry for GUI
245+
##############################################
246+
echo "[*] Installing desktop application entry…"
247+
248+
DESKTOP_DIR="$HOME/.local/share/applications"
249+
mkdir -p "$DESKTOP_DIR"
250+
251+
# Try to copy from repo if available, otherwise create directly
252+
if [ -f "archpkg-helper.desktop" ]; then
253+
cp archpkg-helper.desktop "$DESKTOP_DIR/archpkg-helper.desktop"
254+
echo "[✔] Desktop entry installed from local file"
255+
else
256+
# Create desktop entry directly
257+
cat > "$DESKTOP_DIR/archpkg-helper.desktop" <<'DESKTOP_EOF'
258+
[Desktop Entry]
259+
Version=1.0
260+
Type=Application
261+
Name=archpkg helper
262+
GenericName=Package Manager
263+
Comment=Cross-distribution package manager with GUI
264+
Exec=archpkg gui
265+
Icon=system-software-install
266+
Terminal=false
267+
Categories=System;PackageManager;Settings;
268+
Keywords=package;install;update;software;pacman;apt;dnf;aur;flatpak;snap;
269+
StartupNotify=true
270+
StartupWMClass=archpkg-helper
271+
DESKTOP_EOF
272+
echo "[✔] Desktop entry created"
273+
fi
274+
275+
chmod +x "$DESKTOP_DIR/archpkg-helper.desktop"
276+
277+
# Update desktop database if available
278+
if command -v update-desktop-database >/dev/null 2>&1; then
279+
update-desktop-database "$DESKTOP_DIR" >/dev/null 2>&1 || true
280+
fi
281+
282+
echo "[✔] GUI will appear in application menu"
283+
243284
##############################################
244285
# DONE
245286
##############################################
@@ -250,4 +291,5 @@ echo " archpkg --help # Show all CLI commands"
250291
echo " archpkg gui # Launch native desktop GUI"
251292
echo " archpkg search <pkg> # Search for packages"
252293
echo ""
253-
echo "Both CLI and GUI are now available!"
294+
echo "The GUI is also available in your application menu!"
295+
echo "Look for 'archpkg helper' in System/Package Manager category."

GUI_GUIDE.md renamed to notes/GUI_GUIDE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,18 @@ pipx install archpkg[all] # includes all optional features
3939

4040
## Launching the GUI
4141

42+
**From command line:**
4243
```bash
4344
archpkg gui
4445
```
4546

47+
**From application menu:**
48+
Look for "archpkg helper" in your desktop environment's application menu:
49+
- **GNOME**: Search for "archpkg" in Activities
50+
- **KDE Plasma**: Find in Application Menu → System → Package Manager
51+
- **XFCE**: Application Finder → System → Package Manager
52+
- **Other DEs**: Check System or Package Manager category
53+
4654
## Interface Overview
4755

4856
The GUI consists of 4 main tabs:
File renamed without changes.

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ packages = ["archpkg"]
3232

3333
[tool.setuptools.package-data]
3434
archpkg = ["*.yaml", "*.yml", "*.json", "templates/*.html", "templates/**/*"]
35+
36+
[tool.setuptools.data-files]
37+
"share/applications" = ["archpkg-helper.desktop"]

0 commit comments

Comments
 (0)