OpenSearchSafari
1.0.0

Safari Extension that allows for any custom search engine to be used within Safari's smart search bar. Implemented via js injection code.
You can distribute, remix, tweak, and build upon this work, even commercially, as long as credit is given for the original creation. Attribution 4.0 International CC BY 4.0
Compile with xCode, then activate the 'Open Search' extension in Safari.
All the functionality is within the customSearch.js file. You just have to define your search engine with its query string in 'customSearchEngineQueryLink' var (the default is Ecosia).
Swift Safari Extension Wrapper Code: RedirectPlease by Alex Perathoner (GNU GPL 3)