new applauncher.py

Forum Forums antiX-development Development new applauncher.py

This topic contains 65 replies, has 7 voices, and was last updated by BobC Jul 24-11:47 pm.

Viewing 15 posts - 31 through 45 (of 66 total)
  • Author
    Posts
  • #24261
    Member
    manyroads
    manyroads

    I doubt any standard launchers are as resource light as the applauncher.py tool. However, I personally am much more interested in using tools that are broadly available (across platforms/ distros). I’m not so tight for resources that 20 or 50 or even several 100 MB make much difference. I’m one of those rich guys who spends a $25 to buy 8GB of RAM. ;^) The software I, personally, like to use employs standard off the shelf building blocks.

    I am happy to allow that others have priorities that differ from mine. I do have to note, however, that home grown software is not free… even if it does not use much RAM. There’s a lot of work that goes into making these things work (as you well know). Those this type of effort is laudable and almost certainly well synchronized with the overall direction of antiX, I thought it worth noting that there are standard tools out there, by the pound. FWIW Uauncher consumes just more than 50MB on antiX19b for me.

    • This reply was modified 3 months, 2 weeks ago by manyroads.
    • This reply was modified 3 months, 2 weeks ago by manyroads.

    Pax vobiscum,
    Mark Rabideau - http://many-roads.com
    bspwm MX-18.3 kernel: 5.2.15-antix.1-amd64-smp
    "For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken
    MX- antiX- BL- ArchLabs

    #24264
    Member
    Avatar
    BobC

    Manyroads, I wasn’t intending to cut it down, I just had troubles getting ulauncher to work. I saw on their site that someone else was asking the author to make changes for Debian packaging, and he was trying, but wasn’t familiar with Debian packaging, causing things like lack of man page, etc.

    At any rate, it doesn’t hurt to compare as long as you are thick skinned enough to see problems as opportunities.

    I’m glad to see anti is going to include it in 19b2, and with Debian Buster now released, I hope that 19b2 will be out soon.

    #24279
    Member
    manyroads
    manyroads

    @BobC I was in no way offended. As part of my bspwm exploration, I’m trying light launchers (care for a light launch???). ulauncher does seem to work wonderfully with bspwm. I had no problem building it on antiX19b1. Resource-wise it seems roughly on par with the applauncher that is being developed here. Functionality with ulauncher is quite exceptional. Stevo is going to look at making ulauncher available in the MX repos after the dust settles with MX Buster builds (another nice alliteration… Buster builds).

    I am a firm believer that there are never too many choices. There often seem to be to few good choices. I’ll certainly try the new antiX applauncher once I can get my grubby hands on it. ;^)

    In the meantime, I’m working on my bspwm ‘adventure’ along with chasing a bunch of previously existent folks down.

    Pax vobiscum,
    Mark Rabideau - http://many-roads.com
    bspwm MX-18.3 kernel: 5.2.15-antix.1-amd64-smp
    "For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken
    MX- antiX- BL- ArchLabs

    #24280
    Member
    Avatar
    BobC

    Glad to hear that… BTW, there was a topic on this a while back. ulaunch didn’t come up at the time.

    Quick search menus: Does anyone use dmenu? Alternatives?

    On page 2 Dave posted a link to the gitlab page. I just downloaded app-select, did a chmod +x app-select, then copied it to /usr/local/bin, added a keyboard shortcut (I think it should be the Primary menu pop-up instead of dmenu, which should now be the alternate, but just my opinion), then I saved it and restarted icewm, and it worked.

    ps: I looked at Bspwm but I prefer the flexible WM’s over tiling.

    #24281
    Member
    Avatar
    skidoo

    spoiler: wet blanket PSA

    .

    .

    .

    ulauncher brings:
    pip3

    You don’t need to look very hard, or very far, to learn “What could possibly go wrong, eh?
    TIL that Python’s pip is not curated, and anybody can publish code (malicious or otherwise)
    (reaching for a link to cite here, I found this reddit topic. It’s fresh, from literally one hour ago)

    ulauncher brings (via setup.py, within its root-permissioned, “debfile shaped” installer):
    nodejs

    The ulauncher app installs and runs a nodejs webserver daemon.
    If, for no other reason, to “talk to its extensions via websockets”.
    ^—– This stands as an example of “be careful what ya wish for (re: cross-platform, distro)”
    Toward embracing cross-platform -ness, the app foregoes use of native unix sockets.

    You wind up with a “Halloween candy, inevitably occasionally laced with razorblades” scenario.
    Said differently:
    “We learned nothing while suffering malware injected via eBuddy, winAmp, MSIE, et al
    so are doomed to repeating history as ageless kewlkid linux users”.

    a “webkit + nodejs + websockets + dbus IPC” app, capable of self-updating by downloading unvetted content from TBD arbitray locations…

    • This reply was modified 3 months, 2 weeks ago by skidoo.
    #24283
    Forum Admin
    Dave
    Dave

    The ulauncher app installs and runs a nodejs webserver daemon.
    If, for no other reason, to “talk to its extensions via websockets”.

    Yes I began to read the code to glean ideas from / see how others are doing things and came across the websocket stuff (Note: it is not the only one).
    have not actually read it enough to see the exact reasoning for it though…

    Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

    #24294
    Member
    Avatar
    BobC

    For future ref:

    1. Something I saw in ulauncher that I did like was the concept of having a history of what was run most recently pop up first before a search string was entered. Maybe those were also included in filtered search results.

    2. Another neat enhancement would be to stretch the ability of the launcher to opening files or URL’s. Ie: find files or recently used files and open them via xdg with whatever app was used before or correct. Maybe have radio buttons for what kinds of things to go find and include.

    I was trying to see where a list of recently opened “things” is, but didn’t find it.

    #24295
    Member
    Avatar
    skidoo

    I was trying to see where a list of recently opened “things” is

    locate recently-used.xbel

    Unless you are operating from within a walled-garden desktop environment, relying on that is hopeless ~~ it will always be woefully incomplete because many applications maintain their own individual “recent” list rather than the “wants to be a universal” list.

    history of what was run most recently pop up first

    yawn (oops, scusa) let’s just skip the small potatoes and do an implementation of recoll + pocketsphinx + mycroft ~~ PTT voice-activated command entry and search, with onscreen feeback providing insight into Jarvis’ learning paths. Oh, and blockchains! gotta have a blockchain…

    {insert joking smileycon glyph here}

    #24300
    Member
    Avatar
    BobC

    I recall having an OpenBox app that generated a dynamic pipe menu of recent documents that you could point to and click… I recall finding it (maybe on Crunchbang) and recreating it on another distro in 2013 or so.

    A mind is a terrible thing to waste…

    PS: You are right, Skidoo, keep it simple, let it do a great job at finding and launching applications, as we already have Spacefm file search to find and open files. I go overboard sometimes, LOL.

    • This reply was modified 3 months, 2 weeks ago by BobC.
    #24307
    Member
    Avatar
    PPC

    Hi! I just tested the new “applauncher”- the search runs just great! Now typing “Writer”- makes LibreOffice Writer come up!
    I noticed that running applauncher via cli in antiX 19b1 64 bits live (from HD) took about 3 seconds (before it seemed a bit faster… is it me? Or the delay has something to do with the more advanced search code?) and it ran fine, but displayed this message:
    “(app-select2:4190): dbind-WARNING **: 10:42:59.971: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files”.

    P.S.- I also tested in MX-linux 18.2 and it runs fine, but sometimes takes up to 30 seconds to start (on the same hardware)…???

    Final suggestion: if possible, use Skidoo’s GUI, it has a more modern look, not using “columns”, to display all the information about applications… and using a magnifying glass icon would look great instead of “search”… Having said that, even without those very minor gui “issues”: WOW… it looks fine and runs great! Does what’s it is supposed to do and does it extremely well- the search function helps both clueless and advanced users find applications and start them really fast… sometimes faster than using the cli…

    P.

    • This reply was modified 3 months, 2 weeks ago by PPC.
    #24310
    Member
    Avatar
    skidoo

    dbind-WARNING **: 10:42:59.971: Error retrieving accessibility bus

    This nuisance WARNING is not specific to the applauncher application.
    GTK libraries used by various programs emit this warning when a companion libatk* (or *atk*) “accessibility toolkit” library package is not present.

    On this machine I’m typing from, I might not see that warning ~~ quite a few atk libraries are present (due to the various programs which have been installed).
    edit:
    On this machine I’m typing from, I still see that warning ~~ even though quite a few atk libraries are present (due to the various programs which have been installed). I’m not motivated to chase down which specific package would silence the GTK warnings.

    .

    You can:

    1) safely ignore the warning, or

    2) silence the warning by adding a line to your .bashrc or .profile stating: export NO_AT_BRIDGE=1

    3) avoid the warning by installing one or more of the various tiny atk packages (disregard the -dev items seen in the screenshot above)

    • This reply was modified 3 months, 2 weeks ago by skidoo.
    #24312
    Member
    Avatar
    skidoo

    Upon seeing the initial prototype for this GUI, for me the most appealing feature was enabling users to discover the command or launchstring (Exec=) associated with a given “icon”. [Removing the remainder of this half-finished draft b/c it sounded negative. Go team!]

    • This reply was modified 3 months, 2 weeks ago by skidoo.
    #24315
    Forum Admin
    Dave
    Dave

    I noticed that running applauncher via cli in antiX 19b1 64 bits live (from HD) took about 3 seconds (before it seemed a bit faster… is it me? Or the delay has something to do with the more advanced search code?) and it ran fine

    This delay is caused by updates to how the icons are located.
    Previously was faster as the icons that failed the icon theme check it would just use the icon from the previously built item. (gufw for example had the wrong icon)
    So now for the items where the icon is not in the set icon theme, it checks if it is a hard set file path to the image file, checks if the image file is in the /usr/share/pixmaps folder, lastly and very crudely attempts to achieve the icon via the locate command (8/10 times successful, but takes the most time) If the icon is either blank/missing/could not be found it displays the no icon image) The startup time can probably be halved easily by removing the locate try and just use the no icon found.

    Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

    #24334
    Member
    Xecure
    Xecure

    Downloaded the most recent version from Dave’s gitlab. The new search function works very well. No longer searching the first line but all text inside all variables. Fantastic work!

    BobC, I expect the primary benefit from “testing” will come from wading through, attempting to launch, all (each of) the items.

    Done this for installed antiX-19b1 64 bits in VirtualBox.
    All apps listed launch by double clicking except for the ones reported to bugzilla (not applauncher’s fault but something wrong in the .desktop exec commands I believe – not confirmed), Reactivate HP Laserjet (I have no such printer?), Access Prompt (no idea if something should happen, I don’t know what this program does), and xkill which only launches when clicking Execute or hitting Enter, but not double clicking.
    All those that launch a terminal, do launch a terminal. My system is almost vanilla + updates (just installed app-finder to compare with this-one, inkscape to edit svgs, and fluxbox themes for testing).

    Some Apps appear many times with the same name (Archive Manager and, Text Editor). I propose that, if already in the list with the same appname, only save the first one.
    Also, some apps are missing.
    Missing Apps:
    – antiX User Manager
    – Personal Menu Help Video
    – Speaker test

    (Bug fixed)

    I would need some time to study python and gtk stuff, and try to help with this project more than I can right now. For future versions, I would like to try adding two extra tabs, one for “Recent Apps” and another for “Options” which would read/save from/to a configuration file (which in the future could be saved in ~/.conf/antiX-launcher-name/) that would give options:
    display-icons = true/false (if false, no icons are displayed and the script would change so it doesn’t waste time searching for icons, decreasing the time it takes for the .py app in first launch)
    save-icons = true/false (if true, and display-icons=true, on first launch it would save all paths to icons in a file named icon-path inside ~/.conf/antiX-launcher-name/ and, every time it launches, it would use this path for the icons instead of searching for them -> Improve consecutive first-launches in the future)
    exclude-apps = true/false (If true, a list of app-names in a file called exclude-list hosted in ~/.conf/antiX-launcher-name/ will be used to hide these apps from the list in the app).
    recent-apps-bool = true/false (If true, it would populate the “Recent Apps” tab with recently launched apps)
    recent-apps-amount = integer (I propose as BobC, maximum 50 – If Recent-apps-bool=true, It will generate and read/write from/to recent-apps file inside ~/.conf/antiX-launcher-name/ where the app-name of each app launched would be saved, placing at the top the most recent, and this info would populate the “Recent Apps” tab in such order, where the user can find and launch recent Apps) -> Very Very Future
    – custom-apps-path (under this “variable”, a list of paths will be saved, starting with /usr/share/applications/ there as default. All new paths added will be used by the script to search for .desktop files there and to add them to the app-launcher every time it launches.) Possibly, if they have the same app-name, only the first app found will appear in the App launcher, so the order in the path list will be very important.

    These are my ideas. They are complex to create and I don’t expect it to be easy or fast to implement. Right now, once the bugs are fixed, I believe this version in Dave’s gitlab could be considered v 1.0 and be ready for release. All other ideas are to be explored AFTER release, as our demands right now are too much (I know mine are). Hopefully I can contribute more in the near future when I have more time at hand.

    • This reply was modified 3 months, 1 week ago by Xecure. Reason: the bug was fixed
    #24339
    Forum Admin
    Dave
    Dave

    I recall having an OpenBox app that generated a dynamic pipe menu of recent documents that you could point to and click… I recall finding it (maybe on Crunchbang) and recreating it on another distro in 2013 or so.

    ]

    There used to be some that made a sub menu…. I remember modifying them and planned on having that as a switch/option in desktop-menu (which builds the applications menu). I have one still for fluxbox readily available as I on occasion use it in my fluxbox menu. The others are probably buried in my data partition or maybe on github,,,

    #!/bin/bash
    # Simple places script for your pekwm menu
    # Original iceplaces.sh 06.20.2013 by Nathan Fisher (nfisher dot sr at gmail)
    # Modified fbplaces.sh 07.27.2013 by David deJong (david@daveserver.info (david.dejong02@gmail.com))
    #
    #  This program is free software; you can redistribute it and/or modify
    #  it under the terms of the GNU General Public License as published by
    #  the Free Software Foundation; either version 2 of the License, or
    #  (at your option) any later version.
    #
    #  This program is distributed in the hope that it will be useful,
    #  but WITHOUT ANY WARRANTY; without even the implied warranty of
    #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    #  GNU General Public License for more details.
    #
    #  You should have received a copy of the GNU General Public License
    #  along with this program; if not, write to the Free Software
    #  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
    #  MA 02110-1301, USA.
    #
    
    DESKTOP_CODE=$(cat $HOME/.antix-session/desktop-code$DISPLAY);
    SESSION_FILE="$HOME/.antix-session/session.conf";
    BOOKMARK_FILE="$HOME/.gtk-bookmarks";
    SELF="fbplaces.sh > $HOME/.fluxbox/places";
    
    case $DESKTOP_CODE in
        rox-*)
            FILE_MANAGER="rox"
            ;;
        space-*)
            FILE_MANAGER="spacefm"
            ;;
        *)
            if [ -w "$SESSION_FILE" ] && grep -q "^Default-FM=" "$SESSION_FILE" ; then 
                FILE_MANAGER=<code>cat $SESSION_FILE |grep &quot;^Default-FM=&quot; |cut -d &quot;=&quot; -f2</code> 
            else
                FILE_MANAGER="rox-filer" &&
                touch $SESSION_FILE &&
                echo "#This is where the menu, toolbar, and control center file manager should be set" > $SESSION_FILE &&
                echo "Default-FM=$FILE_MANAGER" >> $SESSION_FILE 
            fi
            ;;
    esac
    echo $FILE_MANAGER;
    cat << EOF
    [exec] (Filesystem \\ ) {$FILE_MANAGER /} <drive-harddisk.png>
    [exec] (Filesystem \\ (As root\)) {gksu $FILE_MANAGER /} <drive-harddisk.png>
    [exec] (Filesystem ~\\ ) {$FILE_MANAGER $HOME} <drive-harddisk.png>
    [exec] (Refresh Files) {$SELF} </usr/share/icons/gnome/16x16/categories/file-manager.png>
    [separator]
    EOF
    
    if [ -w "$BOOKMARK_FILE" ] ; then  
      echo "[submenu] (Book Marked) </usr/share/icons/gnome/16x16/categories/file-manager.png>" 
      while read bookmark
      do
        SETNAME="$(echo $bookmark | cut -s -f 2- -d ' ')"
        if [ ! "$SETNAME" = "" ] ; then
          LABEL="$SETNAME"
          bookmark=$(echo $bookmark | cut -f 1 -d ' '|sed "s/file:\/\/\//\//ig")
        else
          LABEL="$(basename $bookmark)"
        fi
        echo "[exec] ($LABEL) {$FILE_MANAGER ${bookmark}} </usr/share/icons/gnome/16x16/categories/file-manager.png>" 
      done < $BOOKMARK_FILE
      echo "[end]" 
      echo "[exec] (Clear Bookmarks) {echo ''> ${HOME}/.gtk-bookmarks && $SELF} </usr/share/icons/gnome/16x16/categories/edit-clear.png>"
      echo "[separator]"
    fi
    
    echo "[submenu] (Recently Used) </usr/share/icons/gnome/16x16/categories/editor.png>" 
    for uri in $(grep "href=\"file" ${HOME}/.local/share/recently-used.xbel | tail -n 10 | cut -f 2 -d '"' | sed 's%file://%%') ; do
     if [ -f "${uri}" ]; then
      echo -n "[exec] ($(basename ${uri}))"  
     else
      echo -n "[exec] (* $(basename ${uri}))" 
     fi
     echo " {$FILE_MANAGER ${uri}} </usr/share/icons/gnome/16x16/categories/editor.png>" 
    done
    echo "[end]" 
    
    cat << EOF
    [exec] (Clear Recent Documents) {echo '' > ${HOME}/.local/share/recently-used.xbel && $SELF} </usr/share/icons/gnome/16x16/categories/edit-clear.png>
    [separator]
    EOF
    

    Edit:
    LOL it must have been a while since I last used it 😛
    Looking at the code I am doubtful that it will work straight away.

    • This reply was modified 3 months, 2 weeks ago by Dave.

    Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

Viewing 15 posts - 31 through 45 (of 66 total)

You must be logged in to reply to this topic.