Fix: avoid exporting giant envvars
Fix: launch foot with "launcher" app id
Add terminal option: foot
A replacement for Rofi, dmenu, and other launchers that uses FZF and a plain-old terminal emulator.
I recommend altering these scripts to suit your preferences.
The main script is
term-dmenu and its dependency
is a dmenu replacement that turns stdin into an interactive menu and sends output
back to stdout. In other words, if you don't use any of dmenu's CLI options, you can
alias dmenu=term-dmenu and you'll be just fine.
Helper scripts work with
term-dmenu. If you set the environment variable
$DMENU_PROGRAM to something else (e.g.
rofi -dmenu), the helper
scripts will use those programs instead.
dmenu-runnercan run any executable in your
$PATH. Because of the large number of executables on most systems, recent entries are saved and prioritized to make searching easier.
app-launcherlaunches desktop applications using
window-switcherallows listing/filtering/selecting open windows in Sway or i3 (much like what Alt+TAB does on most desktop environments).
window-switcherrequires Sway or i3 to be running
If you don't want to use
term-dmenu but would like to use some of the helper
Other projects attempting to replace dmenu/rofi with terminal emulators exist, most notably sway-launcher-desktop. I created my own project instead of contributing upstream because I had different goals:
term-dmenu, and make helper scripts work with dmenu, rofi, and term-dmenu equally well.
dash(the Debian Almquist shell) should yield faster startup speed.
j4-dmenu-desktopto find .desktop files, which is better than using shell/AWK expressions.
floating-terminallaunches the terminal. If the environment variable
$FLOATING_TERMINALis unset, it runs the first of the following programs that is found in
alacritty --class=launcher -e $@
kitty --class=launcher -e $@
konsole -e $@
gnome-terminal -e $@
termite -e $@
st -c launcher -e $@
xterm -e $@
dmenu-runner code is based on this
by FlyingWombat (Wayback
archive.today), with inspiration from
Many bits of code were borrowed from the discussion in issue 1367 of Sway's GitHub issue tracker.