Unryu: Preferences
The Preferences dialog holds almost every setting Unryu has. This page goes through the dialog page by page and describes every control on it: what it does, its default, and the key it is stored under in the configuration files. The last sections describe those files and how to edit them by hand.
1. Opening Preferences
You can open the dialog in several ways:
- Edit > Preferences, or the shortcut
Ctrl+Alt+P. - The Preferences button on the toolbar, if you have added it (see Interface > Toolbar below).
- View > Change Font..., because the fonts are set in Preferences. It opens Preferences on the page you used last, as Edit > Preferences does; the fonts are on Interface > Interface, in the Fonts group.
- Build > Set Build Commands, which opens the dialog directly on the Build page, on the tab for the current document's language (or on Independent commands when the document has no language).
The dialog has no row of tabs. Instead, a tree at the left lists the pages: General, Interface, Editor, Files, Tools, Terminal, Build, Templates, Keybindings, Printing and Various. Pages that have several parts (General, Interface, Editor, Terminal and Build) show those parts as rows under the page name. Click a row to show that page or part at the right. If you click a page's own row, the page shows the part you looked at last.
Preferences remembers the page and part you were on when you closed it, even if you pressed Cancel, and opens there
the next time (the keys preferences-page and preferences-part in unryu.conf).
Every control has a tooltip that explains what it does. Rest the pointer on the control or on its label to see it.
2. The buttons, and when a change takes effect
| Button or key | What it does |
|---|---|
| Help | Opens this page of the manual with the Browser command from the Tools page. The dialog stays open. |
| Apply | Uses all the settings in the dialog at once and saves them, but keeps the dialog open, so you can see the effect and keep adjusting. |
| Cancel | Closes the dialog and puts back every setting as it was when the dialog opened, including anything you already applied with Apply. |
| OK | Uses and saves all the settings, then closes the dialog. |
Escape, or the window's close button | The same as Cancel. |
If you type a number into a number field and do not press Enter, Apply and OK still take the number you typed.
While Preferences is open, the main window still repaints, and a program running in the Terminal tab keeps running, but the main window does not react to the mouse or the keyboard until you close the dialog.
Open documents and new documents. Most settings change the open documents at once. A few are settings that each document has of its own, in the Document menu: line wrapping, the indentation width and type, auto-indentation, the line ending and the encoding. For these, Preferences gives the value that each new document starts with, and the documents that are already open keep theirs. To change one of these for the current document, use the Document menu (see Editing).
| Known limitation of the dialog | What it means for you |
|---|---|
| The Tab key does not move between the controls. | Use the mouse to go from one control to the next. |
| The dialog does not take the keyboard by itself when it opens; the window manager decides. | If Escape does nothing, click inside the dialog first. |
| The labels have no underlined letters. | There are no Alt+letter shortcuts to reach a control. |
Every control in the dialog works; none are greyed out as unfinished. A control is greyed only for a moment when it cannot be used, for example the Change button of the Keybindings page until you select an action.
3. General
All the settings of this page are stored in ~/.config/unryu/unryu.conf.
General > Startup
| Group | Control | What it does | Default | Key |
|---|---|---|---|---|
| Startup | Load files from the last session | When Unryu starts, it opens again the files that were open when it last closed. | On | general-load-session |
| Startup | Open a new window when Unryu already runs | On: starting Unryu again with no file name opens a
second window with a new document. That window does not load or change the files of the last session. Off: the window
that is already open comes to the front. Files named on the command line still open in the first window; to open them
in a window of their own, start Unryu with unryu -i (see Files). Takes effect at
the next start. | Off | general-multiple-instances |
| Startup | Load virtual terminal support | Shows the Terminal tab in the message window. Takes effect the next time Unryu starts. When it is off, Build > Execute uses the Terminal command of the Tools page instead. | On | load-terminal |
| Shutdown | Save window size | Remembers the size of the main window for the next start. Off: the next start uses the default size. | On | general-save-window-size |
| Shutdown | Save window position | Remembers where the main window is on the screen for the next start. Off: the window manager places it. | On | general-save-window-position |
| Shutdown | Confirm exit | Asks before Unryu closes. | Off | general-confirm-exit |
| Paths | Startup path | The folder that the Open and Save As dialogs start in when no file is open. Empty means your home folder. | Empty | general-startup-path |
General > Miscellaneous
| Group | Control | What it does | Default | Key |
|---|---|---|---|---|
| Miscellaneous | Beep on errors or when compilation has finished | Sounds the bell when something cannot be done, for example when a search finds nothing, when there is no next message to go to, or when you type in a read-only document. It also beeps when a build finishes. | On | beep-on-errors |
| Miscellaneous | Switch to status message list at new message | Brings the Status tab of the message window to the front whenever a new status message arrives. | Off | general-switch-to-status |
| Miscellaneous | Suppress status messages in the status bar | Status messages are not shown in the status bar. They still go to the Status tab. | Off | general-suppress-status |
| Miscellaneous | Auto-focus widgets (focus follows mouse) | The editor or a list of the sidebar gets the keyboard as soon as the pointer moves over it, without a click. | Off | general-auto-focus |
| Search | Always wrap search | When a search reaches the end (or the start) of the document, it goes on from the other end without asking. Off: Unryu asks whether to wrap. | Off | always-wrap-search |
| Search | Hide the Find dialog | Closes the Find dialog after Find Next or Find Previous. | Off | hide-find-dialog |
| Search | Use the current word under the cursor for Find dialogs | Find and Replace open with the word at the cursor already filled in, when nothing is selected. | On | search-use-current-word |
| Search | Use the current file's directory for Find in Files | Find in Files opens on the folder of the current file. | On | fif-current-dir |
See Find and Replace for the search dialogs themselves.
4. Interface
All the settings of this page are stored in unryu.conf.
Interface > Interface
| Group | Control | What it does | Default | Key |
|---|---|---|---|---|
| Sidebar | Show sidebar | Shows the sidebar panel. View > Show Sidebar does the same. | On | interface-show-sidebar |
| Sidebar | Show symbol list | Shows the Symbols tab of the sidebar: the functions, types and variables of the current file. | On | interface-show-symbols |
| Sidebar | Default sorting mode: Name / Appearance | The order of the symbol list: by name within each group, or in the order the symbols appear in the file. The right-click menu of the symbol list changes the same setting. | Name | outline-sort (name or appearance) |
| Sidebar | Show documents list | Shows the Documents tab: a list of the open files. | On | interface-show-documents |
| Sidebar | Show files list (the project's folder) | Shows the Files tab: the folder tree of the current project (see Files). | On | interface-show-files |
| Sidebar | Position: Left / Right | Which side of the window the sidebar is on. | Left | interface-sidebar-right (0 left, 1 right) |
| Message window | Position: Bottom / Right | Where the message window is: under the editor, or at its right. | Bottom | interface-messages-right (0 bottom, 1 right) |
| Fonts | Interface, Symbol list, Message window, Editor, Details, Status bar, Printing: a font family and a size for each | The font of each part of the window, and of native printing. The family list has every font installed on your system, sorted by name; "Default" uses the theme's own font for that part. For Printing the monospace fonts come first, then the others; "Default" is the Editor's font. The size is in pixels, from 6 to 72; for Printing it is in points. A part left at Default and at its default size keeps following the theme. The default sizes are: Interface, Symbol list and Message window: the window theme's sizes; Editor: 13; Details: the Interface size if you chose one, else 12; Status bar: 11; Printing: 9. View > Zoom In and Zoom Out add to the editor's size for the current session only. | Default, and the default size | interface-font, outline-font,
messages-font, editor-font, details-font, statusbar-font,
printing-font; each with a -size key (for example editor-font-size). An empty
family and size 0 mean the default. |
| Themes | Window | The window theme: menus, panels, buttons and lists. View > Change Theme does the same. See Themes. | Dark | theme |
| Themes | Editor | The color theme of the text in the editor and in Details. View > Change Color Scheme does the same. | Dark | editor-theme |
| Themes | Icons | The icons of Unryu's toolbar, menus and lists: "As every xtk program" (the next setting), "The desktop's" icon theme, "Unryu's own icons", or one of the installed icon themes. See Themes. | As every xtk program | icon-theme (empty, desktop,
builtin or a theme's folder name) |
| Themes | Icons of all xtk programs | The icons of every program built on xtk that does not choose its own
(Unryu, Hanshi, Palette, Gamut, Skein, PixelPrism): "The desktop's" icon theme, "xtk's own icons", or one of the
installed icon themes. It is kept in ~/.config/xtk/icons.conf, not in unryu.conf, and the other programs
follow it within a second. | The desktop's | (theme in ~/.config/xtk/icons.conf) |
| Details | Wrap code in Details | Wraps long lines of code in the Details panel instead of scrolling sideways. | On | wrap-details |
| Miscellaneous | Show status bar | Shows the status bar at the bottom of the window. | On | interface-show-statusbar |
| Miscellaneous | Show an icon in the system tray | Unryu's icon in the desktop's system tray: a click hides or shows the window, its menu has Hide Window, New Document, Open File..., Paste as New Document, Save All, Stop Build and Quit, its tooltip lists what goes on, and while the window is hidden it tells you when a build ends (The Window). | On | interface-tray |
Interface > Notebook tabs
| Group | Control | What it does | Default | Key |
|---|---|---|---|---|
| Editor tabs | Show editor tabs | Shows a tab for each open file above the editor. | On | interface-show-editor-tabs |
| Editor tabs | Show close buttons | Shows a close button on each file tab. | On | interface-show-close-buttons |
| Editor tabs | Placement of new file tabs: Left / Right | Whether the tab of a newly opened file goes to the left end or the right end of the tabs. | Right | interface-new-tabs-left (1 left, 0 right) |
| Editor tabs | Next to current | Puts a new file's tab next to the current tab instead of at an end. | Off | interface-new-tabs-next-to-current |
| Editor tabs | Double-clicking hides all additional widgets | A double-click on a tab hides the sidebar, the message window, the toolbar and the status bar. Another double-click brings them back. (A double-click beside the tabs opens a new document, whatever this says.) | Off | interface-double-click-hides |
| Editor tabs | Switch to last used document after closing a tab | After you close a tab, Unryu goes to the file you used before it, not to the tab beside it. | Off | interface-switch-to-last-used |
| Editor tabs | Tab label length | The most characters a tab's label shows. A longer file name is shortened in the middle with "...". 0 or -1: names are never shortened. Range -1 to 1000. | 99 | interface-tab-label-length |
| Tab positions | Editor, Sidebar, Message window: Left / Right / Top / Bottom | Which edge the tabs of each part are on. | Top, Top, Top | interface-tab-position-editor, interface-tab-position-sidebar,
interface-tab-position-message-window (0 top, 1 bottom, 2 left, 3 right) |
Interface > Toolbar
| Group | Control | What it does | Default | Key |
|---|---|---|---|---|
| Toolbar | Show toolbar | Shows the toolbar under the menu bar. View > Show Toolbar does the same. | On | interface-show-toolbar |
| Toolbar | Append toolbar to the menu | Puts the toolbar in the same row as the menu bar, to save space. | Off | interface-toolbar-in-menu |
| Toolbar | The toolbar editor (a small copy of the toolbar, and a "bucket" of the items it does not have) | Arranges the toolbar's items by dragging. Drag an item from the bucket to the toolbar to add it, along the toolbar to move it, or back to the bucket to remove it. Click Default, at the right of the caption above the small toolbar, to put back Unryu's own items. The items are: New, Open, Save, Save All, Reload, Close, Close All, Back, Forward, Undo, Redo, Cut, Copy, Paste, Delete, the search field, Find, Replace, the line number field, Go to Line, Zoom In, Zoom Out, Print, Preferences, Quit, Compile, Build, Execute, Color Chooser, Indent, Unindent, and Separator. A toolbar holds at most 48 items. | New, Open, Save, Save All | Reload, Close | Back, Forward | Build, Execute | Color Chooser | search field, Find | line number field, Go to Line (| is a separator) | interface-toolbar-items: the item names in order, separated by spaces (New Open Save SaveAll Separator Revert Close
Separator NavBack NavFor Separator Build Run Separator Color Separator SearchEntry Search Separator GotoEntry
Goto). The other names are CloseAll, Undo, Redo, Cut,
Copy, Paste, Delete, Replace, ZoomIn, ZoomOut,
Print, Preferences, Quit, Indent, UnIndent. |
| Icon style | System default / Images and text / Images only / Text only | Whether a toolbar button shows a picture, text, or both. System default shows images only. | System default | interface-toolbar-style (0 to 3, in the order shown) |
| Icon size | System default / Small icons / Very small icons / Large icons | The size of the toolbar's icons: 24, 16, 12 or 32 pixels. System default is 24 pixels. | System default | interface-toolbar-size (0 to 3, in the order shown) |
| Icon look | Full color / Symbolic | Full color: the icon theme's own icons, in their colors. Symbolic: one-color icons in the toolbar's text color, as GTK programs draw their toolbars: the theme's symbolic icons, else Adwaita's, else Unryu's own, so they read as one set whatever the theme has. Customize Toolbar shows the look chosen at once. The Markdown toolbar is always symbolic. | Full color | interface-toolbar-symbolic (0 or 1) |
5. Editor
All the settings of this page are stored in unryu.conf. See Editing for the
features themselves.
Editor > Features
| Group | Control | What it does | Default | Key |
|---|---|---|---|---|
| Features | Line wrapping | Long lines continue on the next row instead of scrolling sideways. This is the setting new documents start with; Document > Line Wrapping changes the current one. | Off | wrap-editor |
| Features | "Smart" home key | Home goes to the first character of the line that is not a space or tab. A second press goes to column 1. | On | smart-home |
| Features | Disable Drag and Drop | Selected text cannot be moved by dragging it with the mouse. | Off | disable-drag-and-drop |
| Features | Code folding | Shows fold markers in the margin, so that blocks of code can be collapsed. | On | code-folding |
| Features | Fold/unfold all children of a fold point | Folding or unfolding a block also folds or unfolds the blocks inside it. | Off | fold-children |
| Features | Use indicators to show compile errors | After a build, the lines that the compiler reported are marked in the editor. Turning it off removes the marks that are there. | On | compile-error-indicators |
| Features | Newline strips trailing spaces | Pressing Enter removes the spaces and tabs left at the end of the line. | Off | newline-strip |
| Features | Keep the backslashes of a #define lined up | In C, C++ and the other languages with C's
#define: typing in a #define that goes over several lines keeps the backslashes at their ends lined
up, and Enter inside one ends the line you leave with a backslash (Help while you
type). | On | define-format |
| Features | Comment toggle marker | The text that Toggle Line Commentation puts after the comment sign, so that comments it made can be told from your own. | ~ (a tilde and a space) | comment-toggle-marker,
written in double quotes so that a trailing space is kept |
| Virtual spaces | Disabled / Only for rectangular selections / Always | Whether the cursor can go past the end of a line: never, only while you make a rectangular selection, or always. | Only for rectangular selections | virtual-space (0, 1, 2) |
Editor > Indentation
| Group | Control | What it does | Default | Key |
|---|---|---|---|---|
| Indentation | Width | How many columns one level of indentation is, from 1 to 16. New documents start with it; Document > Indent Width changes the current one. | 4 | indent-width |
| Indentation | Auto-indent mode: None / Basic / Current chars / Match braces | How a new line is
indented. None: not at all. Basic: as deep as the line above. Current chars: with the same spaces and tabs as the line
above. Match braces: also one level more after { and one level less at }. | Current chars | auto-indent (none, basic,
current-chars, match-braces) |
| Indentation | Type: Tabs / Spaces / Tabs and spaces | What indentation is made of: tabs, spaces, or tabs with spaces for what is left over. New documents start with it; Document > Indent Type changes the current one. | Tabs | indent-type (tabs, spaces, both) |
| Indentation | Detect type from file | Looks at each file that opens to see whether it uses tabs or spaces, and follows it. | Off | detect-indent-type |
| Indentation | Detect width from file | Looks at each file that opens to find its indentation width, and follows it. | Off | detect-indent-width |
| Indentation | Tab key indents | Tab indents the line or the selection, instead of putting a tab character at the cursor. | On | tab-key-indents |
| Indentation | Backspace key unindents | Backspace inside the indentation removes one whole level. | On | backspace-unindents |
A project's own settings file, and the indentation you set for one file in the Document menu, come before these settings (see Editing and Files).
Editor > Completions
| Group | Control | What it does | Default | Key |
|---|---|---|---|---|
| Completions | Snippet completion | Typing a snippet's word and then Tab puts the snippet's code there. | On | completion-snippets |
| Completions | XML/HTML tag auto-closing | Typing > after an opening tag adds the closing
tag, or the tag's snippet when it has one. | On | completion-xml-tags |
| Completions | Automatic continuation of multi-line comments | Pressing Enter inside a /* */
comment starts the next line with the comment's *. | On | auto-continue-comments |
| Completions | Autocomplete symbols | Offers the language's words and the file's symbols while you type. | On | completion-symbols |
| Completions | Autocomplete all words in document | Also offers every word that is in the document. | Off | completion-all-words |
| Completions | Drop rest of word on completion | Accepting a suggestion in the middle of a word replaces the rest of that word. | Off | completion-drop-rest |
| Completions | Write a function as a call, a place for each parameter | A function taken from the completion list is written as a call, its parameters as places that Tab goes through (see Editing). | On | completion-calls |
| Completions | Max. symbol name suggestions | The most names the completion list holds (1 to 999). | 30 | completion-most |
| Completions | Completion list height | How many rows of the completion list show at one time (1 to 99). | 10 | completion-height |
| Completions | Characters to type for autocompletion | How many letters you type before the completion list appears (1 to 99). | 4 | completion-characters |
| Completions | Symbol list update frequency | Milliseconds between updates of the symbol list while you type (0 to 10000). 0: the list is updated only when the file is saved (or when you switch to the document). Moving the cursor moves the list's mark at once, whatever this is. | 250 | completion-update-ms |
| Auto-close quotes and brackets | Parenthesis ( ), Curly brackets { }, Square brackets [ ], Single quotes ' ', Double quotes " " | Typing the opening character also adds the closing one, for each kind that is checked, when the new one would otherwise have no partner. Text that is selected goes inside the pair. Typing the closing character over the automatic one, Tab, BackSpace and Enter then work with the pair too (Auto-close). | All off | autoclose: the opening characters that are on, for example ([{ |
| Enclose selection | Typing a bracket or quote with text selected puts it around the text | (, [,
{, ', " and ` typed while text is selected go around it (the text stays
selected), whether or not auto-close is on for them. | Off | enclose-typed |
| Enclose selection | Pairs for Edit > Format > Enclose Selection | Up to 8 pairs, separated by spaces, each an
opening and a closing character written together: () [] {} "" '' `` <> «». A single character is both.
Each pair is an item of Edit > Format > Enclose Selection, and has a key in Keybindings (Format: Enclose 1 to 8). Empty:
no pairs. | () [] {} "" '' `` <> «» | enclose-pairs |
Editor > Display
| Group | Control | What it does | Default | Key |
|---|---|---|---|---|
| Display | Invert syntax highlighting colors | Shows each color of the editor theme as its opposite. | Off | invert-colors |
| Display | Show indentation guides | Draws a faint vertical line at each level of indentation. Also View > Show Indentation Guides. | Off | indent-guides |
| Display | Show white space | Draws a mark for each space and each tab. Also View > Show White Space. | Off | show-whitespace |
| Display | Show line endings | Draws a mark at the end of each line for its line ending. Also View > Show Line Endings. | Off | show-line-endings |
| Display | Show only non-default line endings | With Show line endings on, marks only the line endings that are not the file's usual kind. | Off | line-endings-non-default-only |
| Display | Show line numbers | Shows line numbers in the left margin. Also View > Show Line Numbers. | On | line-numbers |
| Display | Show markers margin | Shows the margin that holds bookmarks and error markers. Also View > Show Markers Margin. | On | markers-margin |
| Display | Stop scrolling at last line | Scrolling stops when the last line is at the bottom of the view. Off: the last line can scroll up to the top. | On | stop-at-last-line |
| Display | Syntax and semantic highlighting | Colors the text by what it is: keywords, strings, comments, and names by what they mean. Also View > Syntax Highlighting. | On | syntax-highlighting |
| Display | Flash missing braces | A brace with no partner flashes, instead of only showing dimmed. Also View > Flash Missing Braces. See Analysis. | On | flash-missing |
| Display | Lines visible around the cursor | Keeps at least this many lines in view above and below the cursor (0 to 99). | 0 | lines-around-cursor |
| Long line marker | Enabled | Marks the column where lines get too long. | On | long-line |
| Long line marker | Type: Line / Background | Line: a thin vertical line at the column. Background: a different background color past the column. | Line | long-line-type (0 line, 1 background) |
| Long line marker | Column | The column the marker is at (1 to 1000). Document > Line Breaking and Edit > Format > Reflow Lines/Block break lines at this column too. | 72 | long-line-column |
| Long line marker | Color | The marker's color, as #RRGGBB. | #C2EBC2 | long-line-color |
| Change History | Show in markers margin | Marks changed lines in the markers margin. | Off | change-history-margin |
| Change History | Show as underline indicators | Underlines text that changed since the file was opened or saved. | Off | change-history-underline |
6. Files
All the settings of this page are stored in unryu.conf. See Files for opening,
saving and encodings.
| Group | Control | What it does | Default | Key |
|---|---|---|---|---|
| New files | Open new documents from the command-line | A file name on the command line that does not exist opens a new, empty document with that name. Off: Unryu only reports that the file does not exist. | On | general-open-new-from-command-line |
| New files | Default end of line characters: Windows (CRLF) / Classic Mac (CR) / Unix (LF) | The line ending of new files. | Unix (LF) | default-line-ending (lf, crlf, cr) |
| Encodings | Default encoding (new files) | The character encoding of new files. The list is grouped (West European, East European, East Asian, and so on); the group headings cannot be chosen. | UTF-8 | default-new-encoding |
| Encodings | Default encoding (existing non-Unicode files) | The encoding to read a file in when it is not Unicode. "Detect from file" lets Unryu find it. | Detect from file | default-open-encoding (detect, or an encoding's name) |
| Saving files | Ensure new line at file end | On save, adds a line ending after the last line if it has none. | On | ensure-final-newline |
| Saving files | Ensure consistent line endings | On save, gives every line the file's own kind of line ending. Off: in a file with mixed line endings, each line keeps its own. | Off | general-consistent-line-endings |
| Saving files | Strip trailing spaces and tabs | On save, removes spaces and tabs at the ends of lines. | Off | strip-trailing-on-save |
| Saving files | Strip trailing blank lines | On save, removes the empty lines, and the lines of only spaces and tabs, at the end of the file. The line end after the last line with text stays. | Off | strip-blank-lines-on-save |
| Saving files | Replace tabs with space | On save, turns each tab into spaces. | Off | replace-tabs-on-save |
| Miscellaneous | Recent files list length | How many files File > Recent Files remembers (0 to 50). 0 keeps none. Making it smaller shortens the list at once. | 10 | recent-files |
| Miscellaneous | Disk check timeout | Seconds between checks whether an open file changed on disk (0 to 60). 0 never checks. | 30 | disk-check-timeout |
7. Tools
The page has two parts. Tool paths starts with the note "Enter tool paths below. Tools you do not need can be
left blank."; its settings are stored in unryu.conf. Code tools holds the list of Tools > Code
Tools: a row for each of its 16 places, with Name, Kind (Check, Format, Show or Terminal), Runs in (File's folder or
Project folder) and Command; they are stored in code_tools.conf. See
Build and Run.
| Group | Control | What it does | Default | Key |
|---|---|---|---|---|
| Tool paths | Terminal | The command that opens a terminal window, used by Build > Execute and by
Send Selection to Terminal when the Terminal tab is off (General > Startup). %c is replaced by the script
to run. With the Terminal tab on, those commands run in the tab and this setting is not used. | xterm -e "/bin/sh %c" | tool-terminal |
| Tool paths | Browser | The command that opens the manual and web addresses. The page or address is added
after the command. When it is empty, Unryu uses xdg-open. | xdg-open | tool-browser |
| Tool paths | Grep | The grep program that Find in Files runs. Empty: Unryu searches the files by itself, without a program. With a program set, the Find in Files dialog's Extra options can pass more options to it. | Empty | tool-grep |
| Commands | Context action | The command of Context Action in the editor's right-click menu.
%s is replaced by the selection, or by the word at the cursor, in quotes. Empty: Context Action only says
"No context action set." | Empty | context-action |
8. Terminal
This page sets up the Terminal tab of the message window. The theme choice and Shell integration are stored in
unryu.conf. Every other setting is stored in ~/.config/unryu/terminal.conf (see section 14).
Apply shows the changes in the terminal while the dialog is still open.
Terminal > Appearance
| Group | Control | What it does | Default | Key |
|---|---|---|---|---|
| Theme | Colors: As the editor theme / Hosho Dark / Hosho Light / Sumi / Washi / A theme file | Where the terminal's colors come from. As the editor theme: the terminal matches the editor. The four names are the terminal's built-in themes. A theme file: your own file, named in the next field. | As the editor theme | terminal-theme in unryu.conf
(editor, a built-in theme's name, or file) |
| Theme | Theme file | Used when Colors is "A theme file": a full path, a path that starts with
~/, or the name of a file in ~/.config/unryu. To make one, copy one of the terminal's themes and
change its colors. If no file is named, or the file cannot be read, the Status tab says so and the terminal uses the
editor theme's colors. | Empty | terminal-theme-file in unryu.conf |
| Font | Family | The terminal's font. Default uses the editor's font. | Default | font-family (empty: the editor's font) |
| Font | Size | The font size in pixels (0 to 96). 0 uses the editor's size. | 0 | font-size |
| Font | Line spacing | Extra pixels between lines of text (0 to 40). | 0 | line-spacing |
| Font | Ligatures | Draws sequences such as -> and != as a single symbol, if the
font has ligatures. | On | ligatures |
| Font | Bold text in bright colors | Shows bold text in the bright version of its color, the way older terminals did. | Off | bold-bright |
| Cursor | Shape: Block / Underline / Bar | The cursor's shape. A program can choose its own while it runs, as vim does in insert mode. While the terminal does not have the keyboard, a block is drawn as an outline, and an underline or a bar keeps its shape. | Block | cursor-shape (block, underline, bar) |
| Cursor | Blink | The cursor blinks while the terminal has the keyboard. | Off | cursor-blink |
Terminal > View
| Group | Control | What it does | Default | Key |
|---|---|---|---|---|
| Margins | Padding | Pixels of empty space between the terminal's edge and its text (0 to 100). | 4 | padding |
| Margins | Prompt mark margin | The width in pixels of the left margin for prompt marks (0 to 40): green after a command that succeeded, red after one that failed. Click a mark to select that command's output; double-click to hide it. 0: no margin. Needs Shell integration. | 6 | gutter-width |
| Scrollback | Lines | How many lines of earlier output are kept to scroll back through (0 to 1,000,000). | 10000 | scrollback-lines |
| Colors | Minimum contrast | Lightens or darkens text that is hard to read against its background, such as dark blue on black. A number from 1 to 21: 1 leaves the colors alone, 4.5 is comfortable to read, 21 is the most. Text that is not such a number is ignored and the value stays as it was. | 1 | minimum-contrast |
| Background | Picture | A picture file shown behind the text: PNG, JPEG, GIF, BMP or XPM, given as a full path or
a path that starts with ~/. When the file changes, the new picture shows within a second. Empty: none. | Empty | background-image |
| Background | Tint | How strongly the background color covers the picture, in percent (0 to 100). 100 hides the picture, 0 shows it untouched. | 85 | background-opacity |
Terminal > Programs
| Group | Control | What it does | Default | Key |
|---|---|---|---|---|
| Shell | Shell integration | The shell tells the terminal where each prompt and each command's output begins. This is needed for prompt marks, hiding a command's output, the long-command notice and the colors of the Terminal tab's label. It works for bash, zsh, fish, ksh, dash and sh, and your own shell start-up files are still read. Turning it off hides the marks at once; turning it on takes effect for the next shell that starts. | On | terminal-shell-integration in unryu.conf |
| Shell | Notify after (seconds) | When a command that ran at least this long ends while you work elsewhere in Unryu, a line appears in the Status tab (0 to 86400). 0 turns this off. Needs Shell integration. | 10 | notify-command-seconds |
| Keyboard and bell | Keyboard: PC / VT220 / Sun / HP / SCO / rxvt / Linux console | Which keyboard the
function keys imitate. PC suits nearly every program; the others are for programs written for one of those
terminals. With Sun, HP, SCO, rxvt or Linux console, the programs are also told that terminal's name (TERM)
when your system has a description of it; this takes effect for the next shell that starts. | PC | keyboard (pc, vt220, sun, hp,
sco, rxvt, linux) |
| Keyboard and bell | Bell: Sound / Visual / Sound and visual / None | What happens when a program rings the bell. Visual flashes a frame around the terminal. | Sound | bell (sound, visual,
both, none) |
| Keyboard and bell | Answerback | Text sent back when a program sends the ENQ character. Almost nothing uses this; leave it empty. | Empty | answerback |
| Safety | Confirm a paste of several lines | Before pasting several lines into a program that would run them at once, the terminal shows a question and waits for Enter. | On | paste-confirm |
| Safety | Programs can read the clipboard | Lets programs in the terminal read what you last copied. This includes programs on other machines over ssh. Off is safer. | Off | clipboard-read |
| Safety | Programs can set the clipboard | Lets programs in the terminal put text on the clipboard, as tmux and vim can do over ssh. | Off | clipboard-write |
| Output | Log file | Everything programs display, from the moment the terminal starts, is added to the end of
this file (a full path, or a path that starts with ~/). Empty: no log. | Empty | log-file |
| Output | Print command | A shell command that receives what a program sends to the printer, for example
lpr. Empty: no printer. | Empty | print-command |
A program in the terminal can never move, resize or raise Unryu's window. terminal.conf has a key for this,
window-ops, but Unryu always keeps it off.
9. Build
The Build page holds the commands of the Build menu. Build and Run explains the commands, the placeholders and the projects in detail; this section lists the controls. The page has three parts, each a row in the page tree:
- Language commands (for example "C commands"): the commands of the current document's language, by default Compile, Build and Lint (3 commands).
- Independent commands: the commands that are the same for every language. They are yours to fill in: 4 empty commands by default (for Rust files, Cargo Build, Cargo Test and Cargo Bench). A Makefile's own commands (Make, Make Custom Target..., Make Clean) are its language commands.
- Execute commands: the commands that run the program, by default 2.
If the current document has no language, the language and Execute parts show only the message "The document has no language. These commands are for a language: open a file of the language, then set them here."
| Control | What it does | Default |
|---|---|---|
| Only for the project "name" | Shown only when the current document belongs to a project. On: the rows show and change the commands that are only for this project, instead of those for every project. The switch is the same on all three parts. A project command that you do not change keeps following the command for every project. | Off, or On when the project already has commands of its own |
| Number of commands | How many commands of this group the Build menu shows (1 to 9). The rows below show or hide at once as you change it. Commands that go out of the menu are kept, and come back if you raise the number again. | 3, 4 and 2 |
| Error regular expression | Not on the Execute part. A pattern that finds the file name and the line number in a command's output, so that a click on an error goes to its line. Empty: the built-in patterns, which understand gcc, clang and most compilers. | Empty for most languages. CUDA, GDScript, JavaScript, Nim, Perl, Python, Rust and XML have a pattern of their own. |
| Label (in each numbered row) | The command's name in the Build menu. | The default command's name |
| Command | The command line to run. %d, %e, %f, %p and
%l are replaced as the note under the rows explains (see Build and Run). A command
with no label and no command line does not show in the Build menu. | The language's default |
| Working directory | The folder the command runs in. Empty: the folder of the file for the language's commands and Execute, and the project's folder (%p) for the independent commands. The same placeholders
work here. | Empty |
| Reset | Puts the row back to its default. For a project's own command, the default is the command for every project. |
Apply or OK writes the commands to ~/.config/unryu/build.conf and rebuilds the Build menu. The file is
written only when you changed something on this page.
10. Templates
The page starts with the note "Set the information to be used in templates. See the documentation for details." These
values fill in the file templates (File > New (with Template)); see Editing. All of them are
stored in unryu.conf.
| Control | What it is | Default | Key |
|---|---|---|---|
| Developer | Your name. | The real name of your user account (up to its first comma), or your login name if the account has none | template-developer |
| Initials | Your initials. | The first letter of each word of the default Developer | template-initials |
| Mail address | Your e-mail address. | login@hostname | template-mail |
| Company | Your company or organization. | Empty | template-company |
| Initial version | The version number a new file starts with. | 1.0 | template-version |
| Year | A date format (strftime form) for the year. | %Y | template-year |
| Date | A date format for the date. | %Y-%m-%d | template-date |
| Date & time | A date format for the date and time. | %d.%m.%Y %H:%M:%S %Z | template-datetime |
11. Keybindings
This page changes the keyboard shortcut of any action. The default shortcuts are listed in Keyboard Shortcuts.
| Control | What it does |
|---|---|
| Filter | Type part of an action's name, its group, or its keys to make the list shorter. |
| The list | Each action as "Group: Action = keys". "(none)" means the action has no keys. Double-click an action to change its keys. |
| Change | Changes the keys of the selected action. It is greyed until you select an action. |
To change a shortcut:
- Select the action in the list (use the Filter to find it).
- Press Change, or double-click the action. The line under the button asks you to press the new shortcut.
- Press the new keys, for example
Ctrl+Shift+K. Ctrl, Shift and Alt can be part of a shortcut. PressBackspacealone to give the action no keys, orEscapeto keep the keys it has. - Press Apply or OK.
Your shortcut takes effect before Unryu's own keys. When you move an action to other keys, its old keys no longer do that action; the editor gets them instead. Every menu item shows its keys as they are now, and Help > Keyboard Shortcuts lists your changed keys at its end.
Only the actions you changed are saved, in ~/.config/unryu/keybindings.conf, one line for each:
Group: Action = keys, for example Edit: Preferences = Ctrl+Alt+P. An empty value means no keys.
To go back to a default, select the action here, press Change and press its default keys (listed in
Keyboard Shortcuts). You can also remove the action's line from the file and use Tools >
Reload Configuration.
12. Printing
These settings are what File > Print starts with. All of them are stored in unryu.conf. The print
dialog has the same options, and what you choose there is also kept here. The printing font and its size are on the
Interface page, in the Fonts group (section 4).
| Control | What it does | Default | Key |
|---|---|---|---|
| Use an external command for printing | File > Print runs a command of yours. | Off | print-external (1 external, 0 native) |
| Command | The external print command. %f is replaced by the file to print. | lpr %f | print-command |
| Use native printing (PostScript, to lp or to a file) | Unryu lays out the pages itself and sends them to a printer or to a file. | On | (the other value of print-external) |
| Print line numbers | Prints each line's number in front of it. | On | print-line-numbers |
| Print page numbers | Prints the page number on each page. | On | print-page-numbers |
| Print page header | Prints a header with the file's name and the date on each page. | On | print-header |
| Use the basename of the printed file | The header shows only the file's name, not its full path. | Off | print-basename |
| Date format | The date in the header, in strftime form. %c is the usual date and time of your
locale. | %c | print-date-format |
The print dialog and File > Page Setup keep some more options in unryu.conf that have no control in
Preferences:
| Option in the print dialog | Default | Key |
|---|---|---|
| Paper size: A4, Letter, Legal, A3, A5 | A4 | print-paper (0 to 4, in that order) |
| Orientation: Portrait or Landscape | Portrait | print-landscape |
| Print in color | On | print-color |
| File format of Print to File: PDF or PostScript | print-file-format (pdf or ps) | |
| Wrap long lines | On | print-wrap |
| Do not split words | On | print-wrap-words |
13. Various
This page lists the preferences that have no control of their own. Select one in the list, then type its value in the
field under the list; the list shows the new value as you type. The page warns: "read the manual before changing these
preferences." They are stored in unryu.conf under the same names.
| Name | What it does | Default |
|---|---|---|
custom-date-format | The format that Edit > Insert Date > Use Custom Date Format inserts, in
strftime form (for example %A, %d %B %Y). | Empty |
trusted-compilers | Paths of compilers, separated by colons, that a project may name for the
analysis beyond the system's own compilers. A compiler not on this list will not run. A compiler wrapper
(ccache and the like) never runs, even when listed. See Safety. | Empty |
check-folders | Folders, separated by colons (~ for your home folder), that the
compiler check and the analysis may read even when they are hidden folders of your home, and that the compiler
searches for headers after all others. For headers of libraries you installed in your home folder. Your home folder
itself is never let in. See Build and Run and Safety. | ~/.local/include |
fif-encoding | The encoding that Find in Files reads files in. See Find and Replace. | UTF-8 |
14. The configuration files
Unryu keeps its settings in the folder ~/.config/unryu. If the environment variable
XDG_CONFIG_HOME is set, the folder is $XDG_CONFIG_HOME/unryu instead. Unryu makes the folder when it
needs it.
| File | What it holds |
|---|---|
unryu.conf | Nearly all of Preferences, plus what the dialogs remember (section 15). |
terminal.conf | The Terminal page's settings, other than the theme and Shell integration. |
keybindings.conf | The shortcuts you changed on the Keybindings page. |
build.conf | The Build page's commands and numbers of commands (see Build and Run). |
projects.conf | Your corrections to which folder is a project (Tools > Set Project Folder and its neighbours; see Build and Run). |
snippets.conf | Your own snippets (see Editing). |
documentation.conf | Your own commands for Help > Look Up Documentation (see The Window). |
words.txt | The words you added to the spelling dictionary, a word a line (see Editing). |
macros.conf | Your saved macros: recorded keys, and the keys that play them (see Editing). |
templates/ | Your own file templates. |
editor_themes/, themes/ | The editor themes and the window themes (see Themes). |
languages/ | Your own copies of language files (see Languages). |
open_files.txt, recent_files.txt, recent_projects.txt, file_settings.txt,
window.txt, dock_layout.txt | What Unryu remembers between sessions: the open tabs, the recent files and projects, each file's Document menu settings, the window's size and place, and the panel layout (see Files and The Window). |
The format. unryu.conf, keybindings.conf and build.conf are plain text with
one setting per line, written as key = value (build.conf is written as key=value;
both forms are read). A line that starts with ; or # is a
comment, and a line such as [main] starts a section. On and off are written as 1 and
0. terminal.conf has the same form, with all its keys in one [terminal-widget]
section, as in a terminal theme file; Unryu writes it only when a terminal setting changes. A key that is missing from a
file gets its default, and a key that Unryu does not know is ignored.
Editing the files by hand. You can edit these files in any editor, or in Unryu itself:
Tools > Configuration Files opens unryu.conf, keybindings.conf, build.conf,
snippets.conf, macros.conf, documentation.conf or words.txt in a tab (it makes the file first if it does not exist), and its Language Files submenu opens
your copy of a language file. After saving, choose Tools > Reload Configuration. It reads
unryu.conf, terminal.conf, keybindings.conf, build.conf,
projects.conf, the language files and the templates again, applies them at once, and says "Configuration files
reloaded." in the status bar.
Unryu writes unryu.conf again from the settings it has in memory whenever it saves a setting:
for example at Apply or OK, when you close Preferences on another page, or when the print dialog closes. A hand edit that
you have not yet loaded with Reload Configuration is lost at that moment. So reload right after you save the file, or edit
it while Unryu is not running.
15. Settings with no control in Preferences
Besides the Various page, unryu.conf holds these keys. Unryu sets them itself from what you do elsewhere;
you can also change them by hand.
| Key | What it is | Default |
|---|---|---|
show-menubar | Whether the menu bar shows (View > Show Menubar, F10). | 1 |
custom-command-1 ... custom-command-10 | The commands of Edit > Format > Send Selection to. Only the ones you set are written. | None |
color-format | The code format last chosen in Tools > Color Chooser (0 is
#RRGGBB). | 0 |
file-filter | The file type last chosen in the Open and Save dialogs, by name. Empty: All Files. | Empty |
popup-width, popup-height, popup-font-delta | The size you dragged the documentation popup to (0: its own size), and how much larger its text is (Ctrl and the mouse wheel in it). | 0, 0, 0 |
preferences-page, preferences-part | The Preferences page and part you were on last. | 0, 0 |
find-case, find-whole-word, find-word-start, find-regex,
find-multiline, find-escapes, find-backwards, find-close-dialog,
find-expanded, find-position | What the Find dialog remembers: its options, whether it closes after a search, whether its extra options are shown, and where it was on the screen. | All 0, except find-close-dialog 1 |
replace-case ... replace-position | The same for the Replace dialog. | All 0, except replace-close-dialog 1 |
fif-case, fif-whole-word, fif-regex, fif-invert,
fif-recursive, fif-files-mode, fif-patterns, fif-position | What the Find in Files dialog remembers: its options, which files it searches and the file patterns, and where it was on the screen. See Find and Replace. | fif-case 1, the others 0 or empty |
In terminal.conf, the key window-ops is written but has no effect: Unryu never lets a program in
the terminal move or size its window.