Wrapping CommandsΒΆ

Wrapped commands can be useful in certain environments:

:wrap-cmd "uwsm-app --"
a "Apps"
{
    b "Brave" %{{brave}}
    k "Kitty" %{{kitty}}
}
m "Music" +wrap "%(wrap_cmd) kitty -e"
{
    n "ncmpcpp" %{{ncmpcpp}}
}
a "Apps"
{
    b "Brave" %{{uwsm-app -- brave}}
    k "Kitty" %{{uwsm-app -- kitty}}
}
m "Music"
{
    n "ncmpcpp" %{{uwsm-app -- kitty -e ncmpcpp}}
}

Some Wayland window managers, like Hyprland, benefit from special tools like uwsm. In other cases, it may be useful to apply a common prefix to some key chords via wrapping. This is something that hooks cannot do as they run standalone commands.

You can wrap commands globally by setting :wrap-cmd "global-wrap", or locally with +wrap "local-wrapper". The global command wrapper can be accessed via interpolation with %(wrap_cmd).

See also

Read the complete documentation on wrapping commands here.