Re: [dev] [Announce] Desktop Entry Launcher

From: Jan Christoph Ebersbach <>
Date: Sat, 11 Feb 2017 14:03:18 +0100

Hi Eric,

Thanks for sharing! I recently thought about creating a similar tool
that would enhance dex ( which I use to
autostart programs during dwm launch. del works graet for me!

The one thing I noticed is that I couldn't get del to work at first
because it was messing the .del file in $HOME.

del: open: /home/jceb/.del: No such file or directory
del: dmenu died with exit status 1

It took a while until I figured out that "del -r" would create the
missing file.

Jan Christoph

On Mon 06-02-2017 23:10 -0800, Eric Pruitt wrote:

> I use dmenu to run programs, but I did not like that dmenu_run
> included every single program included those without GUIs. I
> maintained a list of programs manually, then I wrote a script to
> generate the list based on whether or not a binary linked to GUI
> libraries. Recently, I wrote a C program that uses nftw(3) to find
> [desktop entry files][1], parses them and adds them to a list saved at
> ~/.del by default. The source is here:
> . I
> believe it is POSIX compliant, and I was able to compile it on Linux,
> OpenBSD and FreeBSD.
> [1]:
> Here's the usage information:
> DEL searches for Freedesktop Desktop Entries, generates a list of
> graphical commands and uses dmenu as a front-end so the user can
> select a command to execute.
> Exit statuses:
> 1 Fatal error encountered.
> 2 Non-fatal error encountered.
> > 128 The dmenu subprocess was killed by a signal.
> Options:
> -h Show this text and exit.
> -f PATH Use specified file as the command list. When this is
> unspecified, it defaults to ~/.del
> -r Search for desktop entries to refresh the command list.
> Trailing command line parameters are interpreted as folders to be
> searched. Folders on different devices must be explicitly
> enumerated because the search will not automatically cross
> filesystem boundaries; in terms
> of find(1), the search is equivalent to the following: find
> $ARGUMENTS -xdev -name '*.desktop' When no paths are given,
> "/" is searched by default. A newline-separated list of
> programs can be fed to del via stdin to include programs
> that do not have desktop entries in the generated launcher
> list. The programs must exist in $PATH or they will be
> silently ignored.
> When "-r" is not specified, dmenu is launched with the command list
> feed into standard input. Trailing command line arguments can be used
> to pass flags to dmenu or use a different menu altogether:
> Set the background color of selected text to red: $ del -- -sb
> "#ff0000"
> Use rofi in dmenu mode instead of dmenu: $ del rofi -dmenu
> Please let me know what you think.
> Thanks, Eric

Jan Christoph Ebersbach
I didn’t want some petty, inferior brand of righteousness that comes
from keeping a list of rules when I could get the robust kind that comes
from trusting Christ - God’s righteousness.  Phil 3:9

Received on Sat Feb 11 2017 - 14:03:18 CET

This archive was generated by hypermail 2.3.0 : Sat Feb 11 2017 - 14:12:14 CET