Skip to content

AlxHnr/dlaunch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A dmenu wrapper which allows you to search trough various sources provided by plugins. It will learn what you use the most and presort the search results accordingly. Dlaunch can be extended by plugins written in Scheme. You can find some of my plugins here. If you want to write your own plugins, take a look at this tutorial.

screenshot.png

Here is a more customized dlaunch, which searches trough the home-files source:

screenshot-home-files.png

Requirements and installation

Note: Gentoo users can install dlaunch directly from my overlay.

Dlaunch depends on:

After cloning this repository, you must chdir into it. Now you have two options: a system wide, or a local installation.

A system wide installation is the default. Dlaunch will be installed to /usr/local, unless you set INSTALL_PREFIX to another path.

For a local installation you must set the variable INSTALL_PREFIX to your local installation path, which is usually ~/.local/.

Now you can build and install dlaunch with the following commands:

make
make install # Eventually this command must be executed as root.

Please mind that INSTALL_PREFIX must be set before you build dlaunch.

Uninstalling dlaunch

First you need to ensure, that INSTALL_PREFIX is setup exactly like during installation. Then simply run make uninstall from inside dlaunch's source directory.

Dlaunch and its plugins create various files in your home directory for caching, storing settings and other things. To get rid of them, just run:

# Wipe dlaunch's cache:
rm -rf "$HOME/.cache/dlaunch/"

# Wipe dlaunch's metadata, scores, rankings, etc:
rm -rf "$HOME/.local/share/dlaunch/"

# Remove all plugins and settings:
rm -rf "$HOME/.config/dlaunch/"

Please mind that all these paths may differ on your System.

Usage

Note: Dlaunch itself doesn't provide any content to search in. For this you must install a plugin, which provides a source.

After successful installation you can run it by executing dlaunch from your shell. All command line arguments are passed directly to dmenu. The only exception are the following arguments, which are handled by dlaunch directly:

--sources=NAMES

Comma separated source names which specify in which sources dlaunch should search.

Example:

dlaunch --sources=home-files,user-cmd

--compile

Builds all plugins and exits. You don't need to call this manually, since dlaunch will recompile all plugins after modification automatically.

--help

Shows a short summary about all available commands and exits.

Configuring dlaunch

There isn't much to configure in dlaunch. The file ~/.config/dlaunch/dmenu-args.scm contains quoted strings, which will be passed to dmenu. Please mind that this path may be different on your system.

Here is an example:

; Enable case insensitive search:
"-i"

; Make dmenu appear at the bottom of the screen:
"-b"

; Set a nicer font:
"-fn" "xft:DejaVu Sans Mono:pixelsize=13"

; Green colors like in the screenshot above:
"-nb" "#181818" "-nf" "#BCBCBC"
"-sb" "#4C7523" "-sf" "#DEDEDE"

For more informations, see the manpage of dmenu.

Plugins

Dlaunch can be extended by writing plugins. A dlaunch plugin is a simple Scheme script, which will be loaded at runtime. To install a plugin, just throw its source file into the plugin directory. On most systems this is ~/.config/dlaunch/plugins/.

License

Released under the zlib license.