HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

dmenu — Dynamic menu. Create a menu from a text input with each item on a new line. More information: <https

Submitted by: @import:tldr-pages··
0
Viewed 0 times
createdynamiccommandfromdmenuclimenu
linux

Problem

How to use the dmenu command: Dynamic menu. Create a menu from a text input with each item on a new line. More information: <https://manned.org/dmenu>.

Solution

dmenu — Dynamic menu. Create a menu from a text input with each item on a new line. More information: <https://manned.org/dmenu>.

Display a menu of the output of the ls command:
{{ls}} | dmenu


Display a menu with custom items separated by a new line (\n):
echo -e "{{red}}\n{{green}}\n{{blue}}" | dmenu


Let the user choose between multiple items and save the selected one to a file:
echo -e "{{red}}\n{{green}}\n{{blue}}" | dmenu > {{color.txt}}


Launch dmenu on a specific monitor:
ls | dmenu -m {{1}}


Display dmenu at the bottom of the screen:
ls | dmenu -b

Code Snippets

Display a menu of the output of the `ls` command

{{ls}} | dmenu

Display a menu with custom items separated by a new line (`\n`)

echo -e "{{red}}\n{{green}}\n{{blue}}" | dmenu

Let the user choose between multiple items and save the selected one to a file

echo -e "{{red}}\n{{green}}\n{{blue}}" | dmenu > {{color.txt}}

Launch dmenu on a specific monitor

ls | dmenu -m {{1}}

Display dmenu at the bottom of the screen

ls | dmenu -b

Context

tldr-pages: linux/dmenu

Revisions (0)

No revisions yet.