Skip to content

Commit 85e9f26

Browse files
committed
feat: package store shows GUI apps only
Search now uses awk to parse the local Packages database and filters by GUI sections (graphics, editors, x11, gnome, kde, games, video, sound, net, web, mail, office, utils). Excludes lib/dev/dbg/doc packages. Featured list updated with more popular desktop apps.
1 parent ee23536 commit 85e9f26

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

packages/whaleos/NativeAppsLauncher.qml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ Rectangle {
8888
}
8989

9090
function loadFeatured() {
91-
helperExec("apt-cache search --names-only 'firefox\\|gimp\\|vlc\\|inkscape\\|blender\\|audacity\\|krita\\|thunderbird\\|filezilla\\|mpv\\|geany\\|meld\\|gparted\\|keepassxc\\|shotwell\\|rhythmbox\\|supertuxkart\\|hexchat\\|htop\\|neofetch' 2>/dev/null | head -25", function(output) {
91+
// Curated list of popular GUI desktop applications
92+
var cmd = "apt-cache search --names-only " +
93+
"'gimp\\|vlc\\|inkscape\\|blender\\|audacity\\|krita\\|thunderbird\\|filezilla\\|mpv\\|geany\\|meld\\|gparted\\|keepassxc\\|shotwell\\|rhythmbox\\|hexchat\\|drawing\\|cheese\\|gnome-maps\\|transmission-gtk\\|celluloid\\|handbrake\\|obs-studio\\|kdenlive\\|darktable' " +
94+
"2>/dev/null | grep -vE '^(lib|python[23]?-|gir[0-9])' | grep -vE '(-dev |-dbg |-doc |-data )' | head -25";
95+
helperExec(cmd, function(output) {
9296
if (!output || output.trim().length === 0) return;
9397
var lines = output.trim().split("\n");
9498
var results = [];
@@ -103,7 +107,20 @@ Rectangle {
103107
function searchStore(query) {
104108
if (!query || query.trim().length < 2) { storeResults = []; return; }
105109
storeLoading = true;
106-
helperExec("apt-cache search '" + query.trim() + "' 2>/dev/null | head -50", function(output) {
110+
// Search by section — only show GUI apps (graphics, editors, x11, gnome, kde, games, video, sound, net, web, mail, office, utils)
111+
var safeQuery = query.trim().replace(/'/g, "");
112+
var cmd = "awk -v query='" + safeQuery + "' '" +
113+
"BEGIN { IGNORECASE=1 } " +
114+
"/^Package:/ { p=$2; s=\"\"; d=\"\" } " +
115+
"/^Section:/ { s=$2 } " +
116+
"/^Description:/ { " +
117+
" d=substr($0, 14); " +
118+
" if (p && (p ~ query || d ~ query) && s ~ /(graphics|editors|x11|gnome|kde|xfce|video|sound|games|net|web|mail|office|utils|misc)/ && p !~ /^(lib|python[23]?-|gir[0-9]|r-cran|golang-)/ && p !~ /-(dev|dbg|doc|data)$/) { " +
119+
" print p \" - \" d " +
120+
" } " +
121+
"} " +
122+
"' /var/lib/apt/lists/*_Packages 2>/dev/null | head -40";
123+
helperExec(cmd, function(output) {
107124
storeLoading = false;
108125
if (!output || output.trim().length === 0) { storeResults = []; return; }
109126
var lines = output.trim().split("\n");

0 commit comments

Comments
 (0)