You are not logged in.

#1 2016-05-20 13:54:07

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Higgins, yet another application launcher.

Hi there,
I just ended coding yet another application launcher, it's called... higgins!
I know there are many out there, but i did not found any that does all i need; and plus i like coding, so here it is:
yeGNvPG.png

Through the hardcoded plugins, it is able to:
* Evaluate expressions (do calculations...)
* Find/start desktop applications in standard and customized paths
* Start executables from system path with or without terminal emulator
* List the content of folders
* Search through recent documents (kde and gtk)
* Search through local bookmarks (kde and gtk)
* Index and find files from user defined folders

..but what it does which i didn't found in any other launcher, is the ability to use external plugins written in virtually any existing language.
This is possible because higgins starts them as normal executables and then parses their output.
For example, the example plugin provided: External_plugin_kill.sh, is able to list running processes and kill them by selection.
The only thing higgins requires is that the plugin outputs some text in the following format:

BEGIN
Text=Text to show
SubText=Text to show under... Text
Image_file=an image to show
Clipboard_data=what to copy to the clipboard?
Action=what to do when activating an item?
Action_p=Do action requires a parameter?
END
BEGIN
[..]
END

...that way anyone can write his own plugin with little effort!

Actually, higgins requires xbindkeys to register a global hotkey used to hide and show the main window.
Also it is written and requires gambas3.

Package on AUR
Source on github

Have fun!


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#2 2016-05-26 10:52:51

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Higgins, yet another application launcher.

Sounds interesting, but I installed from AUR and immediately see a dialogue with the following:

This application has raised an unexpected
error and must abort.

[45] File or directory does not exist.
FMain.Form_Open.995

Offline

#3 2016-05-27 06:51:00

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: Higgins, yet another application launcher.

Thanks for reporting; you're right and i just fixed that.
Please, try again to install from aur.

Last edited by kokoko3k (2016-05-27 06:52:18)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#4 2016-05-27 07:30:48

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Higgins, yet another application launcher.

Installed correctly. The first time it ran the configure dialogue never showed up, so I couldn't set the launch key combo. I deleted the configuration in .config/gambas3 and tried again and it worked.
It isn't anywhere near ready enough for me to switch to (recently I've been trying out albert instead of synapse, which I've used for years), but I love the concept for plugins and I see the potential. I've thought many times before about writing my own launcher because I can't say any are what I really want, so hats off to you for actually doing it.

Offline

#5 2016-05-27 10:22:12

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: Higgins, yet another application launcher.

I'll investigate the missing configuration dialog on the first start issue.
It was probably due to the first crash you had.
Anyway, i'm really open to suggestions; why do you think it is not ready for use (apart from the crash, of course)?


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#6 2016-05-27 10:33:53

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Higgins, yet another application launcher.

Perhaps I was a bit too negative - looking again it is mostly a matter of polish, which I am sure you'll have sorted before long.

Most icons don't seem to show, I've tried changing the icon theme in the configuration.
A menu appears on right click, and choosing the items in the menu results in error dialogues - I am guessing the menu shouldn't appear at all?
It would be nice if the window was undecorated, but that is purely aesthetic preference.

I think the initial problem I had on launch started me off expecting problems, and so I saw them as bigger than they were wink

I really, really do love how you've done plugins though. Plugins were my major annoyance with synapse for all these years.

Offline

#7 2016-05-27 11:46:27

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: Higgins, yet another application launcher.

Ok, I just fixed the menu issue.
And about the undecorated window, now higgins has a new commandline option:

Options:
 -u --undecorated                       Tell the Window manager to not draw window decoration
 -V --version                           Display version
 -h --help                              Display this help

The thing on my ToDo list is support for themes, but is a big work.

About the missing icons, what icons exactly are you speaking about?
it is strange, I think i have all of the icons displayed, what's your DE (if any) and icon theme?

Last edited by kokoko3k (2016-05-27 11:50:20)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#8 2016-05-27 12:23:59

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Higgins, yet another application launcher.

