Global search GUI for antiX

Forum Forums General Software Global search GUI for antiX

  • This topic has 175 replies, 12 voices, and was last updated Jan 13-9:33 pm by Brian Masinick.
Viewing 15 posts - 31 through 45 (of 176 total)
  • Author
    Posts
  • #122402
    Member
    Wallon

      Dear PPC,

      I’ve tested your latest version.

      Now you can see the selected region clearly and the program no longer closes after selecting a new region.
      It all works.

      Thank you very much.
      Wallon

      #122477
      Member
      PPC

        Dear all:

        Two tiny improvements to the script, that I did last night:
        -When using the application search button, the script now checks if the query is a Terminal command. If so, it’s added to the end of the list (a new terminal window is opened to run that command).
        This makes searching for applications a nearly complete feature, including both commands from .desktop files in the generic path and Terminal commands too.
        -Clarified, even more, the web search configuration window

        In Private testing, there are 2 possible additions to the application search function:
        – if there is only one hit, automatically run it (assume that it’s the exact app users wanted to run and save then the extra click on the only hit)
        – if there is no hit, but the search corresponds to the name of a package that can be installed (ex: vlc, gimp, kdenlive, etc), warn user that the corresponding package can be installed from the repository (ideally, allow to install it, but that can be problematic, it’s better to just recommend using Package Installer, Synaptic or sudo apt install “$query”).

        P.

        Attachments:
        #122492
        Member
        marcelocripe

          Hello PPC.
          I managed to test the “finder-final3.tar” version yesterday and everything worked perfectly.
          When you consider the final version, I suggest we create the “.desktop” file and the translation resources.
          This is another important program for antiX.
          Thank you very much!

          – – – – –

          Olá, PPC.
          Eu consegui testar ontem a versão “finder-final3.tar” e tudo funcionou perfeitamente.
          Quando você considerar a versão final, eu sugiro criarmos o arquivo “.desktop” e os recursos de tradução.
          Este é mais um importante programa para o antiX.
          Muito obrigado!

          #122494
          Member
          Wallon

            Dear PPC,

            As you know, Marcelocripe and I have to find a solution for translating your beautiful programmes.
            To help us achieve compatibility with gettext, I would like to ask you a favour.
            Would you be so kind as to add the following two lines to the beginning of your file?

            TEXTDOMAINDIR=/usr/share/locale
            TEXTDOMAIN=finder

            If the name of your programme “finder” is changed by anticapitalista, you will also need to change the word “finder” in the TEXTDOMAIN=finder line.

            Then, would you be so kind as to put the texts in variables just after the two lines TEXTDOMAINDIR and TEXTDOMAIN?

            Example to add;
            ###Text shown in the script (for easy localization/edition, it’s placed in variables):
            main_window_title=$”The title of the main window.”
            main_window_text=$”The main window text.”
            and so on…

            Thank you for your dedication to the antiX community and to people who don’t speak English.

            Kind regards,
            Wallon

            #122495
            Member
            PPC

              @marcelocripe – Thanks for testing the script. anticapitalista won’t probably accept this script as part of the yad-goodies package… If that happens, I’ll just integrate it, when (and if) I can, in FT10.
              I ask you the same I asked Wallon – please provide the localized fields for the .desktop file. I’m thinking about keeping “Finder” as the script’s name, since it’s short, hard to forget and describes exactly what it does, in English.
              In I’m thinking about something like this:

              [Desktop Entry]
              Version=1.0
              Name=Finder
              GenericName=Finder - search for files, apps and on the web
              Comment=Search for files and folders inside your home, for applications and perform web searches
              Name[pt]=Finder - pesquisar ficheiros, aplicações e na Internet
              GenericName[pt]=Finder - pesquisar ficheiros, aplicações e na Internet
              Comment[pt]=Pesquisar pelo nome de ficheiros e pastas na sua Home, por aplicações e fazer pesquisas na Internet
              Categories=Utility
              Exec=finder
              Icon=/usr/share/icons/Adwaita/48x48/legacy/preferences-system-search-symbolic.symbolic.png
              Type=Application
              Terminal=false
              • This reply was modified 3 months, 4 weeks ago by PPC.
              #122521
              Member
              marcelocripe

                [Desktop Entry]
                Categories=Utility
                Exec=finder
                Icon=/usr/share/icons/Adwaita/48×48/legacy/preferences-system-search-symbolic.symbolic.png
                Type=Application
                Terminal=false
                Version=1.0

                Name=Finder
                Name[pt]=Finder – pesquisar ficheiros, aplicações e na Internet
                Name[pt_BR]=Pesquisar Arquivos, Aplicativos e na Internet com o Finder

                GenericName=Finder – search for files, apps and on the web
                GenericName[pt]=Finder – pesquisar ficheiros, aplicações e na Internet
                GenericName[pt_BR]=O ‘Finder’ é um pesquisador de arquivos, aplicativos e de conteúdos na Internet

                Comment=Search for files and folders inside your home, for applications and perform web searches
                Comment[pt]=Pesquisar pelo nome de ficheiros e pastas na sua Home, por aplicações e fazer pesquisas na Internet
                Comment[pt_BR]=O ‘Finder’ permite pesquisar pelo nome do arquivo ou da pasta no seu diretório pessoal, pesquisar e executar programas aplicativos, além de realizar pesquisas de conteúdos na Internet com o utilitário de linha de comando ‘ddgr’ do buscador ‘DuckDuckGo’ que preserva a privacidade do usuário

                Keywords=finder;search;files;folders;home;app;web;internet;
                Keywords[de]=
                Keywords[es]=
                Keywords[fr]=
                Keywords[fr_BE]=
                Keywords[pt]=pesquisador;pesquisar;encontrar;localizar;ficheiros;pasta pessoal;diretório pessoal;aplicações;programas;internet;web;
                Keywords[pt_BR]=pesquisador;pesquisar;encontrar;localizar;arquivos;pasta pessoal;diretório pessoal;programas; aplicativos;internet;web;
                Keywords[ru]=

                #122527
                Member
                ile

                  Hello PPC
                  Nice.
                  Can it duck into tray?
                  ha ha. quack. quack ddg.
                  Can it load to tray alike You have done with yad-pmrp?
                  Rather minimized to system tray ever?

                  #122534
                  Member
                  Wallon

                    Here’s for French

                    [Desktop Entry]
                    Categories=Utility
                    Exec=finder
                    Icon=/usr/share/icons/Adwaita/48×48/legacy/preferences-system-search-symbolic.symbolic.png
                    Type=Application
                    Terminal=false
                    Version=1.0
                    Name=Finder
                    Name[fr]=Finder - recherche de fichiers, d’applications et de sites Internet
                    Name[fr_BE]=Finder - recherche de fichiers, d’applications et de sites Internet
                    Name[pt]=Finder – pesquisar ficheiros, aplicações e na Internet
                    Name[pt_BR]=Pesquisar Arquivos, Aplicativos e na Internet com o Finder
                    GenericName=Finder – search for files, apps and on the web
                    GenericName[fr]=Finder - recherche de fichiers, d’applications et de sites Internet
                    GenericName[fr_BE]=Finder - recherche de fichiers, d’applications et de sites Internet
                    GenericName[pt]=Finder – pesquisar ficheiros, aplicações e na Internet
                    GenericName[pt_BR]=O ‘Finder’ é um pesquisador de arquivos, aplicativos e de conteúdos na Internet
                    Comment=Search for files and folders inside your home, for applications and perform web searches
                    Comment[fr]=Recherche le nom d’un fichier ou d’un dossier dans votre répertoire « home », une application, un site Web sur Internet.
                    Comment[fr_BE]=Recherche le nom d’un fichier ou d’un dossier dans votre répertoire « home », une application, un site Web sur Internet.
                    Comment[pt]=Pesquisar pelo nome de ficheiros e pastas na sua Home, por aplicações e fazer pesquisas na Internet
                    Comment[pt_BR]=O ‘Finder’ permite pesquisar pelo nome do arquivo ou da pasta no seu diretório pessoal, pesquisar e executar programas aplicativos, além de realizar pesquisas de conteúdos na Internet com o utilitário de linha de comando ‘ddgr’ do buscador ‘DuckDuckGo’ que preserva a privacidade do usuário
                    Keywords=finder;search;files;folders;home;app;web;internet;
                    Keywords[de]=
                    Keywords[es]=
                    Keywords[fr]=finder;search;files;folders;home;app;web;internet;cherche;recherche;trouve;fichier;répertoire;dossier;site;programme;logiciel;application;
                    Keywords[fr_BE]=finder;search;files;folders;home;app;web;internet;cherche;recherche;trouve;fichier;répertoire;dossier;site;programme;logiciel;application;
                    Keywords[pt]=pesquisador;pesquisar;encontrar;localizar;ficheiros;pasta pessoal;diretório pessoal;aplicações;programas;internet;web;
                    Keywords[pt_BR]=pesquisador;pesquisar;encontrar;localizar;arquivos;pasta pessoal;diretório pessoal;programas; aplicativos;internet;web;
                    Keywords[ru]=
                    
                    #122586
                    Member
                    Karo

                      Added german

                      [Desktop Entry]
                      Categories=Utility
                      Exec=finder
                      Icon=/usr/share/icons/Adwaita/48×48/legacy/preferences-system-search-symbolic.symbolic.png
                      Type=Application
                      Terminal=false
                      Version=1.0
                      Name=Finder
                      Name[de]=Finder - Suche nach Dateien, Programmen und Webseiten
                      Name[fr]=Finder - recherche de fichiers, d’applications et de sites Internet
                      Name[fr_BE]=Finder - recherche de fichiers, d’applications et de sites Internet
                      Name[pt]=Finder – pesquisar ficheiros, aplicações e na Internet
                      Name[pt_BR]=Pesquisar Arquivos, Aplicativos e na Internet com o Finder
                      GenericName=Finder – search for files, apps and on the web
                      GenericName[de]=Finder – Suche nach Dateien, Programmen und Webseiten
                      GenericName[fr]=Finder - recherche de fichiers, d’applications et de sites Internet
                      GenericName[fr_BE]=Finder - recherche de fichiers, d’applications et de sites Internet
                      GenericName[pt]=Finder – pesquisar ficheiros, aplicações e na Internet
                      GenericName[pt_BR]=O ‘Finder’ é um pesquisador de arquivos, aplicativos e de conteúdos na Internet
                      Comment=Search for files and folders inside your home, for applications and perform web searches
                      Comment[de]=Suche nach Dateien und Ordnern im Home Verzeichnis, nach Programmen sowie Suche im Internet
                      Comment[fr]=Recherche le nom d’un fichier ou d’un dossier dans votre répertoire « home », une application, un site Web sur Internet.
                      Comment[fr_BE]=Recherche le nom d’un fichier ou d’un dossier dans votre répertoire « home », une application, un site Web sur Internet.
                      Comment[pt]=Pesquisar pelo nome de ficheiros e pastas na sua Home, por aplicações e fazer pesquisas na Internet
                      Comment[pt_BR]=O ‘Finder’ permite pesquisar pelo nome do arquivo ou da pasta no seu diretório pessoal, pesquisar e executar programas aplicativos, além de realizar pesquisas de conteúdos na Internet com o utilitário de linha de comando ‘ddgr’ do buscador ‘DuckDuckGo’ que preserva a privacidade do usuário
                      Keywords=finder;search;files;folders;home;app;web;internet;
                      Keywords[de]=finder;Suche;Dateien;Ordner;home;app;Programm;web;Internet
                      Keywords[es]=
                      Keywords[fr]=finder;search;files;folders;home;app;web;internet;cherche;recherche;trouve;fichier;répertoire;dossier;site;programme;logiciel;application;
                      Keywords[fr_BE]=finder;search;files;folders;home;app;web;internet;cherche;recherche;trouve;fichier;répertoire;dossier;site;programme;logiciel;application;
                      Keywords[pt]=pesquisador;pesquisar;encontrar;localizar;ficheiros;pasta pessoal;diretório pessoal;aplicações;programas;internet;web;
                      Keywords[pt_BR]=pesquisador;pesquisar;encontrar;localizar;arquivos;pasta pessoal;diretório pessoal;programas; aplicativos;internet;web;
                      Keywords[ru]=

                      Since english is not my native language and my knowledge is too poor to represent complex things I use a translator.
                      These are known not to be perfect. If you translate one of my posts from german to english into other languages, the result will be worse and worse. Therefore, I post in both english and german, so that non english speaking users can have the german text translated directly into their language.

                      #122668
                      Member
                      PPC

                        The latest version, and very probably version 1.0 final, of this script.

                        -If no app is found, script searches the repo for packages containing the searched string and displays any results.
                        -IF only one app is found, he script runs that instantly, assuming it’s what the user wanted to run

                        Please, when you can, test this changes.

                        Note: this script is not meant to waste system resources sitting on a tray- it’s meant to be run either from a quick-launcher icon or keyboard shortcut, an run only when users need it.

                        EDIT: other than correcting any possible bug or mistake, I’m only thinking of changing the text that indicates application matches available on the repo, adding something like: “You can install that package from Package Installer, Synaptic or running, from the terminal, sudo apt install name_of_package.

                        P.

                        • This reply was modified 3 months, 3 weeks ago by PPC.
                        #122712
                        Member
                        Wallon

                          Dear PPC,

                          I tested (1) your beautiful program (V10) in a terminal to search for all my files with the “.txt” extension using a star “*” in front of the search criterion.
                          The search works but I get some rather strange messages. I’m attaching screenshots to show the messages in English.

                          For internet searches, isn’t it possible to use the default web browser defined in antiX?

                          Kind regards,
                          Wallon

                          (1) Tested with antiX 23 Full 64bits (sysvinit)

                          #122717
                          Member
                          PPC

                            Dear Wallon

                            1- Those messages are expected, when running the script from the terminal (most come from the part of the script that makes sure that only one Finder window is running).
                            2- Of course that you can use your preferred browser to perform internet searches: just open your browser and type what you want to find. This script is meant to provide the top results of your web search on a simple window, to avoid opening the browser (particularly useful on very old devices that struggle to run modern browsers). The default web browser only opens when users click any link that the search result provides.
                            If you wanted to search directly on your web browser, why would you want to use this GUI? It would be faster to just search in the browser, right? I can’t see any use case where this would be helpful… also antiX already comes with scripts that open the web browser directly in web search sites (like google, etc).

                            Edit: the web search functionality of this script, I use more to search for dictionary definitions, etc. In pt I type “dicionário [word_I_want_to_look_up]” to perform a quick search for that word. I can copy and paste the results.
                            This is not meant to be a one-to-one clone of the search function on Windows toolbar (that, as far as I know, opens a mini-browser window). The script just adds fast and easy search to antiX (and since I already was working on file search and application search, I thought about adding the simple web-search script, using DDGR that I had already created, some time before.) The script can be altered to, instead of running the web search script, open the default web browser, and searching for what you entered in the search box. The web search function would then be very simple, one line only, something like “desktop-defaults-run -b $query”

                            P.

                            • This reply was modified 3 months, 3 weeks ago by PPC.
                            • This reply was modified 3 months, 3 weeks ago by PPC.
                            #122726
                            Member
                            Wallon

                              Dear esteemed PPC,

                              I’m working on your file for localisation.
                              There are some things to change for gettext compatibility.
                              I may need your knowledge to confirm whether a command like “echo” displays a message on the screen or not, for example. If the message is sent to a text file, there’s no need to translate it obviously.

                              Kind regards,
                              Wallon

                              #122740
                              Member
                              PPC

                                @Wallon- When I can, I’ll try to provide my input on that. I tried very hard to mark all strings that require translation, but I’m only human, I may have missed some… I know I left some “echo” commands unmarked because they are just there to help understand the way the script works (since my bash coding is a bit messy”.

                                During my launch break I took a look at what exactly would be needed to just show the search results on the default web browser:

                                Just delete the contents of the web_finder () function and replace them with:

                                
                                web_finder()
                                {
                                #get user input
                                query=$(sed '1q;d' /tmp/yad| sed s'/.$//')
                                #If nothing was entered, exit the script
                                [[ -z "$query" ]] && { echo "Search parameter is empty, exiting" ; exit 1; }
                                #Perform the query on the default web browser:
                                desktop-defaults-run -b  "https://duckduckgo.com/html?q=$query"
                                	
                                }
                                

                                Edit: This is a perfect example of an echo command that does not require localization- it’s there to explain the logic of the entire line (to my self and to anyone else)

                                • This reply was modified 3 months, 3 weeks ago by PPC.
                                #122756
                                Member
                                Wallon

                                  Dear PPC,

                                  I’ve made good progress on the coding.
                                  It’s not just the marking of texts that needs to be done.
                                  Gettext doesn’t like to process text and variables together in the same string.
                                  That’s why developers should use the new gettext coding, but nobody does! Everyone continues to use the old $”text” encoding which is deprecated according to linux.
                                  I understood that you had put text to appear in a terminal to monitor the progress of the procedure and text to appear in a yad window.
                                  I recommend not translating the list of countries. It’s the death of translators if I do that…
                                  I’ve replaced the “x” button with the word “Exit” in English.
                                  I’m going to take a break.
                                  I need to check the exports to a po file and complete it in Portuguese to see what happens.
                                  After that, maybe tomorrow, I’ll post the new script finder on this thread. You can still make changes if you wish.

                                  Kind regards,
                                  Wallon

                                Viewing 15 posts - 31 through 45 (of 176 total)
                                • You must be logged in to reply to this topic.