From 241da7fbee283e082e4164a540963c62832661a5 Mon Sep 17 00:00:00 2001 From: Frede H Date: Fri, 24 Jan 2025 14:11:11 +0000 Subject: [PATCH] Consolidating application json data --- data/advanced.json | 646 ------------------------------- data/default.json | 862 ------------------------------------------ data/preferences.json | 22 +- launch.sh | 18 +- src/__init__.py | 2 +- src/manjaro_hello.py | 132 ++++--- 6 files changed, 97 insertions(+), 1585 deletions(-) delete mode 100644 data/advanced.json delete mode 100644 data/default.json diff --git a/data/advanced.json b/data/advanced.json deleted file mode 100644 index 3e2705e..0000000 --- a/data/advanced.json +++ /dev/null @@ -1,646 +0,0 @@ -[ - { - "name": "Browsers", - "icon": "browser", - "description": "Web browsing and communication", - "apps": [ - { - "name": "Chromium", - "icon": "chromium", - "description": "Open Sourced Chrome Browser", - "pkg": "chromium", - "extra": [] - }, - { - "name": "Falkon", - "icon": "falkon", - "description": "Qt based Web Browser", - "pkg": "falkon", - "extra": [] - }, - { - "name": "Firefox", - "icon": "mozilla-firefox", - "description": "Mozilla Web Browser", - "pkg": "firefox", - "extra": [] - }, - { - "name": "Midori", - "icon": "midori", - "description": "Lightweight Webbrowser", - "pkg": "midori", - "extra": [] - }, - { - "name": "Netsurf", - "icon": "netsurf", - "description": "Light and Fast Web Browser", - "pkg": "netsurf", - "extra": [] - }, - { - "name": "Opera", - "icon": "opera", - "description": "Fast and secure webbrowser", - "pkg": "opera", - "extra": [] - } - ] - }, - { - "name": "E-mail", - "icon": "mail-client", - "description": "E-mail, Calendar, Tasks", - "apps": [ - { - "name": "Claws Mail", - "icon": "claws-mail", - "description": "Lightweight and fast GTK+ based Mail Client", - "pkg": "claws-mail", - "extra": [] - }, - { - "name": "Evolution", - "icon": "evolution", - "description": "Manage your email, contacts and schedule", - "pkg": "evolution", - "extra": [] - }, - { - "name": "Geary", - "icon": "geary", - "description": "Send and receive mail", - "pkg": "geary", - "extra": [] - }, - { - "name": "Sylpheed", - "icon": "sylpheed", - "description": "E-mail client", - "pkg": "sylpheed", - "extra": [] - }, - { - "name": "Thunderbird", - "icon": "thunderbird", - "description": "Send and receive mail, contacts and schedule", - "pkg": "thunderbird", - "extra": [] - } - ] - }, - { - "name": "Backup", - "icon": "deja-dup", - "description": "Backup utilites", - "apps": [ - { - "name": "Deja Dup", - "icon": "deja-dup", - "description": "Keep your important documents safe from disater", - "pkg": "deja-dup", - "extra": [] - }, - { - "name": "Grsync", - "icon": "grsync", - "description": "Synchronize files and folders", - "pkg": "grsync", - "extra": [] - }, - { - "name": "Timeshift", - "icon": "timeshift", - "description": "A system restore utility for Linux", - "pkg": "timeshift", - "extra": [] - } - ] - }, - { - "name": "Text Editors", - "icon": "text-editor", - "description": "Various editors for text or code", - "apps": [ - { - "name": "Atom", - "icon": "atom", - "description": "A hackable text editor for the 21st Century", - "pkg": "atom", - "extra": [] - }, - { - "name": "Geany", - "icon": "geany", - "description": "A fast and lightweight IDE using GTK+", - "pkg": "geany", - "extra": [] - }, - { - "name": "Mousepad", - "icon": "mousepad", - "description": "Simple Text Editor", - "pkg": "mousepad", - "extra": [] - }, - { - "name": "Xed", - "icon": "xed", - "description": "A small and lightweight text editor. X Apps Project", - "pkg": "xed", - "extra": [] - } - ] - }, - { - "name": "System Tools", - "icon": "disk-utility", - "description": "System utilities", - "apps": [ - { - "name": "Gnome Disks", - "icon": "gnome-disks", - "description": "Disk management system for Gnome", - "pkg": "gnome-disk-utility", - "extra": [] - }, - { - "name": "Gparted", - "icon": "gparted", - "description": "Create, reorganize, and delete partitions", - "pkg": "gparted", - "extra": [] - }, - { - "name": "IsoUSB", - "icon": "usb-creator", - "description": "A graphical tool to copy a hybrid ISO onto a USB key.", - "pkg": "isousb", - "extra": [] - }, - { - "name": "Mintstick", - "icon": "mintstick", - "description": "Format or wirte imges to usb sticks (Linux Mint tool).", - "pkg": "mintstick", - "extra": [] - }, - { - "name": "Pamac", - "icon": "pamac-updater", - "description": "Update your System, Add/Remove Software from repo and AUR", - "pkg": "pamac", - "extra": [] - }, - { - "name": "Yay", - "icon": "terminal", - "description": "CLI AUR helper", - "pkg": "yay", - "extra": [] - } - ] - }, - { - "name": "Security", - "icon": "security-high", - "description": "Security oriented utilities", - "apps": [ - { - "name": "KeePassX", - "icon": "keepassx", - "description": "Cross Platform Password Manager", - "pkg": "keepassx", - "extra": [] - }, - { - "name": "SeaHorse", - "icon": "seahorse", - "description": "Manage your passwords and encryption keys", - "pkg": "seahorse", - "extra": [] - }, - { - "name": "VeraCrypt", - "icon": "veracrypt", - "description": "Disk encryption with strong security based on TrueCrypt", - "pkg": "veracrypt", - "extra": [] - } - ] - }, - { - "name": "Virtual Computing", - "icon": "virt-manager", - "description": "Virtual Machine applications", - "apps": [ - { - "name": "VirtualBox", - "icon": "virtualbox", - "description": "Run several virtual systems on a single host computer", - "pkg": "calibre", - "extra": [] - }, - { - "name": "Gnome Boxes", - "icon": "gnome-boxes", - "description": "Simple remote and virtual machines", - "pkg": "gnome-boxes", - "extra": [] - } - ] - }, - { - "name": "Chat", - "icon": "internet-chat", - "description": "Online messaging and chat", - "apps": [ - { - "name": "HexChat", - "icon": "hexchat", - "description": "Graphic IRC Client", - "pkg": "hexchat", - "extra": [] - }, - { - "name": "Pidgin Messenger", - "icon": "pidgin", - "description": "Instant messaging Client", - "pkg": "pidgin", - "extra": [] - } - ] - }, - { - "name": "File Sharing", - "icon": "transmission", - "description": "FTP and Torrent apps", - "apps": [ - { - "name": "Filezilla", - "icon": "filezilla", - "description": "Graphical FTP/FTPS/SFTP browser", - "pkg": "filezilla", - "extra": [] - }, - { - "name": "qBittorrent", - "icon": "qbittorrent", - "description": "A Qt based Bittorrent Client", - "pkg": "qbittorrent", - "extra": [] - }, - { - "name": "Transmission GTK", - "icon": "transmission", - "description": "GTK based Bittorrent Client", - "pkg": "transmission-gtk", - "extra": [] - }, - { - "name": "QTransmission", - "icon": "transmission", - "description": "QT based Bittorrent Client", - "pkg": "transmission-qt", - "extra": [] - } - ] - }, - { - "name": "Graphics Creating", - "icon": "applications-accessories", - "description": "Creating and editing graphics", - "apps": [ - { - "name": "Blender", - "icon": "blender", - "description": "3D modeling and animation", - "pkg": "blender", - "extra": [] - }, - { - "name": "GIMP", - "icon": "gimp", - "description": "Create images and edit photographs", - "pkg": "gimp", - "extra": [] - }, - { - "name": "Inkscape", - "icon": "inkscape", - "description": "Vector Graphics Editor", - "pkg": "inkscape", - "extra": [] - }, - { - "name": "Krita", - "icon": "krita", - "description": "Digital Painting Creative Freedom", - "pkg": "krita", - "extra": [] - }, - { - "name": "Pinta", - "icon": "pinta", - "description": "Easy create and edit images", - "pkg": "pinta", - "extra": [] - }, - { - "name": "Tux Paint", - "icon": "tuxpaint", - "description": "Drawing program for children", - "pkg": "tuxpaint", - "extra": [] - } - ] - }, - { - "name": "Graphics Organizing", - "icon": "applications-graphics", - "description": "Viewers and organizers", - "apps": [ - { - "name": "Gpicview", - "icon": "gpicview", - "description": "Lightweight Image Viewer", - "pkg": "gpicview", - "extra": [] - }, - { - "name": "gThumb", - "icon": "gthumb", - "description": "View and organize your images", - "pkg": "gthumb", - "extra": [] - }, - { - "name": "Gwenview", - "icon": "gwenview", - "description": "Image Viewer", - "pkg": "gwenview", - "extra": [] - }, - { - "name": "Ristretto", - "icon": "ristretto", - "description": "Free and lightweight image viewer", - "pkg": "ristretto", - "extra": [] - }, - { - "name": "Shotwell", - "icon": "shotwell", - "description": "Popular Photo Manager", - "pkg": "shotwell", - "extra": [] - }, - { - "name": "Viewnior", - "icon": "viewnior", - "description": "GTK based Elegant Image Viewer", - "pkg": "viewnior", - "extra": [] - } - ] - }, - { - "name": "Video/Movie", - "icon": "video-player", - "description": "Organize and play videos and movies", - "apps": [ - { - "name": "Kodi", - "icon": "kodi", - "description": "Manage and view your media", - "pkg": "kodi", - "extra": [] - }, - { - "name": "Parole", - "icon": "parole", - "description": "Modern and simple media player", - "pkg": "parole", - "extra": [] - }, - { - "name": "SM Player", - "icon": "smplayer", - "description": "A great MPlayer front end", - "pkg": "smplayer", - "extra": [] - }, - { - "name": "Totem", - "icon": "totem", - "description": "Play movies", - "pkg": "totem", - "extra": [] - }, - { - "name": "VLC", - "icon": "vlc", - "description": "VLC media player, the openxource multimedia player", - "pkg": "vlc", - "extra": [] - } - ] - }, - { - "name": "Audio", - "icon": "musicbrainz", - "description": "Audio players", - "apps": [ - { - "name": "Audacious", - "icon": "audacious", - "description": "Listen to music", - "pkg": "audacious", - "extra": [] - }, - { - "name": "Clementine", - "icon": "clementine", - "description": "Play music files and internet radio", - "pkg": "clementine", - "extra": [] - }, - { - "name": "DeadBeeF", - "icon": "deadbeef", - "description": "Listen to music", - "pkg": "deadbeef", - "extra": [] - }, - { - "name": "Lollypop", - "icon": "lollypop", - "description": "Play and organize your music collection", - "pkg": "deadbeef", - "extra": [] - }, - { - "name": "Rhythmbox", - "icon": "rhythmbox", - "description": "Gnome music playing application", - "pkg": "rhythmbox", - "extra": [] - } - ] - }, - { - "name": "Media recording/editing", - "icon": "kdenlive", - "description": "Audio and Video editing", - "apps": [ - { - "name": "Audacity", - "icon": "audacity", - "description": "Record and Edit Audio files", - "pkg": "audacity", - "extra": [] - }, - { - "name": "Kdenlive", - "icon": "kdenlive", - "description": "Video Editor", - "pkg": "kdenlive", - "extra": [] - }, - { - "name": "OBS Studio", - "icon": "obs", - "description": "Open Source Streaming/Recording Application", - "pkg": "obs-studio", - "extra": [] - }, - { - "name": "Simple Screen Recorder", - "icon": "simple-ccsm", - "description": "Screen Capturing Application", - "pkg": "simplescreenrecorder", - "extra": [] - } - ] - }, - { - "name": "Office Suites", - "icon": "applications-office", - "description": "Office suites like MS Office", - "apps": [ - { - "name": "Calligra Office", - "icon": "calligrawords", - "description": "Qt Based Office Suite", - "pkg": "calligra", - "extra": [] - }, - { - "name": "Libre Office (Fresh)", - "icon": "libreoffice-main", - "description": "Open Source Office Application (Lastest)", - "pkg": "libreoffice-fresh", - "extra": [] - }, - { - "name": "Libre Office (Still)", - "icon": "libreoffice-main", - "description": "Open Source Office Application (Stable)", - "pkg": "libreoffice-still", - "extra": [] - }, - { - "name": "MS Office Online", - "icon": "ms-word", - "description": "Microsoft Office Online", - "pkg": "ms-office-online", - "extra": [] - } - ] - }, - { - "name": "Office Apps", - "icon": "gnumeric", - "description": "Stand alone applications", - "apps": [ - { - "name": "Abiword", - "icon": "abiword", - "description": "Compose, Edit and view documents", - "pkg": "abiword", - "extra": [] - }, - { - "name": "Gnumeric", - "icon": "gnumeric", - "description": "A High Precision Spreadsheet Program", - "pkg": "gnumeric", - "extra": [] - } - ] - }, - { - "name": "PDF", - "icon": "pdfeditor", - "description": "PDF applications applications", - "apps": [ - { - "name": "Epdfview", - "icon": "qpdfview", - "description": "Lightweight PDF document viewer", - "pkg": "epdfview", - "extra": [] - }, - { - "name": "Evince", - "icon": "evince", - "description": "View multi page documents", - "pkg": "evince", - "extra": [] - }, - { - "name": "Okular", - "icon": "okular", - "description": "Document Viewer", - "pkg": "Okular", - "extra": [] - }, - { - "name": "PDFMod", - "icon": "pdfmod", - "description": "Remove, extract and rotate pages in PDF Documents", - "pkg": "pdfmod", - "extra": [] - }, - { - "name": "Qpdfview", - "icon": "qpdfview", - "description": "Tabbed document viewer", - "pkg": "qpdfview", - "extra": [] - } - ] - }, - { - "name": "E-Book", - "icon": "calibre", - "description": "E-book library apps", - "apps": [ - { - "name": "Calibre", - "icon": "calibre-viewer", - "description": "The one stop solution to your e-book needs", - "pkg": "calibre", - "extra": [] - }, - { - "name": "FBReader", - "icon": "fbreader", - "description": "FBReader E-Book Reader", - "pkg": "fbreader", - "extra": [] - } - ] - } -] \ No newline at end of file diff --git a/data/default.json b/data/default.json deleted file mode 100644 index b29b035..0000000 --- a/data/default.json +++ /dev/null @@ -1,862 +0,0 @@ -[ - { - "name": "Browsers", - "icon": "browser", - "description": "Web browsing and communication", - "apps": [ - { - "name": "Vivaldi", - "icon": "vivaldi", - "description": "An advanced browser made with the power user in mind.", - "pkg": "vivaldi", - "extra": [] - }, - { - "name": "Chromium", - "icon": "chromium", - "description": "A web browser built for speed, simplicity, and security", - "pkg": "chromium", - "extra": [] - }, - { - "name": "Epiphany", - "icon": "epiphany", - "description": "A GNOME web browser based on the WebKit rendering engine", - "pkg": "epiphany", - "filter": [ - "advanced" - ], - "extra": [] - }, - { - "name": "Firefox", - "icon": "mozilla-firefox", - "description": "Fast, Private & Safe Web Browser", - "pkg": "firefox", - "extra": ["firefox-gnome-theme-maia"] - }, - { - "name": "Falkon", - "icon": "falkon", - "description": "Cross-platform QtWebEngine browser", - "pkg": "falkon", - "filter": [ - "advanced" - ], - "desktop": [ - "!gnome" - ], - "extra": [] - }, - { - "name": "Konqueror", - "icon": "konqueror", - "description": "KDE File Manager & Web Browser", - "pkg": "konqueror", - "filter": [ - "advanced" - ], - "desktop": [ - "!gnome" - ], - "extra": [] - } - ] - }, - { - "name": "E-mail", - "icon": "mail-client", - "description": "E-mail, Calendar, Tasks", - "apps": [ - { - "name": "Claws Mail", - "icon": "claws-mail", - "description": "Lightweight and fast GTK+ based Mail Client", - "pkg": "claws-mail", - "filter": [ - "advanced" - ], - "extra": [] - }, - { - "name": "Evolution", - "icon": "evolution", - "description": "Manage your email, contacts and schedule", - "pkg": "evolution", - "desktop": [ - "!kde" - ], - "extra": [] - }, - { - "name": "Geary", - "icon": "geary", - "description": "A lightweight email client for the GNOME desktop\n", - "pkg": "geary", - "extra": [] - }, - { - "name": "KMail", - "icon": "kmail", - "description": "KDE mail client", - "pkg": "kmail", - "desktop": [ - "!gnome" - ], - "extra": [] - }, - { - "name": "Thunderbird", - "icon": "thunderbird", - "description": "Standalone mail and news reader from mozilla.org\n", - "pkg": "thunderbird", - "extra": [] - } - ] - }, - { - "name": "Office Suites", - "icon": "applications-office", - "description": "Office suites like MS Office", - "apps": [ - { - "name": "FreeOffice", - "icon": "ms-word", - "description": "Microsoft Office compatible suite", - "pkg": "freeoffice", - "extra": [] - }, - { - "name": "Libre Office (Fresh)", - "icon": "libreoffice-main", - "description": "Open Source Office Application (Latest)", - "pkg": "libreoffice-fresh", - "extra": [] - }, - { - "name": "Libre Office (Still)", - "icon": "libreoffice-main", - "description": "Open Source Office Application (Stable)", - "pkg": "libreoffice-still", - "extra": [] - }, - { - "name": "OnlyOffice Desktop Editors", - "icon": "ms-word", - "description": "Light and free MS Office clone.", - "pkg": "onlyoffice-desktopeditors", - "extra": [] - } - ] - }, - { - "name": "Extended language support", - "icon": "gnumeric", - "description": "Manjaro extended language support", - "apps": [ - { - "name": "Manjaro Asian Input Support Fcitx5", - "icon": "gnumeric", - "description": "Manjaro extended language support with fcitx5 support", - "pkg": "manjaro-asian-input-support-fcitx5", - "extra": [] - }, - { - "name": "Manjaro Asian Input Support Ibus", - "icon": "gnumeric", - "description": "Manjaro extended language support with ibus support", - "pkg": "manjaro-asian-input-support-ibus", - "extra": [] - } - ] - }, - { - "name": "E-Book", - "icon": "calibre", - "description": "E-book library apps", - "apps": [ - { - "name": "Bookworm", - "icon": "bookworm", - "description": "A simple user centric eBook reader which displays multiple eBooks formats uniformly", - "pkg": "bookworm", - "extra": [] - }, - { - "name": "Calibre", - "icon": "calibre-viewer", - "description": "The one stop solution to your e-book needs", - "pkg": "calibre", - "extra": [] - }, - { - "name": "CoolReader", - "icon": "coolreader", - "description": "Fast and small XML/CSS based eBook reader", - "pkg": "coolreader", - "extra": [] - }, - { - "name": "FBReader", - "icon": "fbreader", - "description": "FBReader E-Book Reader", - "pkg": "fbreader", - "extra": [] - }, - { - "name": "Foliate", - "icon": "foliate", - "description": "A simple and modern GTK eBook reader", - "pkg": "foliate", - "extra": [] - } - ] - }, - { - "name": "Text Editors", - "icon": "text-editor", - "description": "Various editors for text or code", - "apps": [ - { - "name": "Feather Notes", - "icon": "feathernotes", - "description": "Lightweight Qt hierarchical notes-manager", - "pkg": "feathernotes", - "extra": [] - }, - { - "name": "Feather Pad", - "icon": "featherpad", - "description": "Lightweight Qt plain text editor", - "pkg": "featherpad", - "extra": [] - }, - { - "name": "Gedit", - "icon": "gedit", - "description": "Easy-to-use general-purpose text editor", - "pkg": "gedit", - "extra": [] - }, - { - "name": "Micro", - "icon": "micro", - "description": "Modern and intuitive terminal-based text editor", - "pkg": "micro", - "extra": [] - }, - { - "name": "GVim", - "icon": "gvim", - "description": "Vi Improved, a highly configurable, improved version of the vi text editor", - "pkg": "gvim", - "filter": [ - "advanced" - ], - "extra": [] - }, - { - "name": "Visual Studio Code OSS", - "icon": "visual-studio-code", - "description": "The Open Source build of Visual Studio Code (vscode) editor", - "pkg": "code", - "filter": [ - "advanced" - ], - "extra": [] - }, - { - "name": "Gnome Builder", - "icon": "gedit", - "description": "An IDE for writing GNOME-based software", - "pkg": "gnome-builder", - "filter": [ - "advanced" - ], - "extra": [] - }, - { - "name": "Xed", - "icon": "xed", - "description": "A small and lightweight text editor. X Apps Project", - "pkg": "xed", - "extra": [] - } - ] - }, - { - "name": "Printing", - "icon": "printer", - "description": "Support for printing CUPS, HPLIP", - "apps": [ - { - "name": "Manjaro Printing", - "icon": "printer", - "description": "Printing Meta Package", - "pkg": "manjaro-printer", - "extra": [] - } - ] - }, - { - "name": "PDF", - "icon": "pdfeditor", - "description": "PDF applications applications", - "apps": [ - { - "name": "Evince", - "icon": "evince", - "description": "Document viewer", - "pkg": "evince", - "extra": [] - }, - { - "name": "Okular", - "icon": "okular", - "description": "Document Viewer", - "pkg": "okular", - "desktop": [ - "!gnome" - ], - "extra": [] - }, - { - "name": "Xournalpp", - "icon": "xournalpp", - "description": "Handwriting notetaking software with PDF annotation support", - "pkg": "xournalpp", - "extra": [] - }, - { - "name": "Xreader", - "icon": "xreader", - "description": "ocument viewer for files like PDF and Postscript. X-Apps Project.", - "pkg": "xreader", - "extra": [] - }, - { - "name": "Paperwork", - "icon": "paperwork", - "description": "Personal document manager to manage scanned documents and PDFs", - "pkg": "paperwork", - "extra": [] - } - ] - }, - { - "name": "Graphics Creating", - "icon": "applications-accessories", - "description": "Creating and editing graphics", - "apps": [ - { - "name": "Blender", - "icon": "blender", - "description": "A fully integrated 3D graphics creation suite", - "pkg": "blender", - "extra": [] - }, - { - "name": "GIMP", - "icon": "gimp", - "description": "GNU Image Manipulation Program", - "pkg": "gimp", - "extra": [] - }, - { - "name": "Inkscape", - "icon": "inkscape", - "description": "Professional vector graphics editor", - "pkg": "inkscape", - "extra": [] - }, - { - "name": "Krita", - "icon": "krita", - "description": "Edit and paint images", - "pkg": "krita", - "extra": [] - }, - { - "name": "Pinta", - "icon": "pinta", - "description": "Easy create and edit images", - "pkg": "pinta", - "extra": [] - } - ] - }, - { - "name": "Photos", - "icon": "applications-graphics", - "description": "Viewers and organizers", - "apps": [ - { - "name": "Gpicview", - "icon": "gpicview", - "description": "Lightweight Image Viewer", - "pkg": "gpicview", - "extra": [] - }, - { - "name": "gThumb", - "icon": "gthumb", - "description": "Image browser and viewer for the GNOME Desktop", - "pkg": "gthumb", - "desktop": [ - "!kde" - ], - "extra": [] - }, - { - "name": "Gnome-photos", - "icon": "gthumb", - "description": "Access, organize, and share your photos on GNOME", - "pkg": "gnome-photos", - "desktop": [ - "!kde" - ], - "extra": [] - }, - { - "name": "Ristretto", - "icon": "ristretto", - "description": "A fast and lightweight picture viewer for Xfce", - "pkg": "ristretto", - "extra": [] - }, - { - "name": "Shotwell", - "icon": "shotwell", - "description": "A digital photo organizer designed for the GNOME desktop environment odd versions are unstable!)", - "pkg": "shotwell", - "extra": [] - }, - { - "name": "Eye of Gnome", - "icon": "eog", - "description": "Eye of Gnome: An image viewing and cataloging program", - "pkg": "eog", - "desktop": [ - "!kde" - ], - "extra": [] - } - ] - }, - { - "name": "Video/Movie", - "icon": "video-player", - "description": "Organize and play videos and movies", - "apps": [ - { - "name": "Kodi", - "icon": "kodi", - "description": "A software media player and entertainment hub for digital media (gl renderer)", - "pkg": "kodi", - "extra": [] - }, - { - "name": "mpv", - "icon": "mpv", - "description": "a free, open source, and cross-platform media player", - "pkg": "mpv", - "extra": [] - }, { - "name": "Parole", - "icon": "parole", - "description": "Modern media player based on the GStreamer framework", - "pkg": "parole", - "extra": [] - }, - { - "name": "SM Player", - "icon": "smplayer", - "description": "Media player with built-in codecs that can play virtually all video and audio", - "pkg": "smplayer", - "extra": [] - }, - { - "name": "Totem", - "icon": "totem", - "description": "Movie player for the GNOME desktop based on GStreamer", - "pkg": "totem", - "desktop": [ - "!kde" - ], - "extra": [] - }, - { - "name": "VLC", - "icon": "vlc", - "description": "Multi-platform MPEG, VCD/DVD, and DivX player", - "pkg": "vlc", - "extra": [] - } - ] - }, - { - "name": "Audio", - "icon": "musicbrainz", - "description": "Audio players", - "apps": [ - { - "name": "Audacious", - "icon": "audacious", - "description": "Listen to music", - "pkg": "audacious", - "extra": [] - }, - { - "name": "Lollypop", - "icon": "lollypop", - "description": "Play and organize your music collection", - "pkg": "lollypop", - "extra": [] - }, - { - "name": "Qmmp", - "icon": "qmmp", - "description": "Qt based audio-player", - "pkg": "qmmp", - "extra": [] - }, - { - "name": "Rhythmbox", - "icon": "rhythmbox", - "description": "Music playback and management application", - "pkg": "rhythmbox", - "extra": [] - }, - { - "name": "Strawberry", - "icon": "strawberry", - "description": "A music player aimed at audio enthusiasts and music collectors", - "pkg": "strawberry", - "extra": [] - } - ] - }, - { - "name": "Media recording/editing", - "icon": "kdenlive", - "description": "Audio and Video editing", - "apps": [ - { - "name": "Audacity", - "icon": "audacity", - "description": "Record and Edit Audio files", - "pkg": "audacity", - "extra": [] - }, - { - "name": "Flowblade", - "icon": "flowblade", - "description": "Multitrack non-linear video editor", - "pkg": "flowblade", - "extra": [] - }, - { - "name": "Kdenlive", - "icon": "kdenlive", - "description": "A non-linear video editor for Linux using the MLT video framework", - "pkg": "kdenlive", - "extra": [] - }, - { - "name": "OBS Studio", - "icon": "obs", - "description": "Free, open source software for live streaming and recording", - "pkg": "obs-studio", - "extra": [] - }, - { - "name": "Openshot", - "icon": "openshot", - "description": "An award-winning free and open-source video editor", - "pkg": "openshot", - "extra": [] - }, - { - "name": "Pitivi", - "icon": "pitivi", - "description": "Editor for audio/video projects using the GStreamer framework", - "pkg": "pitivi", - "extra": [] - }, - { - "name": "Shotcut", - "icon": "shotcut", - "description": "Cross-platform Qt based Video Editor", - "pkg": "shotcut", - "extra": [] - }, - { - "name": "Vokoscreen", - "icon": "vokoscreen", - "description": "Easy to use screencast creator", - "pkg": "vokoscreen", - "extra": [] - } - ] - }, - { - "name": "Chat", - "icon": "internet-chat", - "description": "Online messaging and chat", - "apps": [ - { - "name": "Element Web", - "icon": "element", - "description": "Glossy Matrix collaboration client — web version.", - "pkg": "element-web", - "extra": [] - }, - { - "name": "Fractal", - "icon": "fractal", - "description": "Matrix group messaging app", - "pkg": "fractal", - "extra": [] - }, - { - "name": "HexChat", - "icon": "hexchat", - "description": "A popular and easy to use graphical IRC (chat) client", - "pkg": "hexchat", - "extra": [] - }, - { - "name": "Telegram", - "icon": "telegram-desktop", - "description": "Official Telegram Desktop client", - "pkg": "telegram-desktop", - "extra": [] - }, - { - "name": "Pidgin Messenger", - "icon": "pidgin", - "description": "Multi-protocol instant messaging client", - "pkg": "pidgin", - "extra": [] - } - ] - }, - { - "name": "File Sharing", - "icon": "transmission", - "description": "FTP and Torrent apps", - "filter": [ - "advanced" - ], - "apps": [ - { - "name": "Deluge", - "icon": "deluge", - "description": "BitTorrent client with multiple user interfaces in a client/server model", - "pkg": "deluge", - "extra": [] - }, - { - "name": "Filezilla", - "icon": "filezilla", - "description": "Graphical FTP/FTPS/SFTP browser", - "pkg": "filezilla", - "extra": [] - }, - { - "name": "QBittorrent", - "icon": "qbittorrent", - "description": "An advanced BitTorrent client based on Qt toolkit ", - "pkg": "qbittorrent", - "desktop": [ - "!gnome" - ], - "extra": [] - }, - { - "name": "Syncthing", - "icon": "syncthing-gtk", - "description": "Cross Platform file synchronization tool", - "pkg": "syncthing-gtk", - "extra": [] - }, - { - "name": "Transmission GTK", - "icon": "transmission", - "description": "GTK based Bittorrent Client", - "pkg": "transmission-gtk", - "desktop": [ - "!kde" - ], - "extra": [] - }, - { - "name": "Transmission Qt", - "icon": "transmission", - "description": "QT based Bittorrent Client", - "pkg": "transmission-qt", - "desktop": [ - "!gnome" - ], - "extra": [] - } - ] - }, - { - "name": "Backup", - "icon": "deja-dup", - "description": "Backup utilites", - "apps": [ - { - "name": "Deja Dup", - "icon": "deja-dup", - "description": "Keep your important documents safe from disater", - "pkg": "deja-dup", - "extra": [] - }, - { - "name": "Grsync", - "icon": "grsync", - "description": "Synchronize files and folders", - "pkg": "grsync", - "filter": [ - "advanced" - ], - "extra": [] - }, - { - "name": "Timeshift", - "icon": "timeshift", - "description": "A system restore utility for Linux", - "pkg": "timeshift", - "extra": [] - }, - { - "name": "Backintime", - "icon": "deja-dup", - "description": "Simple backup system", - "pkg": "backintime", - "extra": [] - }, - { - "name": "Borg", - "icon": "deja-dup", - "description": "Deduplicating backup program with compression and authenticated encryption", - "pkg": "borg", - "filter": [ - "advanced" - ], - "extra": [] - } - ] - }, - { - "name": "Password Manager", - "icon": "security-high", - "description": "Password Managers", - "apps": [ - { - "name": "KeePassXC", - "icon": "keepassxc", - "description": "Cross Platform Password Manager", - "pkg": "keepassxc", - "extra": [] - }, - { - "name": "Bitwarden", - "icon": "bitwarden", - "description": "Secure and free cloud based password manager.", - "pkg": "bitwarden", - "extra": [] - }, - { - "name": "Enpass", - "icon": "enpass", - "description": "Premium Cross-platform Password Manager", - "pkg": "enpass", - "extra": [] - } - ] - }, - { - "name": "System Tools", - "icon": "disk-utility", - "description": "System utilities", - "filter": [ - "advanced" - ], - "apps": [ - { - "name": "Popsicle", - "icon": "mintstick", - "description": "Graphical tool to write ISO to USB", - "pkg": "popsicle", - "extra": [] - }, - { - "name": "Gnome Disks", - "icon": "gnome-disks", - "description": "Disk management system for Gnome", - "pkg": "gnome-disk-utility", - "desktop": [ - "!kde" - ], - "extra": [] - }, - { - "name": "Gparted", - "icon": "gparted", - "description": "Create, reorganize, and delete partitions", - "pkg": "gparted", - "extra": [] - }, - { - "name": "Mintstick", - "icon": "mintstick", - "description": "Format or write imges to usb sticks (Linux Mint tool).", - "pkg": "mintstick", - "extra": [] - }, - { - "name": "Ventoy", - "icon": "mintstick", - "description": "Tool for creating multiboot isos", - "pkg": "ventoy", - "extra": [] - } - ] - }, - { - "name": "Virtual Computing", - "icon": "virt-manager", - "description": "Virtual Machine applications", - "filter": [ - "advanced" - ], - "apps": [ - { - "name": "VirtualBox", - "icon": "virtualbox", - "description": "Run several virtual systems on a single host computer", - "pkg": "virtualbox", - "extra": [ - "virtualbox-guest-iso" - ] - }, - { - "name": "Gnome Boxes", - "icon": "gnome-boxes", - "description": "Simple remote and virtual machines", - "pkg": "gnome-boxes", - "extra": [] - }, - { - "name": "Virt-manager", - "icon": "virt-manager", - "description": "Desktop user interface for managing virtual machines", - "pkg": "virt-manager", - "extra": [] - } - ] - } -] diff --git a/data/preferences.json b/data/preferences.json index 5d90bf8..e32b22c 100644 --- a/data/preferences.json +++ b/data/preferences.json @@ -1,27 +1,27 @@ { - "default_locale": "en", "autostart_path": "~/.config/autostart/manjaro-hello.desktop", - "data_path": "/usr/share/manjaro-hello/data/", + "data_path": "/usr/share/manjaro/manjaro-hello", + "default_locale": "en", "desktop_path": "/usr/share/applications/manjaro-hello.desktop", - "installer_path": "/usr/bin/calamares", - "rescue_path": "/usr/bin/manjaro-rescue", - "plasmawelcome_path": "/usr/bin/plasma-welcome", "gnometour_path": "/usr/bin/gnome-tour", + "installer_path": "/usr/bin/calamares", "live_path": "/run/miso/bootmnt/manjaro", - "locale_path": "/usr/share/locale/", + "locale_path": "/usr/share/locale", "logo_path": "/usr/share/icons/hicolor/64x64/apps/manjaro.png", + "plasmawelcome_path": "/usr/bin/plasma-welcome", + "rescue_path": "/usr/bin/manjaro-rescue", "save_path": "~/.config/manjaro-hello.json", - "ui_path": "/usr/share/manjaro-hello/ui/manjaro-hello.glade", - "style_path": "/usr/share/manjaro-hello/ui/style.css", + "style_path": "/usr/share/manjaro/manjaro-hello/style.css", + "ui_path": "/usr/share/manjaro/manjaro-hello/manjaro-hello.glade", "urls": { "development": "https://gitlab.manjaro.org", "donate": "https://manjaro.org/donate", "facebook": "https://facebook.com/ManjaroLinux", "forum": "https://forum.manjaro.org", - "youtube": "https://youtube.com/@manjaro-linux", "mailling": "https://lists.manjaro.org/pipermail/", + "youtube": "https://youtube.com/@manjaro-linux", "reddit": "https://reddit.com/r/Manjaro", - "x": "https://x.com/ManjaroLinux", - "wiki": "https://wiki.manjaro.org" + "wiki": "https://wiki.manjaro.org", + "x": "https://x.com/ManjaroLinux" } } diff --git a/launch.sh b/launch.sh index 243ae3e..41a2f61 100755 --- a/launch.sh +++ b/launch.sh @@ -1,15 +1,15 @@ #!/bin/sh # Script to generate mo files in a temp locale folder # Use it only for testing purpose -export PLUGIN_HELLO=True -export PYTHONPATH="$HOME/test/gnome-layout-switcher/bin:$HOME/Data/projects/application-utility" -rm -rf locale -mkdir locale -cd po -for lang in $(ls *.po); do +export APPS_PROJECT_DIR="/a/projects/repos/manjaro/application-utility" +export LAYOUT_PROJECT_DIR="/a/projects/repos/manjaro/gnome-layout-switcher/bin" +rm -rf $PWD/locale +mkdir $PWD/locale +for lang in $(ls $PWD/po/*.po); do lang=${lang::-3} - mkdir -p ../locale/${lang//_/-}/LC_MESSAGES - msgfmt -c -o ../locale/${lang//_/-}/LC_MESSAGES/manjaro-hello.mo $lang.po + mkdir -p $PWD//locale/${lang//_/-}/LC_MESSAGES + msgfmt -c -o $PWD//locale/${lang//_/-}/LC_MESSAGES/manjaro-hello.mo $lang.po done -cd .. +export PLUGIN_HELLO=True +export PYTHONPATH="${APPS_PROJECT_DIR}:${LAYOUT_PROJECT_DIR}" python3 src/manjaro_hello.py --dev diff --git a/src/__init__.py b/src/__init__.py index f797dbf..9f29fee 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -1,2 +1,2 @@ __all__ = ["manjaro_hello"] -__version__ = "0.7.3" +__version__ = "0.8.0" diff --git a/src/manjaro_hello.py b/src/manjaro_hello.py index 5cfd443..51a49e9 100755 --- a/src/manjaro_hello.py +++ b/src/manjaro_hello.py @@ -16,6 +16,10 @@ import webbrowser gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GdkPixbuf, Gdk +_SHARE_MANJARO = "/usr/share/manjaro" +_HELLO_DATA_DIR = f"{_SHARE_MANJARO}/manjaro-hello" +_HELLO_PREF_FILE = f"{_HELLO_DATA_DIR}/preferences.json" + class EmbedManager: """manage included applications""" @@ -62,23 +66,25 @@ class EmbedLayouts(Embed): """GNOME Layout Switcher""" def load(self, window: Gtk.Window) -> bool: try: + # import layoutswitcherlib from layoutswitcherlib.layoutsbox import LayoutBox try: self.box = LayoutBox(window, usehello=True) grid = Gtk.Grid() grid.set_margin_start(15) image = Gtk.Image(stock=Gtk.STOCK_GO_BACK) - backBtn=Gtk.Button(label=None, image=image) - backBtn.set_name("home") - backBtn.connect("clicked", self.on_btn_clicked,window) - grid.attach (backBtn, 0, 0, 1, 1) + back_btn=Gtk.Button(label=None, image=image) + back_btn.set_name("home") + back_btn.connect("clicked", self.on_btn_clicked,window) + grid.attach (back_btn, 0, 0, 1, 1) self.box.pack_start(grid, expand=False, fill=False, padding=10) self.box.reorder_child(grid,0) - self.box.show_all(); + self.box.show_all() except Exception as err: - print("Error in Embled application:", err) - except ModuleNotFoundError as err: - print(f"Info: gnome-layout-switcher not installed") + logging.error("Error in embedded application -> 'layoutswitcherlib'") + logging.error(err) + except ModuleNotFoundError: + logging.info(f"Plugin 'layoutswitcherlib' not available.") self.loaded = self.box is not None return self.loaded @@ -101,19 +107,20 @@ class EmbedBrowser(Embed): grid.set_margin_top(5) grid.set_margin_bottom(5) image = Gtk.Image(stock=Gtk.STOCK_GO_BACK) - backBtn=Gtk.Button(label=None, image=image) - backBtn.set_name("home") - backBtn.connect("clicked", self.on_btn_clicked,window) - grid.attach (backBtn, 0, 1, 1, 1) + back_btn=Gtk.Button(label=None, image=image) + back_btn.set_name("home") + back_btn.connect("clicked", self.on_btn_clicked,window) + grid.attach (back_btn, 0, 1, 1, 1) app=ApplicationBrowser(conf, window) app.info_bar_appstream.pack_start(grid, expand=False, fill=False, padding=10) app.info_bar_appstream.reorder_child(grid,0) app.show_all() self.box = app except Exception as err: - print("Error in Embled application:", err) + logging.error("Error in embedded application -> 'application-utility'") + logging.error(err) except ModuleNotFoundError as err: - print(f"Info: Application-utility not installed") + logging.info(f"Plugin 'application-utility' not available.") self.loaded = self.box is not None return self.loaded @@ -129,22 +136,22 @@ class Hello(Gtk.Window): self.dev = "--dev" in sys.argv if self.dev: # dont load hardcoded path in devmode - path = os.getcwd() - parent = os.path.abspath(os.path.join(path, os.pardir)) - data = f"{parent}/data/" - ui = f"{parent}/ui/" - self.preferences = read_json(f"{data}preferences.json") - self.preferences["data_path"] = f"{data}" - self.preferences["desktop_path"] = f"{parent}/{self.app}.desktop" - self.preferences["locale_path"] = f"{parent}/locale/" - self.preferences["ui_path"] = f"{ui}{self.app}.glade" - self.preferences["style_path"] = f"{ui}style.css" + project_dir = os.getcwd() + self.preferences = read_json(f"{project_dir}/data/preferences.json") + self.preferences["data_path"] = f"{project_dir}/data" + self.preferences["desktop_path"] = f"{project_dir}/{self.app}.desktop" + self.preferences["locale_path"] = f"{project_dir}/locale" + self.preferences["ui_path"] = f"{project_dir}/ui/{self.app}.glade" + self.preferences["style_path"] = f"{project_dir}/ui/style.css" + logging.debug(f"Using dev preferences: {self.preferences}") else: - self.preferences = read_json(f"/usr/share/{self.app}/data/preferences.json") + self.preferences = read_json(f"{_HELLO_PREF_FILE}") + logging.debug(f"Using system preferences: {self.preferences}") + # Get saved infos - self.save = read_json(self.preferences["save_path"]) - if not self.save: - self.save = {"locale": None} + self.usr_prefs = read_json(self.preferences["save_path"]) + if not self.usr_prefs: + self.usr_prefs = {"locale": None} # Import Css provider = Gtk.CssProvider() @@ -167,31 +174,31 @@ class Hello(Gtk.Window): self.builder.get_object("aboutdialog").set_logo(logo) for btn in self.builder.get_object("social").get_children(): - icon_path = self.preferences["data_path"] + "img/" + btn.get_name() + ".png" + icon_path = self.preferences["data_path"] + "/img/" + btn.get_name() + ".png" self.builder.get_object(btn.get_name()).set_from_file(icon_path) for widget in self.builder.get_object("homepage").get_children(): if isinstance(widget, Gtk.Button) and \ widget.get_image_position() is Gtk.PositionType.RIGHT: img = Gtk.Image.new_from_file( - self.preferences["data_path"] + "img/external-link.png") + self.preferences["data_path"] + "/img/external-link.png") img.set_margin_start(2) widget.set_image(img) # Create pages - self.pages = os.listdir("{}/pages/{}".format(self.preferences["data_path"], - self.preferences["default_locale"])) + # load pageas for language + self.pages = os.listdir(f"/{self.preferences["data_path"]}/pages/{self.preferences["default_locale"]}") for page in self.pages: scrolled_window = Gtk.ScrolledWindow() viewport = Gtk.Viewport(border_width=10) label = Gtk.Label(wrap=True) image = Gtk.Image(stock=Gtk.STOCK_GO_BACK) - backBtn=Gtk.Button(label=None, image=image) - backBtn.set_name("home") - backBtn.connect("clicked", self.on_btn_clicked) + back_btn=Gtk.Button(label=None, image=image) + back_btn.set_name("home") + back_btn.connect("clicked", self.on_btn_clicked) grid = Gtk.Grid() - grid.attach (backBtn, 0, 1, 1, 1) + grid.attach (back_btn, 0, 1, 1, 1) grid.attach(label, 1, 2, 1, 1) viewport.add(grid) scrolled_window.add(viewport) @@ -200,7 +207,7 @@ class Hello(Gtk.Window): # Init translation self.default_texts = {} - gettext.bindtextdomain(self.app, self.preferences["locale_path"]) + gettext.bindtextdomain(self.app, f"{self.preferences["locale_path"]}/") gettext.textdomain(self.app) self.builder.get_object("languages").set_active_id(self.get_best_locale()) @@ -209,10 +216,16 @@ class Hello(Gtk.Window): self.builder.get_object("autostart").set_active(self.autostart) # Live systems - if os.path.exists(self.preferences["live_path"]) and os.path.isfile(self.preferences["installer_path"]): + if (os.path.exists(self.preferences["live_path"]) and + os.path.isfile(self.preferences["installer_path"])): + # show install label self.builder.get_object("installlabel").set_visible(True) + # show install button self.builder.get_object("install").set_visible(True) - if os.path.exists(self.preferences["live_path"]) and os.path.isfile(self.preferences["rescue_path"]): + # check if manjaro system rescue is installed + if (os.path.exists(self.preferences["live_path"]) and + os.path.isfile(self.preferences["rescue_path"])): + # show grub-rescue button self.builder.get_object("rescue").set_visible(True) # Installed systems else: @@ -220,27 +233,33 @@ class Hello(Gtk.Window): manager.get_modules(self) manager.display(self) de = os.environ.get("DESKTOP_SESSION", "unknown") - + # check desktop plasma or gnome if de == "plasma" and os.path.isfile(self.preferences["plasmawelcome_path"]): + # enable Plasma Welcome button self.builder.get_object("deWelcome").set_visible(True) self.builder.get_object("deWelcome").set_label("Plasma Welcome") elif de == "gnome" and os.path.isfile(self.preferences["gnometour_path"]): + # enable Gnome Tour button self.builder.get_object("deWelcome").set_visible(True) self.builder.get_object("deWelcome").set_label("GNOME Tour") self.window.show() def get_best_locale(self): - """Choose best locale, based on user's preferences. + """Choose locale, based on user's preferences. :return: locale to use :rtype: str """ - path = self.preferences["locale_path"] + "{}/LC_MESSAGES/" + self.app + ".mo" - if os.path.isfile(path.format(self.save["locale"])): - return self.save["locale"] - elif self.save["locale"] == self.preferences["default_locale"]: + path = f"{self.preferences["locale_path"]}/LC_MESSAGES/{self.app}*.mo" + + if os.path.isfile(path.format(self.usr_prefs["locale"])): + # return usr_preference + return self.usr_prefs["locale"] + elif self.usr_prefs["locale"] == self.preferences["default_locale"]: + # return default return self.preferences["default_locale"] else: + # decide which locale to use locale.setlocale(locale.LC_ALL, '') sys_locale = locale.getlocale()[0] @@ -262,13 +281,15 @@ class Hello(Gtk.Window): :type use_locale: str """ try: - translation = gettext.translation(self.app, self.preferences[ - "locale_path"], [use_locale], fallback=True) + translation = gettext.translation(self.app, + self.preferences["locale_path"], + [use_locale], + fallback=True) translation.install() except OSError: return - self.save["locale"] = use_locale + self.usr_prefs["locale"] = use_locale # Real-time locale changing @@ -319,7 +340,7 @@ class Hello(Gtk.Window): def set_autostart(self, autostart): """Set state of autostart. - :param autostart: wanted autostart state + :param autostart: wanted auto start state :type autostart: bool """ try: @@ -351,10 +372,9 @@ class Hello(Gtk.Window): :return: text to load :rtype: str """ - filename = self.preferences["data_path"] + "pages/{}/{}".format(self.save["locale"], name) + filename = f"{self.preferences["data_path"]}/pages/{self.usr_prefs["locale"]}/{name}" if not os.path.isfile(filename): - filename = self.preferences["data_path"] + \ - "pages/{}/{}".format(self.preferences["default_locale"], name) + f"{self.preferences["data_path"]}/pages/{self.usr_prefs["default_locale"]}/{name}" try: with open(filename, "r") as fil: return fil.read() @@ -398,7 +418,7 @@ class Hello(Gtk.Window): def on_delete_window(self, *args): """Event to quit app.""" - write_json(self.preferences["save_path"], self.save) + write_json(self.preferences["save_path"], self.usr_prefs) Gtk.main_quit(*args) @@ -414,7 +434,7 @@ def fix_path(path): return path -def read_json(path): +def read_json(path) -> dict or None: """Read content of a json file. :param path: path to read :type path: str @@ -445,7 +465,7 @@ def write_json(path, content): def get_lsb_infos(): - """Read informations from the lsb-release file. + """Read information from the lsb-release file. :return: args from lsb-release file :rtype: dict""" lsb = {} @@ -465,7 +485,7 @@ def get_lsb_infos(): if __name__ == "__main__": - logging.basicConfig(level=logging.DEBUG) + logging.basicConfig(level=logging.INFO) hello = Hello() hello.connect('delete-event', Gtk.main_quit) hello.connect("destroy", Gtk.main_quit)