Yes, I quickly learned to appreciate the value of good feedback when I started modding, so I'm happy to return the favour. :)
Here's another mod I was thinking of. This one has a keybind to show/hide the Trash button.
I have another suggestion for you, but this one is a bit more challenging so you may want to leave it for last: An extensible item denylist.
Here's a good example of how to do this in valves-lib; you'd declare something like this in data.lua:
data:extend{
{
type = "mod-data",
name = "inventory-trash-slot",
data = {
denylist = { }
}
},
}
Other mods can depend on you and add items they don't want to be deleted like so:
data.raw["mod-data"]["inventory-trash-slot"].data.denylist["cube-ultradense-utility-cube"] = true
In your control.lua runtime code, you can access this list via:
prototypes.mod_data["inventory-trash-slot"].data.denylist
The primary example is Ultracube if you hadn't guessed, which must not be deleted or duplicated under any circumstance.
EDIT: You may also be interested in using styles if you plan on making more GUI mods, but you can probably get away with not using them for this one.