I use openbox. Icons seem to be working now I've installed the new version and restarted.
Undecorated is great now, thanks for that. I think I will give it a go as my main launcher for a few days.

One strange issue - after building and installing the new version, the first launch crashed again. Launching again worked fine (and because there was already a configuration from the old version, it didn't matter).

Offline

#9 2016-05-27 12:40:36

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Higgins, yet another application launcher.

It would be nice if the command text cleared when the launcher hides (so that it is fresh and ready when I bring it up again).
At the moment, if I open higgins, start typing a command, then change my mind and hit escape, when I open it again the half-written command is still there.

It would also be nice if it would disappear when I click another window, rather than staying on top of everything.

Offline

#10 2016-05-27 13:00:04

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: Higgins, yet another application launcher.

At the moment, if I open higgins, start typing a command, then change my mind and hit escape, when I open it again the half-written command is still there.

True, your previous search is preserved; this is expected and wanted, but it is not obivious
Let me explain with the following use case:
User wants to check multiple items, so he search for something and "start" the first result; then he need to check the second item; so he starts higgins again and finds his previous search already typed; now it just needs to press the arrow down key, and the previous items will popup (sparing cpu cycles needed to search for them again and more typing).

It would be nice if the command text cleared when the launcher hides (so that it is fresh and ready when I bring it up again).

It should already be "fresh and ready"; the previous typed text should be "auto-selected" so that you can start typing overwriting it.
If it is not selected, then is a bug.

Given that the text is auto-selected, the only concern i could think of is about privacy and i could add another commandline option to avoid that behaviour.

It would also be nice if it would disappear when I click another window, rather than staying on top of everything.

Definitely, i'll see if it can be done.

-EDIT-
It seems that the lost_focus event isnt' working as expected; while i sort it out; pressing the shortcut again (or ESC) will hide higgins.

One strange issue - after building and installing the new version, the first launch crashed again. Launching again worked fine (and because there was already a configuration from the old version, it didn't matter).

Maybe the old instance wasn't terminated? (if you start higgins multiple times, it just "raises" the already running instance.)
The only way to quit higgins is by using the tray icon OR right click and select quit.


parchd wrote:

I use openbox. Icons seem to be working now I've installed the new version and restarted.
Undecorated is great now, thanks for that. I think I will give it a go as my main launcher for a few days.

Glad to help, if you manage to write some useful plugins, it would be great to share them :-)

Last edited by kokoko3k (2016-05-27 13:13:55)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#11 2016-05-27 13:30:58

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Higgins, yet another application launcher.

kokoko3k wrote:

It should already be "fresh and ready"; the previous typed text should be "auto-selected" so that you can start typing overwriting it.
If it is not selected, then is a bug.

In that case, it is a bug - at least for me it isn't selected. If I start typing, it prepends to what is already there.

Maybe the old instance wasn't terminated? (if you start higgins multiple times, it just "raises" the already running instance.)
The only way to quit higgins is by using the tray icon OR right click and select quit.

I had already quit higgins with ctrl+c (I'd started it in a terminal because I haven't rebooted since installing it), so it was definitely dead as confirmed by me not being able to launch things.

Glad to help, if you manage to write some useful plugins, it would be great to share them :-)

I was about to ask a question about plugins, I am trying to write my first one... in a plugin, how do I say "execute this in the users preferred terminal"?

Offline

#12 2016-05-27 14:37:54

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: Higgins, yet another application launcher.

parchd wrote:

In that case, it is a bug - at least for me it isn't selected. If I start typing, it prepends to what is already there.

Tha'ts really an odd behaviour, i'll double check at home if my netbook running lxde+openbox behaves that way.

I was about to ask a question about plugins, I am trying to write my first one... in a plugin, how do I say "execute this in the users preferred terminal"?

It was a missing feature, but i just added it so you need to install higgins again from aur:
Use something like (shell script snippet following):

[..]
echo Action="EXEC_TERMINAL"
echo Action_p="$executable_file"
[..]

It would use the one configured in the main higgins configuration or (if not configured) search for the more common ones.
If you need other directions, please check the Template plugin (below "Public Struct rItemT"), it briefly describes the "mini-API" used by internal plugins, which is the same for external ones.



Weekend time now; I can firther assist you, but probably i will not be able to change anything in the code before monday smile

Last edited by kokoko3k (2016-05-27 14:45:18)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#13 2016-05-27 14:44:31

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Higgins, yet another application launcher.

Thanks kokoko3k - I noticed you'd added the feature when I was looking at the template a few minutes ago.
My plugin correctly creates entries in higgins, but so far it won't launch anything. Not sure why yet.

Offline

#14 2016-05-27 14:48:29

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: Higgins, yet another application launcher.

Can't say why; here there is the modified locate plugin (mlocate package and updatedb issued are needed) which executes files in the terminal ; it is working here, just tested;
http://pastebin.com/f6AMaWSq
Ex: search for "l:/usr/bin/htop"


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#15 2016-05-27 14:50:21

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Higgins, yet another application launcher.

I worked it out - I mistakenly thought that the Action and Action_p arguments were supposed to be quoted.

Offline

#16 2016-05-27 15:06:14

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Higgins, yet another application launcher.

SSH plugin for higgins - bit rough round the edges, haven't touched perl for over 5 years, and even then I really only tweaked old code.
Decided to use this as a chance to revisit it.

It would be nicer with ssh related icons, but I havne't worked out that part yet.

#!/usr/bin/env perl

# ssh.pl
# Plugin for higgins ssh to server
# trigger with ssh:
# Created by parchd, 2016-05-27

sub pitem {
        my ($t, $st) = @_;
        print("BEGIN\n");
        print "Text=$t\n";
        print("SubText=$st\n") if $st;
        print("Action=EXEC_TERMINAL\n");
        print("Action_p=ssh $t\n");
        print("END\n");
}


if($ARGV[0] =~ /^ssh:(.*)/){

        if($1){
                pitem($1);
        }

        open(HOSTS, "$ENV{HOME}/.ssh/known_hosts") or die($!);
        $query = $1 || ".";

        while(<HOSTS>){
                /^([^, |]+)?,?([0-9\.]+)? /;
                $x = $1;
                $y = $2;

                if (($1 =~ /$query/) or ($2 =~ /$query/)){
                        pitem($x,$y);
                }
        }

        close(HOSTS);
}
~                        

Last edited by parchd (2016-05-29 11:38:59)

Offline

#17 2016-05-28 05:36:51

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: Higgins, yet another application launcher.

I think is better to parse /etc/hosts instead, my ~/.ssh/known_hosts looks like this:

[..]
|1|058XQjBcK4VVwM1jbBkfu6dkTyQ=|MTzCUTG7ZcgKwUgWI= ecdsa-sha2-nistp256 AAAAE5VjZHNhLXNpYTItbCUTYAAAAIbulzdHAyNTYAAABBBMio6xuPigGYU9snnNU2t9LuRoh+nAh+Zg2W47Cl9x/c85cCUT6L2xw2x1wsneR35ZqTHmM9a1DI=
[..]

Last edited by kokoko3k (2016-05-28 05:37:29)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#18 2016-05-28 07:26:42

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Higgins, yet another application launcher.

Do you get bad entries in higgins from your known_hosts file? I can change the regex if you do. I think known_hosts makes more sense overall because it contains the machines that have been connected to by ssh before, whereas hosts on most my machines is empty apart from localhost.

As a feature request, once you've sorted out the text not being selected on reshow (which is driving me mad!), could you make it so applications have priority in the results list? Every time I type I type a program name and hit return I end up opening long forgotten text files that have been indexed. <- just realised that this is already possible! (edit2)

Edit:

A very quick search led me to this:

http://unix.stackexchange.com/questions … hosts-file

so I suppose my ssh plugin is only relevant to people who don't set HashKnownHosts.

I'd still prefer to leave it looking in known_hosts than /etc/hosts - although I'd have nothing against looking in both if you think it is worth it?

