##Note:
I've discovered the menus are more-or-less as customizable as one would like, although it is mildly annoying to do this. Simply write your own Menu
expression and use FrontEndExecute@ResetMenusPacket[{expr}]
. If someone more expert has a better way, though, I would really like to know it.
For those glancing through, here is a minimal example of a dynamically editable menu-symbol:
$FEMenuRoot=Import[<your_MenuSetup.tr_file>];
$feStoredMenu = Automatic;
$FrontEndMenu := Replace[$feStoredMenu, Automatic -> $FEMenuRoot];
$FrontEndMenu /:
HoldPattern[Set[$FrontEndMenu, m : _Menu]] :=(
$feStoredMenu = m;
FrontEndExecute@ResetMenusPacket[{m}]
);
$FrontEndMenu /:
HoldPattern[
Set[$FrontEndMenu, Automatic]] :=
(
$feStoredMenu = Automatic;
FrontEndExecute@ResetMenusPacket[{Automatic}]);
$FrontEndMenu /:
HoldPattern[
Unset[$FrontEndMenu]] :=
($FrontEndMenu = Automatic;);
Then do something like:
$FrontEndMenu =
Menu["Mathematica",
{
Menu["DoopDoop", {
MenuItem["Copy", "Copy", MenuKey["C", Modifiers -> {"Command"}]],
MenuItem["Cut", "Cut", MenuKey["X", Modifiers -> {"Command"}]],
MenuItem["Paste", "Paste",
MenuKey["V", Modifiers -> {"Command"}]],
MenuItem["Save", "Save", MenuKey["S", Modifiers -> {"Command"}]],
MenuItem["Save as WL",
KernelExecute@
FrontEndTokenExecute["SaveRename",
{StringReplace[NotebookFileName[], ".nb" -> ".wl"], "Package"}
],
MenuKey["S", Modifiers -> {"Command", "Shift"}],
MenuEvaluator -> "Local",
Method -> "Queued"
],
MenuItem["Revert Menus",
KernelExecute[$FrontEndMenu =.],
MenuKey["R", Modifiers -> {"Command"}],
MenuEvaluator -> "Local"]
}],
Menu["", {
MenuItem["Musak",
KernelExecute@
SystemOpen@"https://www.youtube.com/watch?v=_lYx6dIKfos",
MenuEvaluator -> "Local"
]
}
]
}];
And you have menus you can play with.
##Original Question:
So I've been playing with FrontEnd`AddMenuCommands
recently and I wanted to figure out what all I could do with it.