Guide / 14
Your own menu items
Add any command to the right-click menu with a small text file.
Where it is
~/.config/omanta/actions
What you can do
- Each action is one .toml file in ~/.config/omanta/actions. Omanta notices new and changed files straight away.
- It needs a name (the menu label) and a command. In the command, %F stands for all the chosen files and %f for one at a time.
- mimetypes and extensions choose which files it's for; directories = false leaves folders out; under limits it to files inside certain folders.
- requires hides the action unless those programs are installed.
- Actions appear at the end of the right-click menu, only when something selected is one they're for.
- Omanta comes with actions for LocalSend, Omarchy-Send, Transcode and Dropbox links, which appear when those are installed.
In this film
- One file per actionA name, a command and which files it's for
- Put it in ~/.config/omanta/actionsOmanta picks it up straight away
- It's at the end of the right-click menuOnly for the files it's meant for
- Omanta comes with a fewLocalSend, Transcode, Dropbox links: when they're installed
An example
The action from the film, saved as ~/.config/omanta/actions/png-copy.toml:
# Save a PNG copy of each picture, next to the original.
name = "Save a PNG Copy"
plural = "Save %n PNG Copies"
command = "magick mogrify -format png %F"
requires = ["magick"]
mimetypes = ["image/*"]
directories = false
Everything an action can say
name | The menu label. Required. |
plural | The label when several files are chosen; %n becomes how many. |
command | What to run. Required. %F is every chosen file, %f one file. It's run directly, not through a shell. |
each = true | Run the command once per file. |
terminal = true | Run it in a floating Omarchy terminal, so you can see its output. |
requires | Programs that must be installed, or the action stays hidden. |
mimetypes | Which kinds of file it's for, such as ["image/*"]. |
extensions | File endings it's also for, such as [".heic"]. |
directories | false leaves folders out. |
under | Only for files inside these folders, such as ["~/Dropbox"]. |
Values are quoted text, true or false, or a list on one line. A file with the same name as one Omanta comes with replaces it.