You are not logged in.

#1 2016-10-02 11:45:36

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

pacmenu - Simple menu launcher that utilizes alpm data via expac

The idea of pacmenu was to have a menu/launcher that sees all "programs", i.e. executables, and create an applauncher/menu that is not depending on .desktop files. Currently the list is sorted alphabetically by package names, with their description.
Packages that don't have executables (in root's $PATH) are filtered out.

The script pipes its output to a generic menu application like dmenu. This is configurable.

Additional grouping à la xdg-menu could be desired, but probably not practical with dmenu. On the other hand, dmenu matches keywords anywhere in the short description, so typing e.g. "game" should list most, if not all, games.

After choosing a package, the script pops up another menu that shows a choice of all executables (if they are in root's $PATH).
After that:

    the chosen command is executed in a new terminal if the environment variable $TERMINAL is defined or the user specified one with the -t option
    the chosen command is executed directly otherwise

I still cannot think of a way to tell whether an application is a command line application that needs a terminal, or not.
solved! see post #3.

Requirements:
bash grep sed expac and a generic menu/launcher compatible with dmenu

git repo.

screenshot1 screenshot2 screenshot secondary menu

also see this previous discussion.

Last edited by ondoho (2018-06-22 01:35:05)

Offline

#2 2016-11-02 21:42:46

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: pacmenu - Simple menu launcher that utilizes alpm data via expac

this is a major rewrite, because the previous version was flawed - the first invocation would take ~20s on my system, subsequent invocations were near-instant.
therefore i re-introduced the cached menu file, and an alpm-hook to update the cache after every pacman install/upgrade/removal.
preliminary testing looks promising.
a simple install script is included, but an aur package is in the making.

Offline

#3 2016-11-08 07:50:27

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: pacmenu - Simple menu launcher that utilizes alpm data via expac

hmm.
looking around, i see that there's quite a few scripts/utilities to expand the standard dmenu_run.
That's a little disillusioning, but I still think that this one fills a gap (although the gap is smaller than i thought).
I also got inspired by dmenu-extended to solve the question of whether a command should be executed in a terminal or not: appending a ';' opens in a terminal, appending ';;' also executes the default shell afterwards, thus keeping the terminal open.

Offline

Board footer

Powered by FluxBB