Last edited by parchd (2016-05-28 07:55:44)

Offline

#19 2016-05-28 15:54:35

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: Higgins, yet another application launcher.

Yep, i've weird entries in higgins, so maybe changing the regex is required; also looking at the hosts file too may come handy.

once you've sorted out the text not being selected on reshow

I'm really lost on that, because i cannot reproduce your issue; tried on openbox+lxde and automatic text selection still works.
A shot in the dark... what's your shortcut?


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#20 2016-05-28 19:17:23

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Higgins, yet another application launcher.

ctrl+space is my shortcut

just tried some other shortcuts - no help. I run openbox just as it is, maybe you could give it a go?

Having Higgins in my autostart seems to crash my session from time to time on login, too - not sure why yet though.

Last edited by parchd (2016-05-28 19:20:00)

Offline

#21 2016-05-29 11:40:47

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Higgins, yet another application launcher.

I've edited the regex in the code above - a single character change was enough to stop hashed known_hosts from showing up.
I might change it to look in /etc/hosts at some point, but as it really isn't interesting to me to do that please excuse me not bothering at the moment.

I'll share any other plugins I come up with.

Offline

#22 2016-05-30 11:07:00

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: Higgins, yet another application launcher.

About the non-selected text, I've to ask: is there any chance that your gambas is not updated?


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#23 2016-05-30 11:26:12

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Higgins, yet another application launcher.

As far as I can see from checkupdates, there are no updates available for any of the gambas packages I've got installed... perhaps there is a dependency missing in the PKGBUILD?

community/gambas3-devel 3.8.4-3 (gambas3) [installed]
community/gambas3-gb-args 3.8.4-3 (gambas3) [installed]
community/gambas3-gb-dbus 3.8.4-3 (gambas3) [installed]
community/gambas3-gb-desktop 3.8.4-3 (gambas3) [installed]
community/gambas3-gb-desktop-x11 3.8.4-3 (gambas3) [installed]
community/gambas3-gb-form 3.8.4-3 (gambas3) [installed]
community/gambas3-gb-form-stock 3.8.4-3 (gambas3) [installed]
community/gambas3-gb-image 3.8.4-3 (gambas3) [installed]
community/gambas3-gb-net 3.8.4-3 (gambas3) [installed]
community/gambas3-gb-qt4 3.8.4-3 (gambas3) [installed]
community/gambas3-gb-settings 3.8.4-3 (gambas3) [installed]
community/gambas3-gb-web 3.8.4-3 (gambas3) [installed]
community/gambas3-runtime 3.8.4-3 (gambas3) [installed]

Offline

#24 2016-05-30 11:34:31

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: Higgins, yet another application launcher.

Nope, it is fine.
I just noticed that textselection works in a weird way and i just pushed some workarounds, please try them.

-EDIT-
About your issue with "session crashing"; i suspect it may depends on the tray icon.
Does your environment provide a tray?

-EDIT-
I also pushed another change that should workaround the missing LostFocus() event, now the main window should hide when it looses focus, and another option, "-p --persistent", reverts to the old behaviour.

Last edited by kokoko3k (2016-05-30 11:51:12)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#25 2016-05-30 12:19:11

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Higgins, yet another application launcher.

kokoko3k wrote:

Nope, it is fine.
I just noticed that textselection works in a weird way and i just pushed some workarounds, please try them.

It seems to work most of the time now, but sometimes it still doesn't focus.
Worse, though, a new bug has been introduced. I can no longer access anything but the top result. If I press the down arrow, higgins hides.


kokoko3k wrote:

About your issue with "session crashing"; i suspect it may depends on the tray icon.
Does your environment provide a tray?

I've never had any need or interest in a tray, so no I haven't got one. That could well be it.
I'm curious, what is the point of a tray icon for something like higgins?


kokoko3k wrote:

I also pushed another change that should workaround the missing LostFocus() event, now the main window should hide when it looses focus, and another option, "-p --persistent", reverts to the old behaviour.

Cool smile Thanks!

Offline

Board footer

Powered by FluxBB