Install Omanta

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

  1. One file per actionA name, a command and which files it's for
  2. Put it in ~/.config/omanta/actionsOmanta picks it up straight away
  3. It's at the end of the right-click menuOnly for the files it's meant for
  4. 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

nameThe menu label. Required.
pluralThe label when several files are chosen; %n becomes how many.
commandWhat to run. Required. %F is every chosen file, %f one file. It's run directly, not through a shell.
each = trueRun the command once per file.
terminal = trueRun it in a floating Omarchy terminal, so you can see its output.
requiresPrograms that must be installed, or the action stays hidden.
mimetypesWhich kinds of file it's for, such as ["image/*"].
extensionsFile endings it's also for, such as [".heic"].
directoriesfalse leaves folders out.
underOnly 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.