├── AUTHORS ├── icons ├── aidm.png └── aidm_bg.png ├── screenshot_aidm_en.png ├── screenshot_aidm_pt_br.png ├── locale └── pt_BR │ └── LC_MESSAGES │ ├── aidm.mo │ └── aidm.po ├── translations ├── pt_BR │ ├── LC_MESSAGES │ │ ├── aidm.mo │ │ └── aidm.po │ └── pt_BR.po └── pot │ └── aidm.pot ├── COPYING ├── README.md ├── themes ├── default.css └── dark.css ├── common.py └── aidm.py /AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | https://github.com/Alexsussa/AIDM 3 | -------------------------------------------------------------------------------- /icons/aidm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexsussa/AIDM/HEAD/icons/aidm.png -------------------------------------------------------------------------------- /icons/aidm_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexsussa/AIDM/HEAD/icons/aidm_bg.png -------------------------------------------------------------------------------- /screenshot_aidm_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexsussa/AIDM/HEAD/screenshot_aidm_en.png -------------------------------------------------------------------------------- /screenshot_aidm_pt_br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexsussa/AIDM/HEAD/screenshot_aidm_pt_br.png -------------------------------------------------------------------------------- /locale/pt_BR/LC_MESSAGES/aidm.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexsussa/AIDM/HEAD/locale/pt_BR/LC_MESSAGES/aidm.mo -------------------------------------------------------------------------------- /translations/pt_BR/LC_MESSAGES/aidm.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexsussa/AIDM/HEAD/translations/pt_BR/LC_MESSAGES/aidm.mo -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Alex Pinheiro 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AppImage Desktop Maker (AIDM) 2 | AppImage Desktop Maker 3 | 4 | **English:** 5 | 6 | AppImage Desktop Maker (AIDM) is a simple software that creates desktop shortcuts to .AppImage applications. 7 | It was developed to be simple and pratical 8 | 9 | How to use: 10 | 11 | Insert a program name, a simple description, choose a category and then select a software .AppImage e then an image to use as logo. 12 | 13 | Done! 14 | 15 | ![](https://raw.githubusercontent.com/Alexsussa/AIDM/master/screenshot_aidm_en.png) 16 | 17 | You open software menu and search by the program name, open it and use it. 18 | 19 | **Português Brasil:** 20 | 21 | AppImage Desktop Maker (AIDM) é software simples para criação de atalhos desktop para aplicativos .AppImage. 22 | O mesmo sendo criado com intuito simples e prático. 23 | 24 | Modo de uso: 25 | 26 | Coloque nome do programa, uma breve descrição, escolha uma categoria e depois selecione o programa com .AppImage e em seguida uma imagem para usar como logotipo. 27 | 28 | Prontinho! 29 | 30 | ![](https://raw.githubusercontent.com/Alexsussa/AIDM/master/screenshot_aidm_pt_br.png) 31 | 32 | Poderá abrir o menu de programas e buscar pelo nome do programa, abrir e usar tranquilamente. 33 | 34 | Link para baixar o AIDM: [**Download**](https://github.com/Alexsussa/AIDM/releases) em arquivo .deb e em .AppImage. 35 | -------------------------------------------------------------------------------- /themes/default.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | QMenuBar:item:selected { 4 | background-color: #0047ab; 5 | color: white; 6 | } 7 | 8 | QMenu:item:hover { 9 | background-color: #0047ab; 10 | } 11 | 12 | QMenu:item:selected { 13 | background-color: #0047ab; 14 | } 15 | 16 | QLineEdit { 17 | border: 1px solid darkgray; 18 | } 19 | 20 | QLineEdit:hover { 21 | border: 1px solid #0047ab; 22 | } 23 | 24 | QLineEdit { 25 | selection-background-color: #0047ab; 26 | selection-color: white; 27 | } 28 | 29 | QPushButton:hover { 30 | background-color: #0047ab; 31 | color: white; 32 | } 33 | 34 | QComboBox, QAbstractItemView { 35 | selection-background-color: #0047ab; 36 | selection-color: white; 37 | } 38 | 39 | QComboBox:item:selected { 40 | background-color: #0047ab; 41 | } 42 | 43 | QTextEdit { 44 | border: 1px solid darkgray; 45 | } 46 | 47 | QTextEdit:hover { 48 | border: 1px solid #0047ab; 49 | } 50 | 51 | QTextEdit { 52 | selection-background-color: #0047ab; 53 | selection-color: white; 54 | } 55 | 56 | QCommandLinkButton:hover { 57 | background-color: none; 58 | } 59 | 60 | QPushButton#aboutButton { 61 | background: rgba(255, 255, 255, 0); 62 | color: rgba(0, 0, 0, 0.5); 63 | border-style: none; 64 | } 65 | 66 | QPushButton#aboutButton:hover { 67 | background-color: #0047ab; 68 | color: white; 69 | } 70 | 71 | QLabel#lbVersion { 72 | color: rgba(0, 0, 0, 0.5); 73 | } 74 | -------------------------------------------------------------------------------- /themes/dark.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | QWidget { 4 | background-color: #363636; 5 | color: lightgray; 6 | } 7 | 8 | QMenuBar { 9 | background-color: #242424; 10 | color: lightgray; 11 | } 12 | 13 | QMenuBar:item:selected { 14 | background-color: #363636; 15 | color: lightgray; 16 | } 17 | 18 | QMenu:item { 19 | background-color: #242424; 20 | } 21 | 22 | QMenu:item:hover { 23 | background-color: #242424; 24 | } 25 | 26 | QMenu:item:selected { 27 | background-color: #363636; 28 | } 29 | 30 | QLineEdit { 31 | border: 1px solid #242424; 32 | } 33 | 34 | QLineEdit:hover { 35 | border: 1px solid #242424; 36 | } 37 | 38 | QLineEdit { 39 | selection-background-color: #696969; 40 | selection-color: white; 41 | } 42 | 43 | QPushButton:hover { 44 | background-color: #242424; 45 | color: white; 46 | } 47 | 48 | QComboBox, QAbstractItemView { 49 | selection-background-color: #696969; 50 | selection-color: white; 51 | } 52 | 53 | QComboBox:item:selected { 54 | background-color: #242424; 55 | } 56 | 57 | QScrollBar { 58 | background-color: #242424; 59 | } 60 | 61 | QScrollBar:handle:vertical { 62 | background-color: #696969; 63 | } 64 | 65 | QScrollBar:handle:pressed { 66 | background-color: #363636; 67 | } 68 | 69 | QTextEdit { 70 | border: 1px solid #242424; 71 | } 72 | 73 | QTextEdit:hover { 74 | border: 1px solid #242424; 75 | } 76 | 77 | QTextEdit { 78 | selection-background-color: #696969; 79 | selection-color: white; 80 | } 81 | 82 | QCommandLinkButton:hover { 83 | background-color: none; 84 | } 85 | 86 | QPushButton#aboutButton { 87 | border-style: none; 88 | color: lightgray; 89 | } 90 | 91 | QLabel#lbVersion { 92 | color: lightgray; 93 | } 94 | -------------------------------------------------------------------------------- /translations/pt_BR/pt_BR.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: \n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2020-09-01 11:20-0300\n" 11 | "PO-Revision-Date: 2020-09-01 11:25-0300\n" 12 | "Language-Team: \n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: 8bit\n" 16 | "X-Generator: Poedit 2.0.6\n" 17 | "Last-Translator: \n" 18 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 19 | "Language: pt_BR\n" 20 | 21 | #: ui.ui:393 22 | msgid "*.AppImage, *.appimage" 23 | msgstr "*.AppImage, *.appimage" 24 | 25 | #: ui.ui:491 26 | msgid "*.png, *.jpg, *.jpeg, *.gif" 27 | msgstr "*.png, *.jpg, *.jpeg, *.gif" 28 | 29 | #: ui.ui:270 30 | msgid "About" 31 | msgstr "Sobre" 32 | 33 | #: ui.ui:197 34 | msgid "About AIDM Ctrl+S" 35 | msgstr "Sobre AIDM Ctrl+S" 36 | 37 | #: ui.ui:284 38 | msgid "Alex Pinheiro" 39 | msgstr "Alex Pinheiro" 40 | 41 | #: ui.ui:101 42 | msgid "AppImage" 43 | msgstr "AppImage" 44 | 45 | #: ui.ui:7 46 | msgid "AppImage Desktop Maker" 47 | msgstr "AppImage Desktop Maker" 48 | 49 | #: ui.ui:323 50 | msgid "Choose an AppImage app" 51 | msgstr "Selecione um aplicativo AppImage" 52 | 53 | #: ui.ui:421 54 | msgid "Choose an image file" 55 | msgstr "Selecione um arquivo de imagem" 56 | 57 | #: ui.ui:139 58 | msgid "Create Desktop AppImage shortcut" 59 | msgstr "Criar atalho para o Desktop" 60 | 61 | #: ui.ui:133 62 | msgid "Create shortcut" 63 | msgstr "Criar atalho" 64 | 65 | #: ui.ui:51 66 | msgid "Description:" 67 | msgstr "Descrição:" 68 | 69 | #: ui.ui:281 70 | msgid "GitHub AppImage Desktop Maker" 71 | msgstr "GitHub AppImage Desktop Maker" 72 | 73 | #: ui.ui:117 74 | msgid "Logo" 75 | msgstr "Logotipo" 76 | 77 | #: ui.ui:26 78 | msgid "Name:" 79 | msgstr "Nome:" 80 | 81 | #: ui.ui:107 82 | msgid "Select an AppImage" 83 | msgstr "Selecione um AppImage" 84 | 85 | #: ui.ui:77 86 | msgid "Select an AppImage app by clicking the button" 87 | msgstr "Selecione um aplicativo AppImage clicando no botão" 88 | 89 | #: ui.ui:91 90 | msgid "Select an app logo by clicking the button" 91 | msgstr "Selecione um logotipo clicando no botão" 92 | 93 | #: ui.ui:123 94 | msgid "Select an image" 95 | msgstr "Selecione um a imagem" 96 | 97 | #: ui.ui:64 98 | msgid "Set a shortcut description" 99 | msgstr "Defina uma descrição para o atalho" 100 | 101 | #: ui.ui:38 102 | msgid "Set a shortcut name" 103 | msgstr "Defina um nome para o atalho" 104 | 105 | #: ui.ui:212 106 | msgid "Status" 107 | msgstr "Status" 108 | 109 | #: ui.ui:190 110 | msgid "about" 111 | msgstr "sobre" 112 | 113 | #: ui.ui:154 114 | msgid "version 0.1" 115 | msgstr "Versão 0.1" 116 | 117 | #: ui.ui:279 118 | msgid "© 2020 Alex Pinheiro" 119 | msgstr "© 2020 Alex Pinheiro" 120 | -------------------------------------------------------------------------------- /common.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from PyQt5.QtWidgets import * 5 | from PyQt5.QtCore import * 6 | from PyQt5.QtGui import * 7 | import os, gettext, webbrowser 8 | 9 | APPANME = 'aidm' 10 | LOCALE = os.path.abspath('/usr/share/locale') 11 | 12 | gettext.bindtextdomain(APPANME, LOCALE) 13 | gettext.textdomain(APPANME) 14 | _ = gettext.gettext 15 | 16 | 17 | def loadAppImage(self, load): 18 | file = QFileDialog.getOpenFileName(self, 'Open AppImage file', os.path.expanduser('~/'), 'AppImage (*.AppImage *.Appimage *.appImage *.appimage)', options=QFileDialog.DontUseNativeDialog) 19 | load.setText(file[0]) 20 | 21 | 22 | def loadLogo(self, load): 23 | file = QFileDialog.getOpenFileName(self, _('Open Image file'), os.path.expanduser('~/'), 'Images (*.jpg *.jpeg *.svg *.png)', options=QFileDialog.DontUseNativeDialog) 24 | load.setText(file[0]) 25 | 26 | 27 | def createShortcut(self, name, desc, categ, file, image): 28 | prefix_appImage = '.AppImage', '.Appimage', '.appImage', '.appimage' 29 | 30 | prefix_images = '.jpg', '.jpeg', '.svg', '.png' 31 | 32 | categories = {'AudioVideo': _('AudioVideo'), 'Development': _('Development'), 'Education': _('Education'), 'Game': _('Game'), 'Graphics': _('Graphics'), 'Network': _('Network'), 'Office': _('Office'), 'Science': _('Science'), 'Settings': _('Settings'), 'System': _('System'), 'Utility': _('Utility')} 33 | 34 | if name.text() == '' or desc.text() == '' or categ.currentText() == '' or file.text() == '' or image.text() == '': 35 | QMessageBox.information(self, _('Information'), _('Fill all fields before click on create shortcut button.'), QMessageBox.StandardButton(1)) 36 | 37 | elif not str(file.text()).endswith(tuple(prefix_appImage)): 38 | QMessageBox.information(self, _('Information'), _('You need to choose a valid .AppImage file.'), QMessageBox.StandardButton(1)) 39 | 40 | elif not str(image.text()).endswith(tuple(prefix_images)): 41 | QMessageBox.information(self, _('Information'), _('You need to choose a valid image file.'), QMessageBox.StandardButton(1)) 42 | 43 | else: 44 | categ_ = '' 45 | for k, v in categories.items(): 46 | if categ.currentText() == v: 47 | categ_ = k 48 | saveDesktop = open(os.path.expanduser(f'~/.local/share/applications/{name.text()}.desktop'), 'w') 49 | saveDesktop.write("#!/usr/bin/env xdg-open\n") 50 | saveDesktop.write("[Desktop Entry]\n") 51 | saveDesktop.write("Version=1.0\n") 52 | saveDesktop.write("Type=Application\n") 53 | saveDesktop.write("Terminal=false\n") 54 | saveDesktop.write(f"Name={name.text()}\n") 55 | saveDesktop.write(f"GenericName={name.text()}\n") 56 | saveDesktop.write(f"Comment={desc.text()}\n") 57 | saveDesktop.write(f"Icon={image.text()}\n") 58 | saveDesktop.write(f'Exec="{file.text()}"\n') 59 | saveDesktop.write(f"Categories=Qt;{categ_};\n") 60 | saveDesktop.write(f"Keywords={name.text()}") 61 | saveDesktop.close() 62 | 63 | #localpath = os.path.expanduser('~/.local/share/applications') 64 | #os.system(f'mv {name}.desktop {localpath}') 65 | 66 | QMessageBox.information(self, _('Information'), _('Desktop AppImage shortcut created successfully. Now your application can be found in application menu.'), QMessageBox.StandardButton(1)) 67 | 68 | clearFields(name, desc, categ, file, image) 69 | 70 | 71 | def clearFields(name, desc, categ, file, image): 72 | name.setText('') 73 | desc.setText('') 74 | categ.setCurrentIndex(0) 75 | file.setText('') 76 | image.setText('') 77 | 78 | 79 | def aboutAidm(): 80 | popup = QDialog() 81 | popup.setWindowTitle(_('About AIDM')) 82 | popup.setFixedSize(500, 590) 83 | 84 | bg_img = QPixmap('/usr/share/icons/hicolor/256x256/apps/aidm.png') 85 | lb_bg = QLabel('', popup) 86 | lb_bg.setGeometry(100, 0, 500, 285) 87 | lb_bg.setPixmap(bg_img) 88 | 89 | version = QLabel('v0.3', popup) 90 | version.setGeometry(250, 300, 100, 30) 91 | 92 | gh = QCommandLinkButton(_('Source Code'), popup) 93 | gh.setGeometry(202, 320, 110, 30) 94 | gh.setStyleSheet('color: blue; border: None;') 95 | gh.setCursor(QCursor(Qt.PointingHandCursor)) 96 | gh.clicked.connect(lambda: webbrowser.open('https://github.com/Alexsussa/AIDM')) 97 | 98 | license_ = QLabel(_('License MIT'), popup) 99 | license_.setGeometry(233, 340, 120, 30) 100 | 101 | copying = open('/usr/share/doc/aidm/COPYING', 'r').read() 102 | license_txt = QTextEdit(popup) 103 | license_txt.setGeometry(5, 370, 490, 210) 104 | license_txt.setText(copying) 105 | license_txt.setReadOnly(True) 106 | 107 | popup.exec_() 108 | #sys.exit(popup.exec_()) 109 | 110 | 111 | if __name__ == '__main__': 112 | import sys 113 | app = QApplication(sys.argv) 114 | #aboutAidm() 115 | sys.exit(app.exec_()) 116 | -------------------------------------------------------------------------------- /locale/pt_BR/LC_MESSAGES/aidm.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: \n" 4 | "Report-Msgid-Bugs-To: \n" 5 | "POT-Creation-Date: 2021-10-28 23:57-0300\n" 6 | "PO-Revision-Date: 2021-10-28 23:57-0300\n" 7 | "Last-Translator: \n" 8 | "Language-Team: \n" 9 | "Language: pt_BR\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "X-Generator: Poedit 2.3\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 16 | "X-Poedit-KeywordsList: _\n" 17 | "X-Poedit-SearchPath-0: aidm.py\n" 18 | "X-Poedit-SearchPath-1: common.py\n" 19 | 20 | #: aidm.py:27 21 | msgid "Name" 22 | msgstr "Nome" 23 | 24 | #: aidm.py:35 25 | msgid "Description" 26 | msgstr "Descrição" 27 | 28 | #: aidm.py:43 common.py:32 29 | msgid "AudioVideo" 30 | msgstr "Audio e Vídeo" 31 | 32 | #: aidm.py:43 common.py:32 33 | msgid "Development" 34 | msgstr "Desenvolvimento" 35 | 36 | #: aidm.py:43 common.py:32 37 | msgid "Education" 38 | msgstr "Educação" 39 | 40 | #: aidm.py:43 common.py:32 41 | msgid "Game" 42 | msgstr "Jogos" 43 | 44 | #: aidm.py:43 common.py:32 45 | msgid "Graphics" 46 | msgstr "Gráficos" 47 | 48 | #: aidm.py:43 common.py:32 49 | msgid "Network" 50 | msgstr "Internet" 51 | 52 | #: aidm.py:43 common.py:32 53 | msgid "Office" 54 | msgstr "Escritório" 55 | 56 | #: aidm.py:43 common.py:32 57 | msgid "Science" 58 | msgstr "Ciência" 59 | 60 | #: aidm.py:43 common.py:32 61 | msgid "Settings" 62 | msgstr "Configurações" 63 | 64 | #: aidm.py:43 common.py:32 65 | msgid "System" 66 | msgstr "Sistema" 67 | 68 | #: aidm.py:43 common.py:32 69 | msgid "Utility" 70 | msgstr "Utilitários" 71 | 72 | #: aidm.py:45 73 | msgid "Categories" 74 | msgstr "Categorias" 75 | 76 | #: aidm.py:67 77 | msgid "Logo" 78 | msgstr "Logotipo" 79 | 80 | #: aidm.py:77 81 | msgid "Create Shortcut" 82 | msgstr "Criar Atalho" 83 | 84 | #: aidm.py:82 85 | msgid "About" 86 | msgstr "Sobre" 87 | 88 | #: aidm.py:88 89 | msgid "Version 0.2" 90 | msgstr "Versão 0.2" 91 | 92 | #: common.py:23 93 | msgid "Open Image file" 94 | msgstr "Abrir arquivo de imagem" 95 | 96 | #: common.py:35 common.py:38 common.py:41 common.py:66 97 | msgid "Information" 98 | msgstr "Informação" 99 | 100 | #: common.py:35 101 | msgid "Fill all fields before click on create shortcut button." 102 | msgstr "Preencha todos os campos antes de clicar no botão criar atalho." 103 | 104 | #: common.py:38 105 | msgid "You need to choose a valid .AppImage file." 106 | msgstr "Você precisa escolher um arquivo .AppImage válido." 107 | 108 | #: common.py:41 109 | msgid "You need to choose a valid image file." 110 | msgstr "Você precisa escolher um arquivo de imagem válido." 111 | 112 | #: common.py:66 113 | msgid "" 114 | "Desktop AppImage shortcut created successfully. Now your application can be " 115 | "found in application menu." 116 | msgstr "" 117 | "Atalho desktop de AppImage criado com sucesso. Agora o seu aplicativo pode " 118 | "ser encontrado no menu de aplicações." 119 | 120 | #: common.py:81 121 | msgid "About AIDM" 122 | msgstr "Sobre o AIDM" 123 | 124 | #: common.py:92 125 | msgid "Source Code" 126 | msgstr "Código Fonte" 127 | 128 | #: common.py:98 129 | msgid "License MIT" 130 | msgstr "Licença MIT" 131 | 132 | #~ msgid "Images" 133 | #~ msgstr "Imagens" 134 | 135 | #~ msgid "Images (*.jpg *.jpeg *.svg *.png)" 136 | #~ msgstr "Imagens (*.png, *.jpg, *.jpeg, *.gif)" 137 | 138 | #~ msgid "Audio" 139 | #~ msgstr "Audio" 140 | 141 | #~ msgid "Video" 142 | #~ msgstr "Vídeo" 143 | 144 | #~ msgid "AppImage Desktop Maker" 145 | #~ msgstr "AppImage Desktop Maker" 146 | 147 | #~ msgid "Name:" 148 | #~ msgstr "Nome" 149 | 150 | #~ msgid "Set a shortcut name" 151 | #~ msgstr "Defina um nome para o atalho" 152 | 153 | #~ msgid "Description:" 154 | #~ msgstr "Descrição:" 155 | 156 | #~ msgid "Set a shortcut description" 157 | #~ msgstr "Defina uma descrição para o atalho" 158 | 159 | #~ msgid "Select an AppImage app by clicking the button" 160 | #~ msgstr "Selecione um aplicativo AppImage clicando no botão" 161 | 162 | #~ msgid "Select an logo app by clicking the button" 163 | #~ msgstr "Selecione um logotipo no botão ao lado" 164 | 165 | #~ msgid "Select an AppImage" 166 | #~ msgstr "Selecione um AppImage" 167 | 168 | #~ msgid "Select an image" 169 | #~ msgstr "Selecione um a imagem" 170 | 171 | #~ msgid "Create Desktop AppImage shortcut" 172 | #~ msgstr "Criar atalho para o Desktop" 173 | 174 | #~ msgid "Select an AppImage logo by clicking the button" 175 | #~ msgstr "Selecione um logotipo para o AppImage no botão ao lado" 176 | 177 | #~ msgid "about" 178 | #~ msgstr "sobre" 179 | 180 | #~ msgid "Stats" 181 | #~ msgstr "Status" 182 | 183 | #~ msgid "© 2020 Alex Pinheiro" 184 | #~ msgstr "© 2020 Alex Pinheiro" 185 | 186 | #~ msgid "GitHub AppImage Desktop Maker" 187 | #~ msgstr "GitHub AppImage Desktop Maker" 188 | 189 | #~ msgid "Alex Pinheiro" 190 | #~ msgstr "Alex Pinheiro" 191 | 192 | #~ msgid "Choose an AppImage app" 193 | #~ msgstr "Selecione um aplicativo AppImage" 194 | 195 | #~ msgid "*.AppImage, *.appimage" 196 | #~ msgstr "*.AppImage, *.appimage" 197 | -------------------------------------------------------------------------------- /translations/pot/aidm.pot: -------------------------------------------------------------------------------- 1 | #, fuzzy 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: \n" 5 | "Report-Msgid-Bugs-To: \n" 6 | "POT-Creation-Date: 2021-10-28 12:50-0300\n" 7 | "PO-Revision-Date: 2021-10-28 11:41-0300\n" 8 | "Last-Translator: \n" 9 | "Language-Team: \n" 10 | "Language: pt_BR\n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: 8bit\n" 14 | "X-Generator: Poedit 2.3\n" 15 | "X-Poedit-Basepath: ../../..\n" 16 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 17 | "X-Poedit-KeywordsList: _\n" 18 | "X-Poedit-SearchPath-0: aidm.py\n" 19 | "X-Poedit-SearchPath-1: common.py\n" 20 | 21 | #: aidm.py:27 22 | msgid "Name" 23 | msgstr "Nome" 24 | 25 | #: aidm.py:35 26 | msgid "Description" 27 | msgstr "Descrição" 28 | 29 | #: aidm.py:45 common.py:32 30 | msgid "AudioVideo" 31 | msgstr "Audio e Vídeo" 32 | 33 | #: aidm.py:45 common.py:32 34 | msgid "Development" 35 | msgstr "Desenvolvimento" 36 | 37 | #: aidm.py:45 common.py:32 38 | msgid "Education" 39 | msgstr "Educação" 40 | 41 | #: aidm.py:45 common.py:32 42 | msgid "Game" 43 | msgstr "Jogos" 44 | 45 | #: aidm.py:45 common.py:32 46 | msgid "Graphics" 47 | msgstr "Gráficos" 48 | 49 | #: aidm.py:45 common.py:32 50 | msgid "Network" 51 | msgstr "Internet" 52 | 53 | #: aidm.py:45 common.py:32 54 | msgid "Office" 55 | msgstr "Escritório" 56 | 57 | #: aidm.py:45 common.py:32 58 | msgid "Science" 59 | msgstr "Ciência" 60 | 61 | #: aidm.py:45 common.py:32 62 | msgid "Settings" 63 | msgstr "Configurações" 64 | 65 | #: aidm.py:45 common.py:32 66 | msgid "System" 67 | msgstr "Sistema" 68 | 69 | #: aidm.py:45 common.py:32 70 | msgid "Utility" 71 | msgstr "Utilitários" 72 | 73 | #: aidm.py:47 74 | msgid "Categories" 75 | msgstr "Categorias" 76 | 77 | #: aidm.py:69 78 | msgid "Logo" 79 | msgstr "Logotipo" 80 | 81 | #: aidm.py:79 82 | msgid "Create Shortcut" 83 | msgstr "Criar Atalho" 84 | 85 | #: aidm.py:84 86 | msgid "About" 87 | msgstr "Sobre" 88 | 89 | #: aidm.py:90 90 | msgid "Version 0.2" 91 | msgstr "Versão 0.2" 92 | 93 | #: common.py:23 94 | msgid "Open Image file" 95 | msgstr "Abrir arquivo de imagem" 96 | 97 | #: common.py:35 common.py:38 common.py:41 common.py:66 98 | msgid "Information" 99 | msgstr "Informação" 100 | 101 | #: common.py:35 102 | msgid "Fill all fields before click on create shortcut button." 103 | msgstr "Preencha todos os campos antes de clicar no botão criar atalho." 104 | 105 | #: common.py:38 106 | msgid "You need to choose a valid .AppImage file." 107 | msgstr "Você precisa escolher um arquivo .AppImage válido." 108 | 109 | #: common.py:41 110 | msgid "You need to choose a valid image file." 111 | msgstr "Você precisa escolher um arquivo de imagem válido." 112 | 113 | #: common.py:66 114 | msgid "" 115 | "Desktop AppImage shortcut created successfully. Now your application can be " 116 | "found in application menu." 117 | msgstr "" 118 | "Atalho desktop de AppImage criado com sucesso. Agora o seu aplicativo pode " 119 | "ser encontrado no menu de aplicatições." 120 | 121 | #: common.py:81 122 | msgid "About AIDM" 123 | msgstr "Sobre o AIDM" 124 | 125 | #: common.py:92 126 | msgid "Source Code" 127 | msgstr "Código Fonte" 128 | 129 | #: common.py:98 130 | msgid "License MIT" 131 | msgstr "Licença MIT" 132 | 133 | #~ msgid "Images" 134 | #~ msgstr "Imagens" 135 | 136 | #~ msgid "Images (*.jpg *.jpeg *.svg *.png)" 137 | #~ msgstr "Imagens (*.png, *.jpg, *.jpeg, *.gif)" 138 | 139 | #~ msgid "Audio" 140 | #~ msgstr "Audio" 141 | 142 | #~ msgid "Video" 143 | #~ msgstr "Vídeo" 144 | 145 | #~ msgid "AppImage Desktop Maker" 146 | #~ msgstr "AppImage Desktop Maker" 147 | 148 | #~ msgid "Name:" 149 | #~ msgstr "Nome" 150 | 151 | #~ msgid "Set a shortcut name" 152 | #~ msgstr "Defina um nome para o atalho" 153 | 154 | #~ msgid "Description:" 155 | #~ msgstr "Descrição:" 156 | 157 | #~ msgid "Set a shortcut description" 158 | #~ msgstr "Defina uma descrição para o atalho" 159 | 160 | #~ msgid "Select an AppImage app by clicking the button" 161 | #~ msgstr "Selecione um aplicativo AppImage clicando no botão" 162 | 163 | #~ msgid "Select an logo app by clicking the button" 164 | #~ msgstr "Selecione um logotipo no botão ao lado" 165 | 166 | #~ msgid "Select an AppImage" 167 | #~ msgstr "Selecione um AppImage" 168 | 169 | #~ msgid "Select an image" 170 | #~ msgstr "Selecione um a imagem" 171 | 172 | #~ msgid "Create Desktop AppImage shortcut" 173 | #~ msgstr "Criar atalho para o Desktop" 174 | 175 | #~ msgid "Select an AppImage logo by clicking the button" 176 | #~ msgstr "Selecione um logotipo para o AppImage no botão ao lado" 177 | 178 | #~ msgid "about" 179 | #~ msgstr "sobre" 180 | 181 | #~ msgid "Stats" 182 | #~ msgstr "Status" 183 | 184 | #~ msgid "© 2020 Alex Pinheiro" 185 | #~ msgstr "© 2020 Alex Pinheiro" 186 | 187 | #~ msgid "GitHub AppImage Desktop Maker" 188 | #~ msgstr "GitHub AppImage Desktop Maker" 189 | 190 | #~ msgid "Alex Pinheiro" 191 | #~ msgstr "Alex Pinheiro" 192 | 193 | #~ msgid "Choose an AppImage app" 194 | #~ msgstr "Selecione um aplicativo AppImage" 195 | 196 | #~ msgid "*.AppImage, *.appimage" 197 | #~ msgstr "*.AppImage, *.appimage" 198 | -------------------------------------------------------------------------------- /translations/pt_BR/LC_MESSAGES/aidm.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: \n" 4 | "Report-Msgid-Bugs-To: \n" 5 | "POT-Creation-Date: 2021-10-28 23:57-0300\n" 6 | "PO-Revision-Date: 2021-10-28 23:57-0300\n" 7 | "Last-Translator: \n" 8 | "Language-Team: \n" 9 | "Language: pt_BR\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "X-Generator: Poedit 2.3\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 16 | "X-Poedit-KeywordsList: _\n" 17 | "X-Poedit-SearchPath-0: aidm.py\n" 18 | "X-Poedit-SearchPath-1: common.py\n" 19 | 20 | #: aidm.py:27 21 | msgid "Name" 22 | msgstr "Nome" 23 | 24 | #: aidm.py:35 25 | msgid "Description" 26 | msgstr "Descrição" 27 | 28 | #: aidm.py:43 common.py:32 29 | msgid "AudioVideo" 30 | msgstr "Audio e Vídeo" 31 | 32 | #: aidm.py:43 common.py:32 33 | msgid "Development" 34 | msgstr "Desenvolvimento" 35 | 36 | #: aidm.py:43 common.py:32 37 | msgid "Education" 38 | msgstr "Educação" 39 | 40 | #: aidm.py:43 common.py:32 41 | msgid "Game" 42 | msgstr "Jogos" 43 | 44 | #: aidm.py:43 common.py:32 45 | msgid "Graphics" 46 | msgstr "Gráficos" 47 | 48 | #: aidm.py:43 common.py:32 49 | msgid "Network" 50 | msgstr "Internet" 51 | 52 | #: aidm.py:43 common.py:32 53 | msgid "Office" 54 | msgstr "Escritório" 55 | 56 | #: aidm.py:43 common.py:32 57 | msgid "Science" 58 | msgstr "Ciência" 59 | 60 | #: aidm.py:43 common.py:32 61 | msgid "Settings" 62 | msgstr "Configurações" 63 | 64 | #: aidm.py:43 common.py:32 65 | msgid "System" 66 | msgstr "Sistema" 67 | 68 | #: aidm.py:43 common.py:32 69 | msgid "Utility" 70 | msgstr "Utilitários" 71 | 72 | #: aidm.py:45 73 | msgid "Categories" 74 | msgstr "Categorias" 75 | 76 | #: aidm.py:67 77 | msgid "Logo" 78 | msgstr "Logotipo" 79 | 80 | #: aidm.py:77 81 | msgid "Create Shortcut" 82 | msgstr "Criar Atalho" 83 | 84 | #: aidm.py:82 85 | msgid "About" 86 | msgstr "Sobre" 87 | 88 | #: aidm.py:88 89 | msgid "Version 0.2" 90 | msgstr "Versão 0.2" 91 | 92 | #: common.py:23 93 | msgid "Open Image file" 94 | msgstr "Abrir arquivo de imagem" 95 | 96 | #: common.py:35 common.py:38 common.py:41 common.py:66 97 | msgid "Information" 98 | msgstr "Informação" 99 | 100 | #: common.py:35 101 | msgid "Fill all fields before click on create shortcut button." 102 | msgstr "Preencha todos os campos antes de clicar no botão criar atalho." 103 | 104 | #: common.py:38 105 | msgid "You need to choose a valid .AppImage file." 106 | msgstr "Você precisa escolher um arquivo .AppImage válido." 107 | 108 | #: common.py:41 109 | msgid "You need to choose a valid image file." 110 | msgstr "Você precisa escolher um arquivo de imagem válido." 111 | 112 | #: common.py:66 113 | msgid "" 114 | "Desktop AppImage shortcut created successfully. Now your application can be " 115 | "found in application menu." 116 | msgstr "" 117 | "Atalho desktop de AppImage criado com sucesso. Agora o seu aplicativo pode " 118 | "ser encontrado no menu de aplicações." 119 | 120 | #: common.py:81 121 | msgid "About AIDM" 122 | msgstr "Sobre o AIDM" 123 | 124 | #: common.py:92 125 | msgid "Source Code" 126 | msgstr "Código Fonte" 127 | 128 | #: common.py:98 129 | msgid "License MIT" 130 | msgstr "Licença MIT" 131 | 132 | #~ msgid "Images" 133 | #~ msgstr "Imagens" 134 | 135 | #~ msgid "Images (*.jpg *.jpeg *.svg *.png)" 136 | #~ msgstr "Imagens (*.png, *.jpg, *.jpeg, *.gif)" 137 | 138 | #~ msgid "Audio" 139 | #~ msgstr "Audio" 140 | 141 | #~ msgid "Video" 142 | #~ msgstr "Vídeo" 143 | 144 | #~ msgid "AppImage Desktop Maker" 145 | #~ msgstr "AppImage Desktop Maker" 146 | 147 | #~ msgid "Name:" 148 | #~ msgstr "Nome" 149 | 150 | #~ msgid "Set a shortcut name" 151 | #~ msgstr "Defina um nome para o atalho" 152 | 153 | #~ msgid "Description:" 154 | #~ msgstr "Descrição:" 155 | 156 | #~ msgid "Set a shortcut description" 157 | #~ msgstr "Defina uma descrição para o atalho" 158 | 159 | #~ msgid "Select an AppImage app by clicking the button" 160 | #~ msgstr "Selecione um aplicativo AppImage clicando no botão" 161 | 162 | #~ msgid "Select an logo app by clicking the button" 163 | #~ msgstr "Selecione um logotipo no botão ao lado" 164 | 165 | #~ msgid "Select an AppImage" 166 | #~ msgstr "Selecione um AppImage" 167 | 168 | #~ msgid "Select an image" 169 | #~ msgstr "Selecione um a imagem" 170 | 171 | #~ msgid "Create Desktop AppImage shortcut" 172 | #~ msgstr "Criar atalho para o Desktop" 173 | 174 | #~ msgid "Select an AppImage logo by clicking the button" 175 | #~ msgstr "Selecione um logotipo para o AppImage no botão ao lado" 176 | 177 | #~ msgid "about" 178 | #~ msgstr "sobre" 179 | 180 | #~ msgid "Stats" 181 | #~ msgstr "Status" 182 | 183 | #~ msgid "© 2020 Alex Pinheiro" 184 | #~ msgstr "© 2020 Alex Pinheiro" 185 | 186 | #~ msgid "GitHub AppImage Desktop Maker" 187 | #~ msgstr "GitHub AppImage Desktop Maker" 188 | 189 | #~ msgid "Alex Pinheiro" 190 | #~ msgstr "Alex Pinheiro" 191 | 192 | #~ msgid "Choose an AppImage app" 193 | #~ msgstr "Selecione um aplicativo AppImage" 194 | 195 | #~ msgid "*.AppImage, *.appimage" 196 | #~ msgstr "*.AppImage, *.appimage" 197 | -------------------------------------------------------------------------------- /aidm.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from PyQt5.QtWidgets import * 5 | from PyQt5.QtCore import * 6 | from PyQt5.QtGui import * 7 | from common import * 8 | import os, sys, gettext 9 | 10 | APPANME = 'aidm' 11 | LOCALE = os.path.abspath('/usr/share/locale') 12 | 13 | gettext.bindtextdomain(APPANME, LOCALE) 14 | gettext.textdomain(APPANME) 15 | _ = gettext.gettext 16 | 17 | 18 | class AIDM(QMainWindow): 19 | def __init__(self): 20 | super().__init__() 21 | 22 | self.central = QWidget() 23 | self.setCentralWidget(self.central) 24 | 25 | self.font = QFont('Helvetica', 11) 26 | 27 | self.lbName = QLabel(_('Name'), self.central) 28 | self.lbName.setFont(self.font) 29 | self.lbName.setGeometry(20, 30, 50, 30) 30 | 31 | self.name_txt = QLineEdit(self.central) 32 | self.name_txt.setPlaceholderText(_('Type a name to application...')) 33 | self.name_txt.setFont(self.font) 34 | self.name_txt.setGeometry(70, 30, 200, 30) 35 | 36 | self.lbDescription = QLabel(_('Description'), self.central) 37 | self.lbDescription.setFont(self.font) 38 | self.lbDescription.setGeometry(280, 30, 100, 30) 39 | 40 | self.description_txt = QLineEdit(self.central) 41 | self.description_txt.setPlaceholderText(_('Type some description...')) 42 | self.description_txt.setFont(self.font) 43 | self.description_txt.setGeometry(370, 30, 300, 30) 44 | 45 | categories = {'AudioVideo': _('AudioVideo'), 'Development': _('Development'), 'Education': _('Education'), 'Game': _('Game'), 'Graphics': _('Graphics'), 'Network': _('Network'), 'Office': _('Office'), 'Science': _('Science'), 'Settings': _('Settings'), 'System': _('System'), 'Utility': _('Utility')} 46 | 47 | self.categories = QLabel(_('Categories'), self.central) 48 | self.categories.setFont(self.font) 49 | self.categories.setGeometry(20, 70, 100, 30) 50 | 51 | self.categories_txt = QComboBox(self.central) 52 | self.categories_txt.setFont(self.font) 53 | self.categories_txt.setGeometry(105, 70, 150, 30) 54 | self.categories_txt.addItems(sorted(categories.values())) 55 | 56 | self.appImage_txt = QLineEdit(self.central) 57 | self.appImage_txt.setPlaceholderText(_('Select an AppImage application...')) 58 | self.appImage_txt.setFont(self.font) 59 | self.appImage_txt.setGeometry(260, 70, 280, 30) 60 | 61 | self.appImage_btn = QPushButton('AppImage', self.central) 62 | self.appImage_btn.setFont(self.font) 63 | self.appImage_btn.setGeometry(550, 70, 120, 30) 64 | self.appImage_btn.clicked.connect(lambda: loadAppImage(self, self.appImage_txt)) 65 | 66 | self.logo_txt = QLineEdit(self.central) 67 | self.logo_txt.setPlaceholderText(_('Select an image to set as application logo...')) 68 | self.logo_txt.setFont(self.font) 69 | self.logo_txt.setGeometry(105, 110, 435, 30) 70 | 71 | self.logo_btn = QPushButton(_('Logo'), self.central) 72 | self.logo_btn.setFont(self.font) 73 | self.logo_btn.setGeometry(550, 110, 120, 30) 74 | self.logo_btn.clicked.connect(lambda: loadLogo(self, self.logo_txt)) 75 | 76 | self.bgImage = QPixmap('/usr/share/icons/hicolor/256x256/apps/aidm_bg.png') 77 | self.background = QLabel(self.central) 78 | self.background.setGeometry(130, 160, 500, 285) 79 | self.background.setPixmap(self.bgImage) 80 | 81 | self.createSc_btn = QPushButton(_('Create Shortcut'), self.central) 82 | self.createSc_btn.setFont(self.font) 83 | self.createSc_btn.setGeometry(270, 480, 150, 30) 84 | self.createSc_btn.clicked.connect(lambda: createShortcut(self, self.name_txt, self.description_txt, self.categories_txt, self.appImage_txt, self.logo_txt)) 85 | 86 | self.about_btn = QPushButton(_('About'), self.central) 87 | self.about_btn.setGeometry(2, 545, 50, 30) 88 | self.about_btn.setObjectName('aboutButton') 89 | self.about_btn.setCursor(QCursor(Qt.PointingHandCursor)) 90 | self.about_btn.clicked.connect(aboutAidm) 91 | 92 | self.lbversion = QLabel(_('Version 0.3'), self.central) 93 | self.lbversion.setGeometry(625, 545, 100, 30) 94 | self.lbversion.setObjectName('lbVersion') 95 | self.lbversion.setToolTip(_('Press Ctrl+J to change to dark theme')) 96 | 97 | # Keyboard shortcuts 98 | about_sc = QShortcut('Ctrl+S', self.about_btn) 99 | about_sc.activated.connect(aboutAidm) 100 | 101 | clear_sc = QShortcut('Ctrl+L', self) 102 | clear_sc.activated.connect(lambda: clearFields(self.name_txt, self.description_txt, self.categories_txt, self.appImage_txt, self.logo_txt)) 103 | 104 | # Functions that need to be running at start 105 | self.checkTheme() 106 | 107 | # Keyboard shortcuts 108 | ct = QShortcut('Ctrl+J', self) 109 | ct.activated.connect(lambda: [self.changeTheme(), self.checkTheme()]) 110 | 111 | 112 | def checkTheme(self): 113 | import json 114 | configPath = os.path.abspath(os.path.expanduser('~/.config/aidm/')) 115 | if not os.path.exists(configPath): 116 | os.makedirs(configPath) 117 | with open(f'{configPath}/config.json', 'w') as file: 118 | json.dump({'current theme': 'default'}, file, indent=4) 119 | with open(os.path.expanduser('~/.config/aidm/config.json'), 'r') as configFileRead: 120 | loadJson = json.loads(configFileRead.read()) 121 | configFileRead.close() 122 | currentTheme = loadJson['current theme'] 123 | theme = '' 124 | if currentTheme == 'default': 125 | theme = 'default.css' 126 | else: 127 | theme = 'dark.css' 128 | app.setStyleSheet(open(f'/usr/share/aidm/themes/{theme}', 'r').read()) 129 | 130 | 131 | def changeTheme(self): 132 | import json 133 | configPath = os.path.abspath(os.path.expanduser('~/.config/aidm/')) 134 | configFile = os.path.join(f'{configPath}/' + 'config.json') 135 | with open(f'{configFile}', 'r') as configFileRead: 136 | loadJson = json.loads(configFileRead.read()) 137 | configFileRead.close() 138 | currentTheme = loadJson['current theme'] 139 | 140 | with open(f'{configFile}', 'w') as configFileWrite: 141 | themeToSave = '' 142 | if currentTheme == 'default': 143 | themeToSave = {'current theme': 'dark'} 144 | else: 145 | themeToSave = {'current theme': 'default'} 146 | json.dump(themeToSave, configFileWrite, indent=4) 147 | 148 | 149 | if __name__ == '__main__': 150 | app = QApplication(sys.argv) 151 | app.setStyleSheet(open('/usr/share/aidm/themes/default.css', 'r').read()) 152 | translator = QTranslator() 153 | locale_ = QLocale().system().name() 154 | #library = QLibraryInfo.location(QLibraryInfo.LibraryLocation.TranslationsPath) 155 | library = os.path.abspath('/usr/share/aidm/translations') 156 | translator.load('qt_' + locale_, library) 157 | window = AIDM() 158 | window.setWindowTitle('AppImage Desktop Maker') 159 | window.setWindowIcon(QIcon('/usr/share/icons/hicolor/256x256/apps/aidm.png')) 160 | window.setFixedSize(700, 580) 161 | window.show() 162 | app.installTranslator(translator) 163 | sys.exit(app.exec_()) 164 | --------------------------------------------------------------------------------