Dialog configuration: Difference between revisions
From wikinotes
No edit summary |
|||
Line 23: | Line 23: | ||
</blockquote><!-- Locations --> | </blockquote><!-- Locations --> | ||
= Defaults = | = Configuration = | ||
<blockquote> | |||
== Defaults == | |||
<blockquote> | <blockquote> | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 30: | Line 32: | ||
</blockquote><!-- Defaults --> | </blockquote><!-- Defaults --> | ||
= Colours = | == Colours == | ||
<blockquote> | <blockquote> | ||
* you can define your own variables as options, then refer to them for real values | * you can define your own variables as options, then refer to them for real values | ||
Line 58: | Line 60: | ||
</blockquote><!-- Colours --> | </blockquote><!-- Colours --> | ||
= Keybindings = | == Keybindings == | ||
<blockquote> | <blockquote> | ||
== Basics == | === Basics === | ||
<blockquote> | <blockquote> | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 78: | Line 80: | ||
</blockquote><!-- Basics --> | </blockquote><!-- Basics --> | ||
== vi mode == | === vi mode === | ||
<blockquote> | <blockquote> | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 95: | Line 97: | ||
</blockquote><!-- vi mode --> | </blockquote><!-- vi mode --> | ||
</blockquote><!-- Keybindings --> | </blockquote><!-- Keybindings --> | ||
</blockquote><!-- Configuration --> |
Latest revision as of 20:28, 16 October 2021
You can customize your preference for all dialog UIs.
Documentation
dialog keybindings https://man.archlinux.org/man/core/dialog/dialog.1.en#KEY_BINDINGS
Locations
~/.dialogrc
user config /usr/include/dlg_keys.h
bindable commands /usr/include/dlg_colors.h
colour option names
Configuration
Defaults
dialog --create-rc ~/.dialogrc # generate default dialogrcColours
- you can define your own variables as options, then refer to them for real values
- you can set options from
/usr/include/dlg_colors.h
(see#define DLGC_*_*
, lowercasing, and removingDLGC_*_
to define variable)# ~/.dialogrc # define colours # ex: ${VARIABLE} = (FG,BG,ON/OFF) # avail: # BLACK # RED # GREEN # YELLOW # BLUE # MAGENTA # CYAN # WHITE button_active_color = (RED,CYAN,OFF) # reference another variable # ex: ${VARIABLE} = ${OTHER_VARIABLE} dialog_color = (BLACK,WHITE,OFF) button_active_color = dialog_colorKeybindings
Basics
# bindkey ${WIDGET_OR_STAR} ${KEY} ${COMMAND} bindkey formbox TAB form_NEXT bindkey *keys:
- available keys are defined in
/usr/include/curses.h
(see#define KEY_*
)- also accepts ANSI control characters
- also accepts ASCII characters defined in octal
\033
commands:
- defined in
/usr/include/dlg_keys.h
(seeDLGK_*
, but use withoutDLGK_
)vi mode
# ~/.dialogrc # list-items (j,k,g,G) bindkey menubox \152 ITEM_NEXT bindkey menubox \153 ITEM_PREV bindkey menubox \147 ITEM_FIRST bindkey menubox \107 ITEM_LAST # menu-buttons (h,l) bindkey menubox \150 FIELD_PREV bindkey menubox \154 FIELD_NEXT