Home

Awesome

bemenu

Dynamic menu library and client program inspired by dmenu

preview

Releases

Releases are signed with 29317348D687B86B and published on GitHub.

Building

# Build everything
make

# To build only certain features, pass the targets which you are interested into
#
# You can also use the following meta-targets for common features:
# - clients (bemenu, bemenu-run)
# - x11
# - wayland
# - curses
#
# For example this would build the bemenu and bemenu-run binaries and the x11 backend:
make clients x11

# To install the built features, simply run:
make install

# NOTE: You may get errors during install when not building all the features.
#       These errors are free to ignore if `Install OK!` is printed.

# By default that will install to /usr/local, but you can change this with PREFIX
make install PREFIX=/usr

# Other usual variables are available for modifying such as DESTDIR, bindir, libdir and mandir
# Note that if you want a custom PREFIX or libdir, you should pass those during build as well,
# since they will be used compile-time to figure out where to load backends from!

# HTML API documentation (requires doxygen installed):
make doxygen

# To test from source, you have to point the LD_LIBRARY_PATH and BEMENU_RENDERERS variables:
LD_LIBRARY_PATH=. BEMENU_RENDERERS=. ./bemenu-run

OSX

Homebrew

# Make sure you have GNU Make and pkg-config installed
brew install make pkg-config

# You may need to setup your pkg-config to point to the brew version of the libraries
# For example to build curses backend, you'd do:
PKG_CONFIG_PATH="/usr/local/opt/ncurses/lib/pkgconfig" sh build-osx.sh curses

# Other than that, follow the normal build steps, but use `build-osx.sh` instead of make

Nix

There is default.nix provided in this repo, you can install bemenu with it by running

nix-env -i -f default.nix

This installs only the curses backend.

Dependencies

Backend-specific

All dependencies below are searched with pkg-config

BackendDependencies
cursesncursesw
x11x11, xinerama, cairo, pango, pangocairo
Waylandwayland-client, wayland-protocols, cairo, pango, pangocairo, xkbcommon

Currently, pasting from clipboard is done at runtime with wl-paste and xclip, attempted in that order.

Installing the dependencies

Ubuntu 20.04

sudo apt install scdoc wayland-protocols libcairo-dev libpango1.0-dev libxkbcommon-dev libwayland-dev

Environment variables

VariableDescriptionValue
BEMENU_OPTSOptions for bemenu, bemenu-run from envAny cli argument
BEMENU_BACKENDForce backend by namex11, wayland, curses
BEMENU_RENDERERForce backend by loading a .so filePath to the .so file
BEMENU_RENDERERSOverride the backend search pathPath to a directory
BEMENU_SCALEOverride the rendering scale factorFloat value

About Wayland support

Wayland is only supported by compositors that implement the wlr-layer-shell protocol. Typically wlroots-based compositors.

Keybindings

Default Bindings

KeyBinding
Left ArrowMove cursor left
Right ArrowMove cursor right
Up ArrowMove to previous item
Down ArrowMove to next item
Shift + Left ArrowSelect previous item
Shift + Right ArrowSelect next item
Shift + Alt + <Select first item in actual list
Shift + Alt + >Select last item in actual list
Shift + Page UpSelect first item in actual list
Shift + Page DownSelect last item in actual list
Page UpSelect first item in displayed list
Page DownSelect last item in displayed list
TabMove to next item
Shift + TabSelect item and place it in filter
EscExit bemenu
InsertReturn filter text or selected items if multi selection
Shift + ReturnReturn filter text or selected items if multi selection
ReturnExecute selected item
HomeCurses cursor set to 0
EndCursor set to end of filter text
BackspaceDelete character at cursor
DeleteDelete character at cursor
Delete LeftDelete text before cursor
Delete RightDelete text after cursor
Word DeleteDelete all text in filter
Alt + vSelect last item in displayed list
Alt + jSelect next item
Alt + dSelect last item in display list
Alt + lSelect previous item
Alt + fSelect next item
Alt + 0-9Execute selected item with custom exit code
Ctrl + ReturnSelect item but don't quit to select multiple items
Ctrl + gExit bemenu
Ctrl + nSelect next item
Ctrl + pSelect previous item
Ctrl + aMove cursor to beginning of text in filter
Ctrl + eMove cursor to end of text in filter
Ctrl + hDelete character at cursor
Ctrl + uKill text behind cursor
Ctrl + kKill text after cursor
Ctrl + wKill all text in filter
Ctrl + mExecute selected item
Ctrl + yPaste clipboard

Vim Bindings

Vim bindings can be activated via the --binding vim option. All bindings are in vim normal mode. When bemenu is started with vim bindings it will be in insert mode. By pressing escape, normal mode can be activated.

Note: The default bindings can still be used for actions that do not have a separate vim binding such as launching a program or pasting.

KeyBinding
j/nGoto next item
k/pGoto previous item
hMove cursor left
lMove cursor right
qQuit bemenu
vToggle item selection
iEnter insert mode
IMove to line start and enter insert mode
aMove to the right and enter insert mode
AMove to line end and enter insert mode
wMove a word
bMove a word backwards
eMove to end of word
xDelete a character
XDelete a character before the cursor
0Move to line start
$Move to line end
ggGoto first item
GGoto last item
HGoto first item in view
MGoto middle item in view
LGoto last item in view
FScroll one page of items down
BScroll one page of items up
ddDelete the whole line
dwDelete a word
dbDelete a word backwards
d0Delete to start of line
d$Delete to end of line
ccChange the whole line
cwChange a word
cbChange a word backwards
c0Change to start of line
c$Change to end of line

Projects using bemenu

License