# PacManager 📦 Package manager for **Arch Linux** based on **pacman**, with a Qt6 graphical interface. ## Features - 🔍 **Package search** - 📦 **Package installation** - 🗑️ **Package removal** - 🔄 **Individual or global updates** - 📋 **History of all actions** ## Architecture ``` package-manager/ ├── CMakeLists.txt # Build root ├── include/ │ ├── package-manager.h # Package manager interface │ ├── pacman-manager.h # pacman manager (Arch Linux) │ ├── main-window.h # Main GUI │ ├── history-manager.h # Action history │ └── package-model.h # Qt model for the list ├── src/ │ ├── main.cpp │ ├── main-window.cpp │ ├── pacman-manager.cpp │ ├── history-manager.cpp │ └── package-model.cpp ``` ## Compilation (Arch Linux) ### Dependencies ```bash sudo pacman -S qt6-base cmake gcc base-devel ``` ### Build ```bash cd package-manager # Create the build directory mkdir -p build && cd build # Configure cmake .. -DCMAKE_INSTALL_PREFIX=/usr # Compile make -j$(nproc) # Install (optional) sudo make install ``` ### Run ```bash # From the build directory ./PacManager # Or from /usr/bin after install PacManager ``` ## Graphical interface The interface uses **Qt6** with a dark theme, a **navigation sidebar** and stacked pages: - Sidebar: Search, Installed, Updates, History, Logs - Search bar with package list on the left and details on the right - Contextual action buttons (install, remove, update) - Dedicated page for available updates - Action history shown as a table - Built-in pacman logs - Progress bar and status bar ### Interface overview ```text ┌──────────────────────────────────────────────────────────────────────────────────────┐ │ File Tools Help │ ├───────────────┬──────────────────────────────────────────────────────────────────────┤ │ 📦 PacManager │ Search packages │ │ │ ┌──────────────────────────────────────────────────┐ ┌────────────┐ │ │ 🔍 Search │ │ [?] Search for a package... │ │ Search │ │ │ 📦 Installed │ └──────────────────────────────────────────────────┘ └────────────┘ │ │ ⬆️ Updates │ [+ Install] [- Remove] [^ Update] [^^ Update all] │ │ 📋 History │ ┌───────────────────────────────┐ ┌─────────────────────────────┐ │ │ 📜 Logs │ │ firefox 128.0 │ │ firefox │ │ │ │ │ [✅ Installed] │ │ Version: 128.0 │ │ │ │ ├───────────────────────────────┤ │ Repo: extra Size: 289MB │ │ │ │ │ chromium 127.0.6533 │ ├─────────────────────────────┤ │ │ │ ├───────────────────────────────┤ │ Fast and secure web browser │ │ │ │ │ vlc 3.0.21 │ │ based on the Gecko engine │ │ │ │ │ [⬆️ Update avail.] │ │ from Mozilla. │ │ │ │ └───────────────────────────────┘ └─────────────────────────────┘ │ │ 🔄 Refresh │ │ ├───────────────┴──────────────────────────────────────────────────────────────────────┤ │ Manager: pacman | Packages found: 6 | History entries: 12 │ └──────────────────────────────────────────────────────────────────────────────────────┘ ``` The **Installed** and **Updates** pages reuse the same list: the Updates page lists outdated packages detected by `pacman -Qu` and enables the "Update all" button. ## Package manager The `IPackageManager` interface (implemented by `PacmanManager`) defines: | Method | Description | |--------|-------------| | `getName()` | Manager name | | `getVersion()` | Manager version | | `getDescription()` | Description | | `canSearch()` | Supports search | | `canInstall()` | Supports installation | | `canRemove()` | Supports removal | | `canUpdate()` | Supports updates | | `canListInstalled()` | Supports listing installed packages | | `isAvailable()` | Checks whether pacman is installed | | `search(query)` | Search for packages | | `install(name, callback)` | Installation | | `remove(name, callback)` | Removal | | `update(name, callback)` | Update | | `listInstalled()` | List installed packages | | `listUpdates()` | List outdated packages | | `refresh(callback)` | Refresh the databases | ## License Coming soon