TYDRA-ACTIONS(5)
π NAME π
okay so bestie, this is TYDRA-ACTIONS(5), aka the Tydra action file reference. No cap, it's giving βmanual page but make it cute,β and it's here to explain Tydra action files. π
β¨ SYNOPSIS β¨
Tydra action files are stored in YAML files. It is recommended that you read up on YAML so you understand the syntax, like βLearn YAML in five minutesβ over at https://www.codeproject.com/Articles/1214409/Learn-YAML-in-five-minutes. π«Ά
Particular areas that might give you issues unless you understand them include:
- Some strings needing quotes, while others do not.
- Lists of maps and indentation rules for them.
The main outline of the file can be illustrated using this small example:
global:
layout: columns
pages:
root:
groups:
- entries:
- shortcut: a
title: Print a
command: echo a
global(optional) β See GLOBAL SETTINGS below.pages(required) β A map of pages, where the name of the page is the key and the value is the page specification. See PAGE below.
π GLOBAL SETTINGS π
The global settings let you set configuration that applies by default to pages / groups / entries. You donβt need to provide any settings if you donβt want to. π
layout(optional) β Sets the default layout for pages that donβt override it. Allowed values arecolumnsandlist.shortcut_color(optional) β Sets the color to use when rendering the shortcut key. Allowed values arereset,black,blue,cyan,green,magenta,red,white, andyellow.
π¦ PAGE π¦
Pages contain groups of entries (see GROUP) and some additional settings and texts. The groups will be rendered in the layout set in the settings.
title(optional) β The title of the page.header(optional) β Introduction text before showing the entries. You could explain the page here.footer(optional) β Text after showing the entries. You could place notices or some other information about the page here.settings(optional) β The same collection of settings that are inside the GLOBAL SETTINGS, only here they apply to the current page instead. If this is not provided, then the global settings will be used as-is.groups(required) β A list of groups. See GROUPS.
π GROUPS π
Groups is a single grouping of menu entries (see ENTRY) along with some additional metadata and settings.
title(optional) β The title of this group.settings(optional) β The same settings as GLOBAL SETTINGS, but only the settings that affect entries will be taken into account. Settings not provided here will be inherited from the parent page, then the global settings.entries(required) β A list of entries that should be inside this group. See ENTRY.
π ENTRY π
Entries are the thing that you select in menus. They have a lot of things to customize.
title(required) β The title of the entry. This is the text that youβll see on the screen.shortcut(required) β A single character that will be used to trigger this entry. For exampleawould mean that the entry is selected by pressingaon your keyboard. Shortcuts must be unique for a single page or else you will get a validation error.command(optional) β The command to execute when triggering this entry. It is optional because sometimes you want entries to navigate to different pages, and in those cases you do not need a command. Seereturn. Commands can be given in two formats. Either as a single string, which means that it will be run as a shell-script to/bin/sh, or as a structure with anameandargskey.
command: xdg-open https://example.net
command: |
if [[ -f ~/.local/bookmarks.html ]]; then
xdg-open ~/.local/bookmarks.html
fi
command:
name: xdg-open
args:
- "https://example.net"
shortcut_color(optional) β Sets the color for the shortcut character when shown to the user. Will be taken from the settings in the parent GROUP, then PAGE, and lastly the GLOBAL SETTING if not provided before then. See GLOBAL SETTINGS for a complete list of supported colors.mode(optional) β Instructs tydra on how to run the command. Supported values arenormal,wait,execandbackground.normal(default) β This mode pauses tydra and runs the command in your normal terminal screen.waitβ This is identical tonormal, but waits for the user to press enter before continuing after the command has finished. This is useful for entries that are meant to resume tydra after being run (seereturn) where the user wants to see the output before continuing.execβ This mode replaces tydra with the new command. This is great if you donβt want to resume tydra after the command (seereturn) or if the process is long-running asexecprevents tydra from being the process parent.backgroundβ Runs the command in the background, disconnected from tydra. Depending onreturntydra either resumes immediately, or exits immediately. This is great for spawning GUI applications, or to run commands that do not require feedback (like increasing volume).
return(optional) β Sets the return mode of the entry. Allowed values arefalse,true, or the name of another page. Note that when (or if at all) tydra returns depend on the mode of the entry; if youexecthe command tydra cannot return after it. If you run the command inbackground, then this return action will be taken immediately, but bothnormalandwaitwill only perform it after the command finishes. If tydra does not run with the--ignore-exit-statusoption, then a failing command will also exit tydra. This is to help you find bugs in your scripts.trueβ Return to the same page again after the command runs.falseβ Exit tydra after the command runs.- Another pageβs name β Return to this page after the command runs. If the page name cannot be found in the action file, you will get a validation error.
πΈ EXAMPLES πΈ
Examples are not currently provided.
π AUTHORS π
Magnus Bergmark <magnus.bergmark@gmail.com>.
okay bestie, thatβs the whole TYDRA-ACTIONS(5) situation π
β¨ β Version 1.0.2, March 2020, and the manual page is out. ππ«Ά
π¦ where this page comes from
- nixos 26.05: tydra 1.0.3
- nixpkgs unstable: tydra 1.0.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms