mirror of
https://github.com/Cloudef/bemenu
synced 2024-11-26 05:58:25 +01:00
4612f9d327
This adds an alias 'focused' for selecting the current monitor, which becomes the default on x11 and wayland. The previous wayland default of displaying on all outputs moves under '-2' or 'all'. ref: https://github.com/Cloudef/bemenu/issues/102#issuecomment-604562234 Signed-off-by: Robert Günzler <r@gnzler.io>
318 lines
7.4 KiB
Groff
318 lines
7.4 KiB
Groff
.Dd March 29, 2021
|
|
.Dt BEMENU 1
|
|
.Os
|
|
.Sh NAME
|
|
.Nm bemenu
|
|
.Nd dynamic menu inspired by
|
|
.Xr dmenu 1
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Fl hivwx
|
|
.Op Fl I Ar index
|
|
.Op Fl l Ar lines
|
|
.Op Fl P Ar prefix
|
|
.Op Fl p Ar prompt
|
|
.Op Fl -ifne
|
|
.Op Fl -scrollbar Cm none | always | autohide
|
|
.Op Ar backend-options
|
|
.Nm bemenu-run
|
|
.Op Fl hivwx
|
|
.Op Fl I Ar index
|
|
.Op Fl l Ar lines
|
|
.Op Fl P Ar prefix
|
|
.Op Fl p Ar prompt
|
|
.Op Fl -ifne
|
|
.Op Fl -scrollbar Cm none | always | autohide
|
|
.Op Fl -fork
|
|
.Op Fl -no-exec
|
|
.Op Ar backend-options
|
|
.Sh DESCRIPTION
|
|
.Nm
|
|
is a dynamic menu for
|
|
.Xr tty 4
|
|
.Pq using Xr ncurses 3 ,
|
|
X11 and Wayland, inspired by
|
|
.Xr dmenu 1 .
|
|
It reads a list of newline-separated items from standard input and then
|
|
presents them as a list, where the user can select one or more of them.
|
|
When pressing
|
|
.Aq Cm carriage-return ,
|
|
the selected items are printed to standard output (one per line) and
|
|
.Nm
|
|
exits.
|
|
Entering text will filter the items to those that match the input.
|
|
If the number of items exceeds the size of the list,
|
|
the items will be paginated.
|
|
.Pp
|
|
.Nm bemenu-run
|
|
is a special-case invocation of
|
|
.Nm ,
|
|
where the input is the list of executables under
|
|
.Ev PATH
|
|
and the selected items are executed.
|
|
.Sh OPTIONS
|
|
.Bl -tag -width Ds
|
|
.It Fl h , -help
|
|
Print a help message to standard output and exit.
|
|
.It Fl I Ar index , Fl -index Ar index
|
|
Highlight the item at
|
|
.Ar index
|
|
at the start.
|
|
Indices start at 0.
|
|
By default, the first item is highlighted.
|
|
.It Fl i , -ignorecase
|
|
Filter items case-insensitively.
|
|
.It Fl l Ar number , Fl -list Ar number
|
|
List items vertically with the given
|
|
.Ar number
|
|
of lines.
|
|
.It Fl P Ar prefix , Fl -prefix Ar prefix
|
|
Display
|
|
.Ar prefix
|
|
before the highlighted item in a vertical list.
|
|
.It Fl p Ar prompt , Fl -prompt Ar prompt
|
|
Defines the
|
|
.Ar prompt
|
|
text to be displayed to the left of the input field.
|
|
Defaults to
|
|
.Ql bemenu .
|
|
.It Fl v , -version
|
|
Print the
|
|
.Nm
|
|
version number to standard output and exit.
|
|
.It Fl w , -wrap
|
|
Advancing past the end of the list returns you to the start.
|
|
.It Fl x , -password
|
|
Hide filter text.
|
|
.It Fl -fork
|
|
Always
|
|
.Xr fork 2
|
|
before executing the selections.
|
|
Disabled by default when using the terminal backend.
|
|
.It Fl -no-exec
|
|
Print the selected items to standard output instead of executing them.
|
|
.It Fl -scrollbar Cm none | always | autohide
|
|
Specify when to show a scrollbar for vertical lists:
|
|
.Bl -tag -width autohide
|
|
.It Cm none
|
|
Never display a scrollbar
|
|
.Pq the default .
|
|
.It Cm always
|
|
Always display a scrollbar.
|
|
.It Cm autohide
|
|
Only display a scrollbar when the number of items exceeds the number of
|
|
lines.
|
|
.El
|
|
.El
|
|
.Ss Backend Options
|
|
These options are only available on backends specified in the
|
|
parentheses:
|
|
.Bl -tag -width Ds
|
|
.It Fl b , -bottom Pq Wayland, X11
|
|
The list will appear at the bottom of the screen.
|
|
.It Fl f , -grab Pq Wayland, X11
|
|
Show the
|
|
.Nm
|
|
window whilst reading the items.
|
|
.It Fl H Ar height , Fl -line-height Ar height Pq Wayland, X11
|
|
Specify the
|
|
.Ar height
|
|
in point size to make each entry.
|
|
.It Fl m Ar index , Fl -monitor Ar index Pq Wayland, X11
|
|
Specify the monitor
|
|
.Ar index
|
|
where the list should appear.
|
|
Monitor indices start at zero.
|
|
The interpretation of the given argument depends on the utilized backend.
|
|
With X11 and Wayland, a value of
|
|
.Ql -1
|
|
or
|
|
.Cm focused
|
|
indicates that the current monitor should be used (the default).
|
|
With Wayland, the
|
|
.Ar index
|
|
should be a string specifying a specific monitor name. The value
|
|
.Ql -2
|
|
or
|
|
.Cm all
|
|
indicates that the list should appear on all monitors.
|
|
.It Fl n , -no-overlap Pq Wayland
|
|
Set the
|
|
.Nm
|
|
window to be on top of any other panels.
|
|
.It Eo
|
|
.Fl -fn Sq Ar name Op Ar size
|
|
.Pq Wayland , X11
|
|
.Ec
|
|
Specify the font family
|
|
.Ar name
|
|
and
|
|
.Ar size
|
|
to be used.
|
|
For more options, consult the
|
|
.%T Pango Reference Manual
|
|
for
|
|
.Fn pango_font_description_from_string .
|
|
.El
|
|
.Pp
|
|
The following options control the colours for various parts of the list
|
|
for the Wayland and X11 backends.
|
|
Each takes an argument in the form of:
|
|
.Pp
|
|
.Dl Cm # Ns Ar RGB Ns Op Ar A
|
|
.Pp
|
|
where
|
|
.Ar R, G, B
|
|
and
|
|
.Ar A
|
|
are hexadecimal integers from 00\(enFF that control the red, green, blue
|
|
and alpha-transparency channels.
|
|
.Bl -tag -width "--xxx color "
|
|
.It Fl -tb Ar color
|
|
Title background.
|
|
.It Fl -tf Ar color
|
|
Title foreground.
|
|
.It Fl -fb Ar color
|
|
Filter background.
|
|
.It Fl -ff Ar color
|
|
Filter foreground
|
|
.It Fl -nb Ar color
|
|
Normal background.
|
|
.It Fl -nf Ar color
|
|
Normal foreground.
|
|
.It Fl -hb Ar color
|
|
Highlighted background.
|
|
.It Fl -hf Ar color
|
|
Highlighted foreground.
|
|
.It Fl -sb Ar color
|
|
Selected background.
|
|
.It Fl -sf Ar color
|
|
Selected foreground.
|
|
.It Fl -scb Ar color
|
|
Scrollbar background.
|
|
.It Fl -scf Ar color
|
|
Scrollbar foreground.
|
|
.El
|
|
.Sh KEYBOARD COMMANDS
|
|
.Nm
|
|
supports keyboard commands to move around the list and edit the filter.
|
|
In the following examples,
|
|
.Cm C-x
|
|
means
|
|
.Aq Cm control-x ,
|
|
.Cm M-x
|
|
means
|
|
.Aq Cm alt-x
|
|
and
|
|
.Cm S-x
|
|
means
|
|
.Aq Cm shift-x :
|
|
.Bl -tag -width Ds
|
|
.It Eo
|
|
.Aq Cm cursor-up ,
|
|
.Cm S- Ns Aq Cm cursor-left ,
|
|
.Cm C-p , M-j , M-l Ec
|
|
Highlight the previous item.
|
|
.It Eo
|
|
.Aq Cm cursor-down ,
|
|
.Aq Cm tab ,
|
|
.Cm C-n , M-h , M-k Ec
|
|
Highlight the next item.
|
|
.It Cm PageUp , M-v , M-u
|
|
Show the previous page of items, preserving the offset of the currently
|
|
highlighted item, if possible.
|
|
.It Cm PageDown , C-v , M-d
|
|
Show the next page of items, preserving the offset of the currently
|
|
highlighted item, if possible.
|
|
.It Cm S-M-< , S-PageUp
|
|
Highlight the first item in the list.
|
|
.It Cm S-M-> , S-PageDown
|
|
Highlight the last item in the list.
|
|
.It Cm S- Ns Aq Cm tab
|
|
Copy the highlighted item to the filter.
|
|
.It Eo
|
|
.Aq Cm escape ,
|
|
.Cm C-g Ec
|
|
Terminate
|
|
.Nm
|
|
without printing items.
|
|
.It Cm C- Ns Aq Cm carriage-return
|
|
Select the highlighted item and continue highlighting.
|
|
.It Eo
|
|
.Cm S- Ns Aq Cm carriage-return ,
|
|
.Cm C-m Ec
|
|
Print selected items and the currently highlighted one, and exit.
|
|
Items are printed in the order they were selected,
|
|
with the currently highlighted item printed last.
|
|
.It Eo
|
|
.Cm S- Ns Aq Cm carriage-return ,
|
|
.Cm Insert Ec
|
|
Print the filter text to standard output and exit.
|
|
.It Cm C-l , Aq Cm cursor-left
|
|
Move cursor left.
|
|
.It Cm C-f , Aq Cm cursor-right
|
|
Move cursor right.
|
|
.It Cm C-a , Home
|
|
Move cursor to the start.
|
|
.It Cm C-e , End
|
|
Move cursor to the end.
|
|
.It Eo
|
|
.Aq Cm backspace
|
|
.Cm C-h Ec
|
|
Remove character before the cursor.
|
|
.It Aq Cm delete
|
|
Remove character at the cursor.
|
|
.It Cm C-u , S- Ns Aq Cm delete
|
|
Remove all characters before the cursor.
|
|
.It Cm C-k
|
|
Remove all characters after the cursor.
|
|
.It Cm C-w
|
|
Clear the filter.
|
|
.It Cm M- Ns Op 0\(en9
|
|
Print selected items and exit with a custom error code.
|
|
See
|
|
.Sx EXIT STATUS .
|
|
.El
|
|
.Sh ENVIRONMENT
|
|
.Bl -tag -width "BEMENU_RENDERERS"
|
|
.It Ev BEMENU_OPTS
|
|
An alternative way to pass command line arguments to
|
|
.Nm .
|
|
.It Ev BEMENU_BACKEND
|
|
Force a backend to be used.
|
|
If empty, one of the GUI backends (Wayland, X11) will be selected
|
|
automatically.
|
|
The accepted values are
|
|
.Cm curses , wayland
|
|
and
|
|
.Cm x11 .
|
|
.It Ev BEMENU_RENDERER
|
|
Force a backend by loading its shared object from the set value.
|
|
.It Ev BEMENU_RENDERERS
|
|
Override the backend search path to the set value.
|
|
Defaults to
|
|
.Pa @LIBDIR@/bemenu .
|
|
.It Ev BEMENU_SCALE
|
|
Override the rendering scale factor for the GUI backends.
|
|
.El
|
|
.Sh EXIT STATUS
|
|
.Nm
|
|
exits 0 on success, 1 if the user exited without selecting or an error,
|
|
and if exiting with a custom error code, 10 plus the number specified.
|
|
.Sh SEE ALSO
|
|
.Xr dmenu 1 ,
|
|
.Xr fork 2 ,
|
|
.Xr ncurses 3 ,
|
|
.Xr tty 4
|
|
.Pp
|
|
.Rs
|
|
.%T Pango Reference Manual
|
|
.%D August 20, 2020
|
|
.%U https://developer.gnome.org/pango/1.46/
|
|
.%O Fonts \(em pango_font_description_from_string()
|
|
.Re
|
|
.Sh AUTHORS
|
|
.Nm
|
|
is written and maintained by
|
|
.An Jari Vetoniemi Aq Mt mailroxas@gmail.com .
|