A fast desktop menu
j4-dmenu-desktop is a fast desktop menu using dmenu (or compatible programs).
It scans .desktop files in $XDG_DATA_HOME and $XDG_DATA_DIRS, providing a menu
for launching applications.
It is inspired by i3-dmenu-desktop. Like i3-dmenu-desktop, j4-dmenu-desktop offers optional integration with i3wm and Sway (but j4-dmenu-desktop should work just fine on about any desktop environment).
You can also execute shell commands using it.
https://github.com/user-attachments/assets/311779a5-4ebf-41db-b942-cb90747649f9
--wait-on which parses desktop files ahead of time--usage-logBuilding with Meson:
./meson-setup.sh build
cd build
meson compile
sudo meson installBuilding with CMake:
mkdir build
cd build
cmake ..
make j4-dmenu-desktop
sudo make installSee BUILDING for more info.
The package is provided in the Arch Linux extra repository. You can install it via
sudo pacman -S j4-dmenu-desktopj4-dmenu-desktop is now available in the FreeBSD Ports Collection. A prebuilt package can be installed via
pkg install j4-dmenu-desktopj4-dmenu-desktop is available in Portage for the amd64 and x86 architectures. You can install it via
echo "x11-misc/j4-dmenu-desktop ~amd64 ~x86" >> /etc/portage/package.accept_keywords
emerge --ask x11-misc/j4-dmenu-desktopThe package is also provided by the gentoo-el overlay. You can install it with the following commands as root. (you need to have layman installed and configured)
layman -a gentoo-el
echo "=x11-misc/j4-dmenu-desktop-9999 **" >> /etc/portage/package.accept_keywords
emerge x11-misc/j4-dmenu-desktopThe package is now in the apt repository. You can install it via
sudo apt-get install j4-dmenu-desktopj4-dmenu-desktop is in Debian stable:
sudo apt install j4-dmenu-desktopj4-dmenu-desktop is in nixpkgs:
nix-env --install j4-dmenu-desktop
# Or use pkgs attribute of the same name in NixOS configurationj4-dmenu-desktop is packaged in Void Linux:
sudo xbps-install -S j4-dmenu-desktopThis package is maintained my me, meator. As a collaborator of j4-dmenu-desktop and an active Void Linux user, I ensure a higher standard of quality for this package. This package is officially supported, feel free to open issues or ask for support related to the Void Linux package here.
Run j4-dmenu-desktop:
j4-dmenu-desktopSpecify custom dmenu (useful on Wayland, tofi is used as example):
j4-dmenu-desktop --dmenu=tofiDisplay 5 entries vertically at once:
j4-dmenu-desktop --dmenu="dmenu -l5"display binary name alongside name (for example Chromium will become Chromium (/usr/bin/chromium)):
j4-dmenu-desktop --display-binaryDon't display generic names and use alacritty as terminal emulator:
j4-dmenu-desktop --no-generic --term alacrittyEnable I3/Sway IPC mode:
j4-dmenu-desktop --i3-ipcYou can put this in a script file and use it instead of calling j4dd directly:
j4-dmenu-desktop --dmenu="(cat ; (stest -flx $(echo $PATH | tr : ' ') | sort -u)) | dmenu"Exchanging the cat and (stest ... sort -u) parts will swap the two parts (j4dd's output and the list of binaries).
% time i3-dmenu-desktop --dmenu="cat"
[{"success":true}]
i3-dmenu-desktop --dmenu="cat" 0.37s user 0.02s system 96% cpu 0.404 total
% time ./j4-dmenu-desktop --dmenu=cat
./j4-dmenu-desktop --dmenu=cat 0.01s user 0.01s system 107% cpu 0.015 totalMore than 25 times faster :)
[^1]: Some minor features like handling of TryExec
key are missing.
If there are any problems with compliance to the Desktop entry
specification, please submit an
issue.
No open issues yet, or sync has not completed.