Beta ueli react 2

This commit is contained in:
Oliver Schwendener 2023-06-08 06:50:42 +02:00
parent 9890db2ffc
commit 4f5d68f763
No known key found for this signature in database
GPG Key ID: 9D7534C37392C067
355 changed files with 2504 additions and 30570 deletions

View File

@ -1,6 +1,6 @@
MIT License
Copyright ©️ 2022 Oliver Schwendener
Copyright (c) 2023 Oliver Schwendener
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

344
README.md
View File

@ -1,335 +1,37 @@
# ueli
# Electron + Fluent UI React
This is a keystroke launcher for Windows and macOS.
This is a repo to quickly start the development of an electron application with [Fluent UI React](https://react.fluentui.dev/).
![example-image](assets/feature-app-search.png)
## Table of contents
- [Installation](#installation)
- [Features](#features)
- [Keyboard shortcuts](#keyboard-shortcuts)
- [Supported Languages](#supported-languages)
- [Settings](#settings)
- [Updating](#updating)
- [Privacy](#privacy)
- [Known bugs](#known-bugs)
- [Development](#development)
- [Alternatives](#alternatives)
- [License](#license)
- [Release notes](https://github.com/oliverschwendener/ueli/releases)
## Installation
### Installer / Zip
- Download the latest version from here: https://ueli.app/#/download
- Run the installer or unzip
- Run the application
> Note: because the executables are not signed Windows and macOS will probably prevent you from executing the installer or the program itself.
### Install with [Windows Package Manager](https://learn.microsoft.com/en-us/windows/package-manager/)
- `PS> winget install ueli`
### Installing via chocolatey repository
- Open a powershell with administration rights (Right click on your start button and click `Windows PowerShell (Admin)`
- `PS> choco install ueli`
- Accept the upcoming prompt by entering `y` or run above command with `-y` switch
- Run the application
### Installing on MacOS via `brew`
- `brew install --cask ueli`
## Features
### Application Search
This plugin is searching for applications on your computer. You can specify the folders where your applications are installed and which file extension should be used to recognize an application.
![app-search](assets/feature-app-search.png)
### Browser bookmarks
This plugin enables you to search your browser bookmarks.
Currently supported browsers:
- Google Chrome
- Chromium
- Firefox
- Brave
- Vivaldi
- SideKick
- Microsoft Edge
- Yandex Browser
![browser-bookmarks](assets/feature-browser-bookmarks.png)
### Calculator
This Plugin lets you quickly do simple calculations.
![calculator](assets/feature-calculator.png)
### Color Converter
This plugin enables you to quickly convert colors into different formats.
![color-converter](assets/feature-color-converter.png)
### Commandline
This plugin enables you to quickly execute commandline commands.
![commandline](assets/feature-commandline.png)
### Control panel (Windows only)
This plugin enables you to quickly find control panel items.
![control-panel](assets/feature-control-panel.png)
### Currency Converter
This plugin enables you to quickly convert currencies. The latest conversion rates are provided by https://exchangeratesapi.io/.
![currency-converter](assets/feature-currency-converter.png)
### Dictionary
This plugin enables you to quickly look up the definition and synonyms of words. It uses an unofficial Google Dictionary API (https://dictionaryapi.dev/)
![dictionary](assets/feature-dictionary.png)
### Email
This plugin enables you to quickly start writing an email by typing in an email address.
![email](assets/feature-email.png)
### Everything (Windows only)
This feature enables you to use [Everything Search](https://www.voidtools.com) to find files and folders on your local file system.
1. Install "Everything" and the "Everything Command-line interface" from [https://www.voidtools.com/downloads](https://www.voidtools.com/downloads).
2. Specify the file path to `es.exe` in ueli's settings.
![everything](assets/feature-everything.png)
### mdfind (macOS only)
This plugin enables you to use the native macOS search to find files and folders on your local file system.
![mdfind](assets/feature-mdfind.png)
### File Browser
This plugin enables you to browse through your local file system. To start you have to enter a valid absolute filepath.
![file-browser](assets/feature-file-browser.png)
### Lorem Ipsum
This plugin enables you to copy sample text to your clipboard. To start, type lipsum followed by a number.
### Operating System Commands
Operating system commands are simple commands to control your operating system e.g. to shutdown or restart your computer.
![operating-system-commands](assets/feature-operating-system-commands.png)
### Operating System Settings
This plugin enables you to quickly find operating system settings.
![operating-system-settings](assets/feature-operating-system-settings.png)
### Shortcuts
This plugin enables you to quickly open files or websites by setting up your own shortcuts.
![shortcuts](assets/feature-shortcuts.png)
### Simple Folder Search
This plugin enables you to quickly search for files or folders.
![simple-folder-search](assets/feature-simple-folder-search.png)
### Translation
This plugin enables you to quickly translate words or short sentences. It uses an unofficial [API](https://github.com/imankulov/linguee-api) for [Linguee](https://linguee.de) and may be unstable.
![translation](assets/feature-translation.png)
### UWP (Windows only)
This plugin enables you to find preinstalled UWP apps.
![uwp](assets/feature-uwp.png)
### URL
This plugin enables you to quickly open websites by typing in a URL.
![url](assets/feature-url.png)
### Web Search
This plugin enables you to quickly search the internet with your favorite web search engine by setting up your own web search engines.
![web-search](assets/feature-web-search.png)
### Workflow
This plugin enables you to quickly execute multiple things at once.
![workflow](assets/feature-workflow.png)
## Keyboard shortcuts
| Keyboard shortcut | Description |
| ----------------------------------- | ------------------------------------------------------------ |
| <kbd>Alt</kbd> <kbd>Space Bar</kbd> | Open search box (Default value, can be adjusted in settings) |
| <kbd>Enter</kbd> | Execute selected search result |
| <kbd>Shift</kbd> <kbd>Enter</kbd> | Execute selected program as admin (Windows only) |
| <kbd>Tab</kbd> | Autocomplete file path |
| <kbd>Ctrl</kbd> <kbd>o</kbd> | Open the selected program or file at it's location (Windows) |
| <kbd>Cmd</kbd> <kbd>o</kbd> | Open the selected program or file at it's location (macOS) |
| <kbd></kbd> | Scroll up |
| <kbd></kbd> | Scroll down |
| <kbd>Ctrl or Cmd</kbd> <kbd>p</kbd> | Scroll up |
| <kbd>Ctrl or Cmd</kbd> <kbd>n</kbd> | Scroll down |
| <kbd>Ctrl</kbd> <kbd>i</kbd> | Open settings (Windows) |
| <kbd>Cmd</kbd> <kbd>,</kbd> | Open settings (macOS) |
| <kbd>Shift</kbd> <kbd></kbd> | Browse user input history up |
| <kbd>Shift</kbd> <kbd></kbd> | Browse user input history down |
| <kbd>Ctrl</kbd> <kbd>l</kbd> | Set focus on user input |
## Supported Languages
- English
- Chinese (简体中文)
- Czech (Česky)
- German (Deutsch)
- Hindi (हिन्दी)
- Italian (Italiano)
- Japanese (日本語)
- Korean (한국어)
- Portuguese (Português)
- Russian (Русский)
- Spanish (Español)
- Turkish (Türkçe)
## Settings
![settings](assets/settings.png)
To open the settings simply search for "Settings" or press `Ctrl+i` on Windows or `Cmd+,` on macOS. Here you can start configuring the app to your needs by enabling/disabling features or changing the settings.
## Updating
The check if any updates are available open the settings. Under "General Settings" you can check if an update is available or not.
On Windows you can directly update the app. On macOS you have to manually download the newest release and replace the existing app.
## Privacy
For better search results ueli is keeping track of the applications, files and folders you are executing. If you don't want ueli to track your executions simply open the settings and click on the "three-dot" menu on the top right and choose "Clear execution log" and disable the option "Log execution".
## Known bugs
- ([#37](https://github.com/oliverschwendener/ueli/issues/37)) Window starts to move while typing when custom scaling in Windows is set.
- ([#92](https://github.com/oliverschwendener/ueli/issues/92)) If you see an error that says `spawn powershell.exe ENOENT` check if powershell is installed (should be installed in all recent Versions of Windows by default) and check if powershell is in the PATH variable.
- ([#278](https://github.com/oliverschwendener/ueli/issues/278)) If you're on macOS Catalina you might miss some system apps (for example: Books or QuickTime Player). Try adding `/System/Applications` to your application search settings.
For more check [here](https://github.com/oliverschwendener/ueli/issues).
![example-image.png](docs/example-image.png)
## Development
### Requirements
- Install dependencies
- Git
- Node 16.x.x
- pnpm
```
$ pnpm install
```
### Setup
- Run app in dev mode
```
$ git clone https://github.com/oliverschwendener/ueli
$ cd ueli
$ pnpm
```
```
$ pnpm dev
```
### Run
- Lint files
```
$ pnpm bundle
$ pnpm start
```
```
$ pnpm lint
```
### Debug
- Perform typecheck
For debugging Visual Studio Code is recommended.
```
$ pnpm typecheck
```
1. Go to .vscode folder
2. Make a copy of launch.example.json and rename it to launch.json
3. Select one of the preconfigured debug modes and start debugging
- Build app
### Run tests
```
$ pnpm test
```
### Build the app
#### Create portable version
```
$ pnpm exec electron-builder --dir --config electron-builder-config.yml --publish never
```
#### Create installer
```
$ pnpm exec electron-builder --config electron-builder-config.yml --publish never
```
## Alternatives
- [Launchy](https://www.launchy.net/)
- [Wox](https://github.com/Wox-launcher/Wox)
- [Microsoft PowerToys Run](https://docs.microsoft.com/en-us/windows/powertoys/run)
- [Fluent Search](https://www.fluentsearch.net/)
- [Flow-Launcher](https://github.com/Flow-Launcher/Flow.Launcher)
- [Keypirinha](https://keypirinha.com/)
- [Listary](https://www.listary.com/)
- [Alfred](https://www.alfredapp.com/)
- [Raycast](https://www.raycast.com/)
- [Hain](https://github.com/hainproject/hain)
- [Zazu App](https://zazuapp.org/)
- [Cerebro](https://cerebroapp.com/)
For more check [here](https://alternativeto.net/software/ueli).
### Contributors Wall
<a href="https://github.com/oliverschwendener/ueli/graphs/contributors">
<img src="https://contrib.rocks/image?repo=oliverschwendener/ueli" />
</a>
_Note: It may take up to 24h for the [contrib.rocks](https://contrib.rocks/image?repo=oliverschwendener/ueli) plugin to update because it's refreshed once a day._
## Thanks
Thanks to [David Gabathuler](https://davidgabathuler.ch) for the logo!
## License
Copyright ©️ Oliver Schwendener. All rights reserved.
Licensed under the [MIT](LICENSE) License.
```
$ pnpm build && pnpm package
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 886 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 719 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View File

@ -1,7 +0,0 @@
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 600 600" xml:space="preserve">
<path d="M59,121.6l81.3-46.9c5.9-3.4,13.1-3.4,18.9,0l80.8,46.9c5.8,3.4,9.4,9.6,9.4,16.4v187.2c0,14.6,15.8,23.7,28.4,16.4l62.4-36
c5.9-3.4,9.5-9.6,9.5-16.4l0-209c0-6.8,3.6-13,9.5-16.4l81-46.8c5.9-3.4,13.1-3.4,18.9,0l81,46.8c5.9,3.4,9.5,9.6,9.5,16.4v324.4
c0,6.8-3.6,13-9.5,16.4L259.2,583.1c-5.9,3.4-13.1,3.4-18.9,0L59,478.4c-5.9-3.4-9.5-9.6-9.5-16.4V137.9
C49.6,131.2,53.2,124.9,59,121.6z"/>
</svg>

Before

Width:  |  Height:  |  Size: 597 B

BIN
build/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
build/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -0,0 +1,43 @@
"use strict";
const electron = require("electron");
const path = require("path");
const createBrowserWindow = (appIsPackaged) => {
const preloadScriptFilePath = appIsPackaged ? path.join(__dirname, "..", "..", "dist-electron", "preload", "index.js") : path.join(__dirname, "..", "preload", "index.js");
return new electron.BrowserWindow({
autoHideMenuBar: true,
webPreferences: {
preload: preloadScriptFilePath
},
vibrancy: "window",
backgroundMaterial: "auto",
frame: false,
height: 60
});
};
const loadFileOrUrl = (browserWindow, appIsPackaged) => {
appIsPackaged ? browserWindow.loadFile(path.join(__dirname, "..", "..", "dist", "index.html")) : browserWindow.loadURL(process.env.VITE_DEV_SERVER_URL);
};
const registerIpcEventListeners = (browserWindow) => {
electron.ipcMain.on("themeShouldUseDarkColors", (event) => {
event.returnValue = electron.nativeTheme.shouldUseDarkColors;
});
electron.ipcMain.on(
"settingsOpenStateChanged",
(_, { settingsOpened }) => browserWindow.setBounds({ height: settingsOpened ? 600 : 60 })
);
};
const registerNativeThemeEventListeners = (allBrowserWindows) => {
electron.nativeTheme.addListener("updated", () => {
for (const browserWindow of allBrowserWindows) {
browserWindow.webContents.send("nativeThemeChanged");
}
});
};
(async () => {
await electron.app.whenReady();
const browserWindow = createBrowserWindow(electron.app.isPackaged);
loadFileOrUrl(browserWindow, electron.app.isPackaged);
registerIpcEventListeners(browserWindow);
registerNativeThemeEventListeners(electron.BrowserWindow.getAllWindows());
})();
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../../electron/main/index.ts"],"sourcesContent":["import { app, BrowserWindow, ipcMain, IpcMainEvent, nativeTheme } from \"electron\";\nimport { join } from \"path\";\n\nconst createBrowserWindow = (appIsPackaged: boolean): BrowserWindow => {\n const preloadScriptFilePath = appIsPackaged\n ? join(__dirname, \"..\", \"..\", \"dist-electron\", \"preload\", \"index.js\")\n : join(__dirname, \"..\", \"preload\", \"index.js\");\n\n return new BrowserWindow({\n autoHideMenuBar: true,\n webPreferences: {\n preload: preloadScriptFilePath,\n },\n vibrancy: \"window\",\n backgroundMaterial: \"auto\",\n frame: false,\n height: 60,\n });\n};\n\nconst loadFileOrUrl = (browserWindow: BrowserWindow, appIsPackaged: boolean) => {\n appIsPackaged\n ? browserWindow.loadFile(join(__dirname, \"..\", \"..\", \"dist\", \"index.html\"))\n : browserWindow.loadURL(process.env.VITE_DEV_SERVER_URL);\n};\n\nconst registerIpcEventListeners = (browserWindow: BrowserWindow) => {\n ipcMain.on(\"themeShouldUseDarkColors\", (event: IpcMainEvent) => {\n event.returnValue = nativeTheme.shouldUseDarkColors;\n });\n\n ipcMain.on(\"settingsOpenStateChanged\", (_, { settingsOpened }: { settingsOpened: boolean }) =>\n browserWindow.setBounds({ height: settingsOpened ? 600 : 60 })\n );\n};\n\nconst registerNativeThemeEventListeners = (allBrowserWindows: BrowserWindow[]) => {\n nativeTheme.addListener(\"updated\", () => {\n for (const browserWindow of allBrowserWindows) {\n browserWindow.webContents.send(\"nativeThemeChanged\");\n }\n });\n};\n\n(async () => {\n await app.whenReady();\n const browserWindow = createBrowserWindow(app.isPackaged);\n loadFileOrUrl(browserWindow, app.isPackaged);\n registerIpcEventListeners(browserWindow);\n registerNativeThemeEventListeners(BrowserWindow.getAllWindows());\n})();\n"],"names":["join","BrowserWindow","ipcMain","nativeTheme","app"],"mappings":";;;AAGA,MAAM,sBAAsB,CAAC,kBAA0C;AACnE,QAAM,wBAAwB,gBACxBA,KAAAA,KAAK,WAAW,MAAM,MAAM,iBAAiB,WAAW,UAAU,IAClEA,KAAAA,KAAK,WAAW,MAAM,WAAW,UAAU;AAEjD,SAAO,IAAIC,SAAAA,cAAc;AAAA,IACrB,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,MACZ,SAAS;AAAA,IACb;AAAA,IACA,UAAU;AAAA,IACV,oBAAoB;AAAA,IACpB,OAAO;AAAA,IACP,QAAQ;AAAA,EAAA,CACX;AACL;AAEA,MAAM,gBAAgB,CAAC,eAA8B,kBAA2B;AAC5E,kBACM,cAAc,SAASD,KAAK,KAAA,WAAW,MAAM,MAAM,QAAQ,YAAY,CAAC,IACxE,cAAc,QAAQ,QAAQ,IAAI,mBAAmB;AAC/D;AAEA,MAAM,4BAA4B,CAAC,kBAAiC;AACxDE,WAAAA,QAAA,GAAG,4BAA4B,CAAC,UAAwB;AAC5D,UAAM,cAAcC,SAAY,YAAA;AAAA,EAAA,CACnC;AAEOD,WAAAA,QAAA;AAAA,IAAG;AAAA,IAA4B,CAAC,GAAG,EAAE,eACzC,MAAA,cAAc,UAAU,EAAE,QAAQ,iBAAiB,MAAM,IAAI;AAAA,EAAA;AAErE;AAEA,MAAM,oCAAoC,CAAC,sBAAuC;AAClEC,uBAAA,YAAY,WAAW,MAAM;AACrC,eAAW,iBAAiB,mBAAmB;AAC7B,oBAAA,YAAY,KAAK,oBAAoB;AAAA,IACvD;AAAA,EAAA,CACH;AACL;AAAA,CAEC,YAAY;AACT,QAAMC,SAAAA,IAAI;AACJ,QAAA,gBAAgB,oBAAoBA,SAAA,IAAI,UAAU;AAC1C,gBAAA,eAAeA,aAAI,UAAU;AAC3C,4BAA0B,aAAa;AACL,oCAAAH,SAAAA,cAAc,eAAe;AACnE,GAAG;"}

View File

@ -0,0 +1,8 @@
"use strict";
const electron = require("electron");
electron.contextBridge.exposeInMainWorld("ContextBridge", {
onNativeThemeChanged: (callback) => electron.ipcRenderer.on("nativeThemeChanged", callback),
themeShouldUseDarkColors: () => electron.ipcRenderer.sendSync("themeShouldUseDarkColors"),
settingsOpenStateChanged: (data) => electron.ipcRenderer.send("settingsOpenStateChanged", data)
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbIi4uLy4uL2VsZWN0cm9uL3ByZWxvYWQvaW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY29udGV4dEJyaWRnZSwgaXBjUmVuZGVyZXIgfSBmcm9tIFwiZWxlY3Ryb25cIjtcbmltcG9ydCB7IENvbnRleHRCcmlkZ2UgfSBmcm9tIFwiLi9Db250ZXh0QnJpZGdlXCI7XG5cbmNvbnRleHRCcmlkZ2UuZXhwb3NlSW5NYWluV29ybGQoXCJDb250ZXh0QnJpZGdlXCIsIDxDb250ZXh0QnJpZGdlPntcbiAgICBvbk5hdGl2ZVRoZW1lQ2hhbmdlZDogKGNhbGxiYWNrOiAoKSA9PiB2b2lkKSA9PiBpcGNSZW5kZXJlci5vbihcIm5hdGl2ZVRoZW1lQ2hhbmdlZFwiLCBjYWxsYmFjayksXG4gICAgdGhlbWVTaG91bGRVc2VEYXJrQ29sb3JzOiAoKSA9PiBpcGNSZW5kZXJlci5zZW5kU3luYyhcInRoZW1lU2hvdWxkVXNlRGFya0NvbG9yc1wiKSxcbiAgICBzZXR0aW5nc09wZW5TdGF0ZUNoYW5nZWQ6IChkYXRhKSA9PiBpcGNSZW5kZXJlci5zZW5kKFwic2V0dGluZ3NPcGVuU3RhdGVDaGFuZ2VkXCIsIGRhdGEpLFxufSk7XG4iXSwibmFtZXMiOlsiY29udGV4dEJyaWRnZSIsImlwY1JlbmRlcmVyIl0sIm1hcHBpbmdzIjoiOztBQUdBQSxTQUFBQSxjQUFjLGtCQUFrQixpQkFBZ0M7QUFBQSxFQUM1RCxzQkFBc0IsQ0FBQyxhQUF5QkMsU0FBQUEsWUFBWSxHQUFHLHNCQUFzQixRQUFRO0FBQUEsRUFDN0YsMEJBQTBCLE1BQU1BLFNBQUFBLFlBQVksU0FBUywwQkFBMEI7QUFBQSxFQUMvRSwwQkFBMEIsQ0FBQyxTQUFTQSxTQUFBQSxZQUFZLEtBQUssNEJBQTRCLElBQUk7QUFDekYsQ0FBQzsifQ==

BIN
docs/example-image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

View File

@ -1,38 +0,0 @@
directories:
output: dist
buildResources: bundle
files:
- bundle/**/*.js
- styles/**/*.css
- ./*.html
- img/**/*
- assets/**/*
win:
icon: ./img/icons/win/icon-black.ico
target:
- target: nsis
arch:
- x64
- ia32
- target: zip
arch:
- x64
- ia32
publish:
- github
mac:
icon: ./img/icons/mac/icon-white-circle.icns
category: public.app-category.utilities
target:
- dmg
- zip
publish:
- github
nsis:
allowToChangeInstallationDirectory: true
oneClick: false
perMachine: true

View File

@ -0,0 +1,61 @@
/**
* @type {import('electron-builder').Configuration}
* @see https://www.electron.build/configuration/configuration
*/
const config = {
appId: "com.electron.fluentui",
productName: "Electron Fluent UI",
directories: {
output: "release",
buildResources: "build",
},
files: ["dist-electron/**/*.js", "dist/**/*"],
extraMetadata: {
version: process.env.VITE_APP_VERSION,
},
mac: {
icon: "build/icon.png",
hardenedRuntime: true,
gatekeeperAssess: false,
target: [
{
target: "dmg",
arch: "universal",
},
{
target: "zip",
arch: "universal",
},
],
},
win: {
icon: "build/icon.ico",
target: [
{
target: "msi",
},
{
target: "nsis",
},
{
target: "zip",
},
],
},
linux: {
category: "Utility",
target: [
{
target: "AppImage",
},
{
target: "deb",
},
{
target: "zip",
},
],
},
};
module.exports = config;

51
electron/main/index.ts Normal file
View File

@ -0,0 +1,51 @@
import { app, BrowserWindow, ipcMain, IpcMainEvent, nativeTheme } from "electron";
import { join } from "path";
const createBrowserWindow = (appIsPackaged: boolean): BrowserWindow => {
const preloadScriptFilePath = appIsPackaged
? join(__dirname, "..", "..", "dist-electron", "preload", "index.js")
: join(__dirname, "..", "preload", "index.js");
return new BrowserWindow({
autoHideMenuBar: true,
webPreferences: {
preload: preloadScriptFilePath,
},
vibrancy: "window",
backgroundMaterial: "auto",
frame: false,
height: 60,
});
};
const loadFileOrUrl = (browserWindow: BrowserWindow, appIsPackaged: boolean) => {
appIsPackaged
? browserWindow.loadFile(join(__dirname, "..", "..", "dist", "index.html"))
: browserWindow.loadURL(process.env.VITE_DEV_SERVER_URL);
};
const registerIpcEventListeners = (browserWindow: BrowserWindow) => {
ipcMain.on("themeShouldUseDarkColors", (event: IpcMainEvent) => {
event.returnValue = nativeTheme.shouldUseDarkColors;
});
ipcMain.on("settingsOpenStateChanged", (_, { settingsOpened }: { settingsOpened: boolean }) =>
browserWindow.setBounds({ height: settingsOpened ? 600 : 60 })
);
};
const registerNativeThemeEventListeners = (allBrowserWindows: BrowserWindow[]) => {
nativeTheme.addListener("updated", () => {
for (const browserWindow of allBrowserWindows) {
browserWindow.webContents.send("nativeThemeChanged");
}
});
};
(async () => {
await app.whenReady();
const browserWindow = createBrowserWindow(app.isPackaged);
loadFileOrUrl(browserWindow, app.isPackaged);
registerIpcEventListeners(browserWindow);
registerNativeThemeEventListeners(BrowserWindow.getAllWindows());
})();

View File

@ -0,0 +1,5 @@
export type ContextBridge = {
onNativeThemeChanged: (callback: () => void) => void;
themeShouldUseDarkColors: () => boolean;
settingsOpenStateChanged: (data: { settingsOpened: boolean }) => void;
};

View File

@ -0,0 +1,8 @@
import { contextBridge, ipcRenderer } from "electron";
import { ContextBridge } from "./ContextBridge";
contextBridge.exposeInMainWorld("ContextBridge", <ContextBridge>{
onNativeThemeChanged: (callback: () => void) => ipcRenderer.on("nativeThemeChanged", callback),
themeShouldUseDarkColors: () => ipcRenderer.sendSync("themeShouldUseDarkColors"),
settingsOpenStateChanged: (data) => ipcRenderer.send("settingsOpenStateChanged", data),
});

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 961 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

File diff suppressed because one or more lines are too long

23
index.html Normal file
View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
<title>Electron + Fluent UI React</title>
<style>
.draggable-area {
user-select: none;
-webkit-app-region: drag;
}
.non-draggable-area {
user-select: auto;
-webkit-app-region: none;
}
</style>
</head>
<body style="margin: 0; padding: 0">
<div id="react-app"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>

View File

@ -1,8 +0,0 @@
{
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"verbose": true,
"testRegex": "((test|spec))\\.ts$",
"moduleFileExtensions": ["ts", "js", "json"]
}

View File

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="./styles/app.css" />
<title>ueli</title>
</head>
<body>
<div id="app">
<user-styles :appearance="config.appearanceOptions" :colortheme="config.colorThemeOptions"></user-styles>
<user-input :config="config" :translations="translations"></user-input>
<search-results :appearance="config.appearanceOptions"></search-results>
</div>
<script src="./bundle/renderer.js"></script>
</body>
</html>

View File

@ -1,76 +1,45 @@
{
"name": "ueli",
"productName": "ueli",
"version": "8.24.0",
"name": "electron-fluent-ui",
"description": "Quickstart repository for electron applications using Fluent UI React",
"version": "3.1.2",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/oliverschwendener/ueli"
},
"homepage": "https://ueli.app",
"author": {
"name": "Oliver Schwendener",
"email": "oliver.schwendener@hotmail.com",
"name": "Oliver Schwendener",
"url": "https://github.com/oliverschwendener"
},
"description": "This is a keystroke launcher for Windows and macOS.",
"os": [
"win32",
"darwin"
],
"keywords": [
"keystroke",
"launcher",
"search",
"Windows",
"macOS"
],
"main": "./bundle/main.js",
"main": "dist-electron/main/index.js",
"scripts": {
"lint": "eslint \"src/**/*.ts\"",
"bundle": "webpack --config webpack.config.js",
"start": "electron . --remote-debugging-port=9223",
"test": "jest --config jest.json --silent ."
"build": "vite build",
"dev": "vite",
"lint": "eslint . --ext js,ts,tsx",
"prettier:check": "prettier --check -- src/**/*.{ts,tsx} electron/**/*.ts",
"package:publish": "electron-builder --config electron-builder.config.js --publish always",
"package": "electron-builder --config electron-builder.config.js",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@types/color": "^3.0.3",
"@types/ini": "^1.3.31",
"@types/jest": "^29.4.0",
"@types/node-powershell": "^3.1.0",
"@types/sqlite3": "^3.1.8",
"@types/vue-color": "^2.4.4",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"axios": "^1.2.4",
"color": "^4.2.3",
"electron": "^22.0.3",
"@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4",
"@types/react-router-dom": "^5.3.3",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
"@vitejs/plugin-react": "^4.0.0",
"electron": "^25.0.1",
"electron-builder": "^23.6.0",
"electron-store": "^8.0.1",
"electron-updater": "^5.3.0",
"eslint": "^8.32.0",
"fuse.js": "^6.6.2",
"jest": "^29.4.0",
"mathjs": "^11.5.0",
"node-powershell": "^4.0.0",
"prettier": "^2.8.7",
"simple-plist": "^1.4.0",
"ts-jest": "^29.0.5",
"ts-loader": "^9.4.2",
"typescript": "^4.6.2",
"vue": "^2.7.14",
"vue-color": "^2.8.1",
"vue-eslint-parser": "^9.1.0",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"winston": "^3.8.2"
"eslint": "^8.40.0",
"prettier": "^2.8.8",
"typescript": "^5.1.3",
"vite": "^4.3.9",
"vite-plugin-electron": "^0.11.2",
"vite-plugin-electron-renderer": "^0.14.5"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^6.2.1",
"bulma": "^0.9.4",
"bulma-extensions": "^6.2.7",
"ini": "^3.0.1",
"lorem-ipsum": "^2.0.8",
"sqlite": "^4.1.2",
"sqlite3": "^5.1.4"
"@fluentui/react-components": "^9.19.1",
"@fluentui/react-icons": "^2.0.201",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^6.11.1",
"react-router-dom": "^6.11.1"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="./node_modules/bulma/css/bulma.min.css" />
<link rel="stylesheet" href="./node_modules/bulma-extensions/dist/css/bulma-extensions.min.css" />
<link rel="stylesheet" href="./node_modules/@fortawesome/fontawesome-free/css/all.min.css" />
<link rel="stylesheet" href="./styles/settings.css" />
</head>
<body>
<div id="app">
<settings :config="config" :translations="translations"></settings>
</div>
<script src="./bundle/renderer.js"></script>
</body>
</html>

25
src/App.tsx Normal file
View File

@ -0,0 +1,25 @@
import { FluentProvider, Theme, webDarkTheme, webLightTheme } from "@fluentui/react-components";
import { FC, useEffect, useState } from "react";
import { Routes } from "react-router";
import { Search } from "./Search";
import { Settings } from "./Settings";
import { Route } from "react-router";
export const App: FC = () => {
const getTheme = (): Theme => (window.ContextBridge.themeShouldUseDarkColors() ? webDarkTheme : webLightTheme);
const [theme, setTheme] = useState<Theme>(getTheme);
useEffect(() => {
window.ContextBridge.onNativeThemeChanged(() => setTheme(getTheme()));
}, []);
return (
<FluentProvider theme={theme} style={{ height: "100vh", background: "transparent" }}>
<Routes>
<Route path="/" element={<Search />} />
<Route path="/settings/*" element={<Settings />} />
</Routes>
</FluentProvider>
);
};

19
src/Search/Search.tsx Normal file
View File

@ -0,0 +1,19 @@
import { Button } from "@fluentui/react-components";
import { FC } from "react";
import { useNavigate } from "react-router";
export const Search: FC = () => {
const navigate = useNavigate();
const openSettings = () => {
navigate({ pathname: "/settings/general" });
window.ContextBridge.settingsOpenStateChanged({ settingsOpened: true });
};
return (
<div>
Search
<Button onClick={openSettings}>Open Settings</Button>
</div>
);
};

1
src/Search/index.ts Normal file
View File

@ -0,0 +1 @@
export * from "./Search";

41
src/Settings/Header.tsx Normal file
View File

@ -0,0 +1,41 @@
import { Button, Text } from "@fluentui/react-components";
import {
Dismiss16Filled,
Dismiss24Filled,
DismissCircle16Filled,
DismissCircle24Filled,
DismissCircle28Filled,
DismissCircle32Filled,
DismissCircle48Filled,
} from "@fluentui/react-icons";
import { FC } from "react";
type HeaderProps = {
onCloseSettingsClicked: () => void;
};
export const Header: FC<HeaderProps> = ({ onCloseSettingsClicked }) => {
return (
<div
className="draggable-area"
style={{
display: "flex",
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
padding: 10,
boxSizing: "border-box",
}}
>
<Text weight="semibold" style={{ padding: "0 10px" }}>
Settings
</Text>
<Button
className="non-draggable-area"
appearance="transparent"
onClick={onCloseSettingsClicked}
icon={<DismissCircle24Filled />}
></Button>
</div>
);
};

View File

@ -0,0 +1,27 @@
import { Tab, TabList } from "@fluentui/react-components";
import { FC } from "react";
import { SettingsPage } from "./Pages";
type NavigationProps = {
path: string;
settingsPages: SettingsPage[];
onNavigate: (path: string) => void;
};
export const Navigation: FC<NavigationProps> = ({ settingsPages, path, onNavigate }) => {
return (
<TabList
selectedValue={path}
onTabSelect={(_, { value }) => (typeof value === "string" ? onNavigate(value) : null)}
vertical
appearance="subtle"
style={{ width: "100%" }}
>
{settingsPages.map(({ label, absolutePath }) => (
<Tab key={`settings-page-tab-${absolutePath}`} value={absolutePath}>
{label}
</Tab>
))}
</TabList>
);
};

View File

@ -0,0 +1,5 @@
import { FC } from "react";
export const Appearance: FC = () => {
return <>Appearance</>;
};

View File

@ -0,0 +1,5 @@
import { FC } from "react";
export const General: FC = () => {
return <>General</>;
};

View File

@ -0,0 +1,5 @@
import { FC } from "react";
export const Window: FC = () => {
return <>Window</>;
};

View File

@ -0,0 +1,32 @@
import { ReactElement } from "react";
import { General } from "./General";
import { Window } from "./Window";
import { Appearance } from "./Appearance";
export type SettingsPage = {
label: string;
absolutePath: string;
relativePath: string;
element: ReactElement;
};
export const settingsPages: SettingsPage[] = [
{
label: "General",
relativePath: "general",
absolutePath: "/settings/general",
element: <General />,
},
{
label: "Window",
relativePath: "window",
absolutePath: "/settings/window",
element: <Window />,
},
{
label: "Appearance",
relativePath: "appearance",
absolutePath: "/settings/appearance",
element: <Appearance />,
},
];

58
src/Settings/Settings.tsx Normal file
View File

@ -0,0 +1,58 @@
import { Divider } from "@fluentui/react-components";
import { FC, useState } from "react";
import { Routes, useNavigate } from "react-router";
import { Header } from "./Header";
import { Navigation } from "./Navigation";
import { Route } from "react-router";
import { settingsPages } from "./Pages";
export const Settings: FC = () => {
const navigate = useNavigate();
const [path, setPath] = useState<string>(settingsPages[0].absolutePath);
const closeSettings = () => {
navigate({ pathname: "/" });
window.ContextBridge.settingsOpenStateChanged({ settingsOpened: false });
};
const navigateTo = (pathname: string) => {
setPath(pathname);
navigate({ pathname });
};
return (
<div style={{ display: "flex", flexDirection: "column", height: "100%" }}>
<div style={{ flexShrink: 0 }}>
<Header onCloseSettingsClicked={closeSettings} />
<Divider />
</div>
<div
style={{
flexGrow: 1,
display: "flex",
flexDirection: "row",
padding: 10,
gap: 10,
boxSizing: "border-box",
}}
>
<div style={{ flexShrink: 0, width: 200 }}>
<Navigation settingsPages={settingsPages} onNavigate={navigateTo} path={path} />
</div>
<div style={{ height: "100%", flexGrow: 1, overflowY: "auto", padding: 10, boxSizing: "border-box" }}>
<Routes>
{settingsPages.map(({ element, relativePath }) => (
<Route
key={`settings-page-content-${relativePath}`}
path={relativePath}
element={element}
/>
))}
</Routes>
</div>
</div>
</div>
);
};

1
src/Settings/index.ts Normal file
View File

@ -0,0 +1 @@
export * from "./Settings";

View File

@ -1,54 +0,0 @@
import { platform } from "os";
import { getCurrentOperatingSystem } from "../helpers/operating-system-helpers";
import { OperatingSystem } from "../operating-system";
export interface AppearanceOptions {
maxSearchResultsPerPage: number;
searchResultHeight: number;
showDescriptionOnAllSearchResults: boolean;
showSearchIcon: boolean;
showSearchResultNumbers: boolean;
smoothScrolling: boolean;
userInputHeight: number;
windowWidth: number;
allowTransparentBackground: boolean;
fontFamily: string;
userInputFontSize: string;
userInputFontWeight: string;
userInputBorderRadius: string;
userInputBottomMargin: number;
searchResultsBorderRadius: string;
searchResultNameFontSize: string;
searchResultNameFontWeight: string;
searchResultDescriptionFontSize: string;
searchResultDescriptionFontWeight: string;
scrollbarBorderRadius: string;
}
const defaultFontFamily =
getCurrentOperatingSystem(platform()) === OperatingSystem.Windows
? `"Segoe UI", Roboto, "Segoe UI Emoji", "Segoe UI Symbol"`
: `-apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif, "Apple Color Emoji`;
export const defaultAppearanceOptions: AppearanceOptions = {
allowTransparentBackground: false,
fontFamily: defaultFontFamily,
maxSearchResultsPerPage: 8,
searchResultHeight: 50,
showDescriptionOnAllSearchResults: true,
showSearchIcon: true,
showSearchResultNumbers: false,
smoothScrolling: true,
userInputHeight: 60,
windowWidth: 600,
userInputBorderRadius: "0px",
userInputFontSize: "24px",
userInputFontWeight: "200",
userInputBottomMargin: 0,
searchResultNameFontSize: "16px",
searchResultNameFontWeight: "400",
searchResultDescriptionFontSize: "12px",
searchResultDescriptionFontWeight: "200",
searchResultsBorderRadius: "0px",
scrollbarBorderRadius: "0px",
};

View File

@ -1,41 +0,0 @@
import { homedir, platform } from "os";
import { getCurrentOperatingSystem } from "../helpers/operating-system-helpers";
import { OperatingSystem } from "../operating-system";
export interface ApplicationSearchOptions {
applicationFolders: string[];
applicationFileExtensions: string[];
enabled: boolean;
showFullFilePath: boolean;
useNativeIcons: boolean;
}
const windowsApplicationSearchOptions: ApplicationSearchOptions = {
applicationFileExtensions: [".lnk", ".appref-ms", ".url", ".exe"],
applicationFolders: [
"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs",
`${homedir()}\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu`,
`${homedir()}\\Desktop`,
],
enabled: true,
showFullFilePath: false,
useNativeIcons: true,
};
const macOsApplicationSearchOptions: ApplicationSearchOptions = {
applicationFileExtensions: [".app"],
applicationFolders: [
"/Applications",
"/System/Library/CoreServices",
"/System/Applications",
`${homedir()}/Applications`,
],
enabled: true,
showFullFilePath: false,
useNativeIcons: true,
};
export const defaultApplicationSearchOptions =
getCurrentOperatingSystem(platform()) === OperatingSystem.Windows
? windowsApplicationSearchOptions
: macOsApplicationSearchOptions;

View File

@ -1,11 +0,0 @@
import { Browser } from "../../main/plugins/browser-bookmarks-plugin/browser";
export interface BrowserBookmarksOptions {
isEnabled: boolean;
browser: Browser;
}
export const defaultBrowserBookmarksOptions: BrowserBookmarksOptions = {
browser: Browser.GoogleChrome,
isEnabled: true,
};

View File

@ -1,9 +0,0 @@
export interface CalculatorOptions {
precision: number;
isEnabled: boolean;
}
export const defaultCalculatorOptions: CalculatorOptions = {
isEnabled: true,
precision: 16,
};

View File

@ -1,17 +0,0 @@
export interface ColorConverterOptions {
isEnabled: boolean;
hexEnabled: boolean;
rgbEnabled: boolean;
rgbaEnabled: boolean;
hslEnabled: boolean;
showColorPreview: boolean;
}
export const defaultColorConverterOptions: ColorConverterOptions = {
hexEnabled: true,
hslEnabled: true,
isEnabled: true,
rgbEnabled: true,
rgbaEnabled: true,
showColorPreview: false,
};

View File

@ -1,22 +0,0 @@
import { atomOneDark } from "../../renderer/color-themes/color-themes";
export interface ColorThemeOptions {
name: string;
userInputBackgroundColor: string;
userInputTextColor: string;
searchResultsBackgroundColor: string;
searchResultsItemActiveBackgroundColor: string;
searchResultsItemActiveTextColor: string;
searchResultsItemActiveDescriptionColor: string;
searchResultsItemNameTextcolor: string;
searchResultsItemDescriptionTextColor: string;
scrollbarForegroundColor: string;
scrollbarBackgroundColor: string;
}
export const defaultColorThemeOptions = atomOneDark;

View File

@ -1,27 +0,0 @@
import { getCurrentOperatingSystem } from "../helpers/operating-system-helpers";
import { platform } from "os";
import { MacOsShell, WindowsShell } from "../../main/plugins/commandline-plugin/shells";
import { OperatingSystem } from "../operating-system";
export interface CommandlineOptions {
isEnabled: boolean;
prefix: string;
shell: WindowsShell | MacOsShell;
}
const defaultMacOsCommandlineOptions: CommandlineOptions = {
isEnabled: true,
prefix: ">",
shell: MacOsShell.Terminal,
};
const defaultWindowsCommandlineOptions: CommandlineOptions = {
isEnabled: true,
prefix: ">",
shell: WindowsShell.Cmd,
};
export const defaultCommandlineOptions: CommandlineOptions =
getCurrentOperatingSystem(platform()) === OperatingSystem.Windows
? defaultWindowsCommandlineOptions
: defaultMacOsCommandlineOptions;

View File

@ -1,7 +0,0 @@
import { UserConfigOptions } from "./user-config-options";
export interface ConfigRepository {
getConfig(): UserConfigOptions;
saveConfig(config: UserConfigOptions): Promise<void>;
openConfigFile(): void;
}

View File

@ -1,7 +0,0 @@
export interface ControlPanelOptions {
isEnabled: boolean;
}
export const defaultControlPanelOptions: ControlPanelOptions = {
isEnabled: false,
};

View File

@ -1,13 +0,0 @@
import { CurrencyCode } from "../../main/plugins/currency-converter-plugin/currency-code";
export interface CurrencyConverterOptions {
precision: number;
defaultTarget: CurrencyCode;
isEnabled: boolean;
}
export const defaultCurrencyConverterOptions: CurrencyConverterOptions = {
isEnabled: false,
precision: 2,
defaultTarget: CurrencyCode.EUR,
};

View File

@ -1,13 +0,0 @@
export interface DictionaryOptions {
debounceDelay: number;
isEnabled: boolean;
minSearchTermLength: number;
prefix: string;
}
export const defaultDictionaryOptions: DictionaryOptions = {
debounceDelay: 250,
isEnabled: true,
minSearchTermLength: 3,
prefix: "dict?",
};

View File

@ -1,31 +0,0 @@
import Store = require("electron-store");
import { ConfigRepository } from "./config-repository";
import { UserConfigOptions } from "./user-config-options";
import { mergeUserConfigWithDefault } from "../helpers/config-helpers";
export class ElectronStoreConfigRepository implements ConfigRepository {
private readonly store: Store;
private readonly configStoreKey = "userConfigOptions";
private readonly defaultOptions: UserConfigOptions;
constructor(defaultOptions: UserConfigOptions) {
this.store = new Store();
this.defaultOptions = defaultOptions;
}
public getConfig(): UserConfigOptions {
const userConfig = this.store.get(this.configStoreKey);
return mergeUserConfigWithDefault(userConfig, this.defaultOptions);
}
public saveConfig(updatedConfig: UserConfigOptions): Promise<void> {
return new Promise((resolve) => {
this.store.set(this.configStoreKey, updatedConfig);
resolve();
});
}
public openConfigFile() {
this.store.openInEditor();
}
}

View File

@ -1,7 +0,0 @@
export interface EmailOptions {
isEnabled: boolean;
}
export const defaultEmailOptions: EmailOptions = {
isEnabled: true,
};

View File

@ -1,13 +0,0 @@
export interface EverythingSearchOptions {
enabled: boolean;
pathToEs: string;
prefix: string;
maxSearchResults: number;
}
export const defaultEverythingSearchOptions: EverythingSearchOptions = {
enabled: false,
maxSearchResults: 24,
pathToEs: "C:\\es\\es.exe",
prefix: "es?",
};

View File

@ -1,15 +0,0 @@
export interface FileBrowserOptions {
isEnabled: boolean;
maxSearchResults: number;
showFullFilePath: boolean;
showHiddenFiles: boolean;
blackList: string[];
}
export const defaultFileBrowserOptions: FileBrowserOptions = {
blackList: ["desktop.ini"],
isEnabled: false,
maxSearchResults: 100,
showFullFilePath: true,
showHiddenFiles: false,
};

View File

@ -1,46 +0,0 @@
import { Language } from "../translation/language";
import { GlobalHotKey } from "../global-hot-key/global-hot-key";
import { GlobalHotKeyKey } from "../global-hot-key/global-hot-key-key";
import { GlobalHotKeyModifier } from "../global-hot-key/global-hot-key-modifier";
import { WindowPosition } from "../window-position";
export interface GeneralOptions {
allowWindowMove: boolean;
autostart: boolean;
clearCachesOnExit: boolean;
hideMainWindowAfterExecution: boolean;
hideMainWindowOnBlur: boolean;
hotKey: GlobalHotKey;
language: Language;
logExecution: boolean;
persistentUserInput: boolean;
rememberWindowPosition: boolean;
rescanEnabled: boolean;
rescanIntervalInSeconds: number;
showAlwaysOnPrimaryDisplay: boolean;
showTrayIcon: boolean;
decimalSeparator: string;
lastWindowPosition?: WindowPosition;
}
export const defaultGeneralOptions: GeneralOptions = {
allowWindowMove: true,
autostart: true,
clearCachesOnExit: false,
hideMainWindowAfterExecution: true,
hideMainWindowOnBlur: true,
hotKey: {
key: GlobalHotKeyKey.Space,
modifier: GlobalHotKeyModifier.Alt,
secondModifier: GlobalHotKeyModifier.None,
},
language: Language.English,
logExecution: true,
persistentUserInput: false,
rememberWindowPosition: false,
rescanEnabled: true,
rescanIntervalInSeconds: 300,
showAlwaysOnPrimaryDisplay: false,
showTrayIcon: true,
decimalSeparator: ".",
};

View File

@ -1,25 +0,0 @@
import { ConfigRepository } from "./config-repository";
import { UserConfigOptions } from "./user-config-options";
export class InMemoryConfigRepository implements ConfigRepository {
private config: UserConfigOptions;
constructor(config: UserConfigOptions) {
this.config = config;
}
public getConfig(): UserConfigOptions {
return this.config;
}
public saveConfig(updatedConfig: UserConfigOptions): Promise<void> {
return new Promise((resolve) => {
this.config = updatedConfig;
resolve();
});
}
public openConfigFile() {
throw new Error("Not implemented");
}
}

View File

@ -1,9 +0,0 @@
export interface LoremIpsumOptions {
isEnabled: boolean;
prefix: string;
}
export const defaultLoremIpsumOptions: LoremIpsumOptions = {
isEnabled: false,
prefix: "lipsum",
};

View File

@ -1,13 +0,0 @@
export interface MdFindOptions {
enabled: boolean;
prefix: string;
maxSearchResults: number;
debounceDelay: number;
}
export const defaultMdfindOptions: MdFindOptions = {
debounceDelay: 250,
enabled: false,
maxSearchResults: 24,
prefix: "md?",
};

View File

@ -1,7 +0,0 @@
export interface OperatingSystemCommandsOptions {
isEnabled: boolean;
}
export const defaultOperatingSystemCommandsOptions: OperatingSystemCommandsOptions = {
isEnabled: false,
};

View File

@ -1,7 +0,0 @@
export interface OperatingSystemSettingsOptions {
isEnabled: boolean;
}
export const defaultOperatingSystemSettingsOptions: OperatingSystemSettingsOptions = {
isEnabled: false,
};

View File

@ -1,11 +0,0 @@
export interface SearchEngineOptions {
blackList: string[];
fuzzyness: number;
maxSearchResults: number;
}
export const defaultSearchEngineOptions: SearchEngineOptions = {
blackList: [],
fuzzyness: 0.5,
maxSearchResults: 24,
};

View File

@ -1,11 +0,0 @@
import { Shortcut } from "../../main/plugins/shortcuts-search-plugin/shortcut";
export interface ShortcutOptions {
isEnabled: boolean;
shortcuts: Shortcut[];
}
export const defaultShortcutOptions: ShortcutOptions = {
isEnabled: false,
shortcuts: [],
};

View File

@ -1,25 +0,0 @@
import { homedir } from "os";
export interface SimpleFolderSearchOptions {
isEnabled: boolean;
folders: SimpleFolderSearchFolderOption[];
showFullFilePath: boolean;
}
export interface SimpleFolderSearchFolderOption {
folderPath: string;
recursive: boolean;
excludeHiddenFiles: boolean;
}
export const defaultSimpleFolderSearchOptions: SimpleFolderSearchOptions = {
folders: [
{
excludeHiddenFiles: true,
folderPath: homedir(),
recursive: false,
},
],
isEnabled: true,
showFullFilePath: true,
};

View File

@ -1,19 +0,0 @@
import { TranslationLanguage } from "../../main/plugins/translation-plugin/translation-language";
export interface TranslationOptions {
enabled: boolean;
debounceDelay: number;
minSearchTermLength: number;
prefix: string;
sourceLanguage: TranslationLanguage;
targetLanguage: TranslationLanguage;
}
export const defaultTranslationOptions: TranslationOptions = {
debounceDelay: 250,
enabled: false,
minSearchTermLength: 3,
prefix: "t?",
sourceLanguage: TranslationLanguage.German,
targetLanguage: TranslationLanguage.English,
};

View File

@ -1,9 +0,0 @@
export interface UrlOptions {
isEnabled: boolean;
defaultProtocol: string;
}
export const defaultUrlOptions: UrlOptions = {
defaultProtocol: "https",
isEnabled: true,
};

View File

@ -1,93 +0,0 @@
import { GeneralOptions, defaultGeneralOptions } from "./general-options";
import { SearchEngineOptions, defaultSearchEngineOptions } from "./search-engine-options";
import { AppearanceOptions, defaultAppearanceOptions } from "./appearance-options";
import { ShortcutOptions, defaultShortcutOptions } from "./shortcuts-options";
import { EverythingSearchOptions, defaultEverythingSearchOptions } from "./everything-search-options";
import { MdFindOptions, defaultMdfindOptions } from "./mdfind-options";
import { TranslationOptions, defaultTranslationOptions } from "./translation-options";
import { WebSearchOptions, defaultWebSearchOptions } from "./websearch-options";
import { ColorThemeOptions, defaultColorThemeOptions } from "./color-theme-options";
import { FileBrowserOptions, defaultFileBrowserOptions } from "./filebrowser-options";
import {
OperatingSystemCommandsOptions,
defaultOperatingSystemCommandsOptions,
} from "./operating-system-commands-options";
import { CalculatorOptions, defaultCalculatorOptions } from "./calculator-options";
import { UrlOptions, defaultUrlOptions } from "./url-options";
import { EmailOptions, defaultEmailOptions } from "./email-options";
import { CurrencyConverterOptions, defaultCurrencyConverterOptions } from "./currency-converter-options";
import { WorkflowOptions, defaultWorkflowOptions } from "./workflow-options";
import { CommandlineOptions, defaultCommandlineOptions } from "./commandline-options";
import {
OperatingSystemSettingsOptions,
defaultOperatingSystemSettingsOptions,
} from "./operating-system-settings-options";
import { SimpleFolderSearchOptions, defaultSimpleFolderSearchOptions } from "./simple-folder-search-options";
import { UwpSearchOptions, defaultUwpSearchOptions } from "./uwp-search-options";
import { ColorConverterOptions, defaultColorConverterOptions } from "./color-converter-options";
import { ApplicationSearchOptions, defaultApplicationSearchOptions } from "./application-search-options";
import { DictionaryOptions, defaultDictionaryOptions } from "./dictionary-options";
import { BrowserBookmarksOptions, defaultBrowserBookmarksOptions } from "./browser-bookmarks-options";
import { ControlPanelOptions, defaultControlPanelOptions } from "./control-panel-options";
import { WeatherOptions, defaultWeatherOptions } from "./weather-options";
import { LoremIpsumOptions, defaultLoremIpsumOptions } from "./lorem-ipsum-options";
export interface UserConfigOptions {
appearanceOptions: AppearanceOptions;
colorThemeOptions: ColorThemeOptions;
applicationSearchOptions: ApplicationSearchOptions;
everythingSearchOptions: EverythingSearchOptions;
dictionaryOptions: DictionaryOptions;
mdfindOptions: MdFindOptions;
searchEngineOptions: SearchEngineOptions;
shortcutOptions: ShortcutOptions;
translationOptions: TranslationOptions;
generalOptions: GeneralOptions;
websearchOptions: WebSearchOptions;
fileBrowserOptions: FileBrowserOptions;
operatingSystemCommandsOptions: OperatingSystemCommandsOptions;
operatingSystemSettingsOptions: OperatingSystemSettingsOptions;
calculatorOptions: CalculatorOptions;
urlOptions: UrlOptions;
emailOptions: EmailOptions;
currencyConverterOptions: CurrencyConverterOptions;
workflowOptions: WorkflowOptions;
commandlineOptions: CommandlineOptions;
simpleFolderSearchOptions: SimpleFolderSearchOptions;
colorConverterOptions: ColorConverterOptions;
uwpSearchOptions: UwpSearchOptions;
browserBookmarksOptions: BrowserBookmarksOptions;
controlPanelOptions: ControlPanelOptions;
weatherOptions: WeatherOptions;
loremIpsumOptions: LoremIpsumOptions;
}
export const defaultUserConfigOptions: UserConfigOptions = {
appearanceOptions: defaultAppearanceOptions,
applicationSearchOptions: defaultApplicationSearchOptions,
browserBookmarksOptions: defaultBrowserBookmarksOptions,
calculatorOptions: defaultCalculatorOptions,
colorConverterOptions: defaultColorConverterOptions,
colorThemeOptions: defaultColorThemeOptions,
commandlineOptions: defaultCommandlineOptions,
controlPanelOptions: defaultControlPanelOptions,
currencyConverterOptions: defaultCurrencyConverterOptions,
dictionaryOptions: defaultDictionaryOptions,
emailOptions: defaultEmailOptions,
everythingSearchOptions: defaultEverythingSearchOptions,
fileBrowserOptions: defaultFileBrowserOptions,
generalOptions: defaultGeneralOptions,
mdfindOptions: defaultMdfindOptions,
operatingSystemCommandsOptions: defaultOperatingSystemCommandsOptions,
operatingSystemSettingsOptions: defaultOperatingSystemSettingsOptions,
searchEngineOptions: defaultSearchEngineOptions,
shortcutOptions: defaultShortcutOptions,
simpleFolderSearchOptions: defaultSimpleFolderSearchOptions,
translationOptions: defaultTranslationOptions,
urlOptions: defaultUrlOptions,
uwpSearchOptions: defaultUwpSearchOptions,
weatherOptions: defaultWeatherOptions,
websearchOptions: defaultWebSearchOptions,
workflowOptions: defaultWorkflowOptions,
loremIpsumOptions: defaultLoremIpsumOptions,
};

View File

@ -1,7 +0,0 @@
export interface UwpSearchOptions {
isEnabled: boolean;
}
export const defaultUwpSearchOptions: UwpSearchOptions = {
isEnabled: true,
};

View File

@ -1,13 +0,0 @@
import { TemperatureUnit } from "../../main/plugins/weather-plugin/weather-temperature-unit";
export interface WeatherOptions {
isEnabled: boolean;
prefix: string;
temperatureUnit: TemperatureUnit;
}
export const defaultWeatherOptions: WeatherOptions = {
isEnabled: false,
prefix: "wea?",
temperatureUnit: TemperatureUnit.Celsius,
};

View File

@ -1,126 +0,0 @@
import { WebSearchEngine } from "../../main/plugins/websearch-plugin/web-search-engine";
import { IconType } from "../icon/icon-type";
export interface WebSearchOptions {
isEnabled: boolean;
webSearchEngines: WebSearchEngine[];
}
export const defaultWebSearchOptions: WebSearchOptions = {
isEnabled: true,
webSearchEngines: [
{
encodeSearchTerm: true,
icon: {
parameter: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 48 48" style="enable-background:new 0 0 48 48;" xml:space="preserve">
<path style="fill:#FF3D00;" d="M44,24c0,11-9,20-20,20S4,35,4,24S13,4,24,4S44,13,44,24z"></path>
<path style="fill:#FFFFFF;" d="M26,16.2c-0.6-0.6-1.5-0.9-2.5-1.1c-0.4-0.5-1-1-1.9-1.5c-1.6-0.8-3.5-1.2-5.3-0.9h-0.4 c-0.1,0-0.2,0.1-0.4,0.1c0.2,0,1,0.4,1.6,0.6c-0.3,0.2-0.8,0.2-1.1,0.4c0,0,0,0-0.1,0L15.7,14c-0.1,0.2-0.2,0.4-0.2,0.5 c1.3-0.1,3.2,0,4.6,0.4C19,15,18,15.3,17.3,15.7c-0.5,0.3-1,0.6-1.3,1.1c-1.2,1.3-1.7,3.5-1.3,5.9c0.5,2.7,2.4,11.4,3.4,16.3 l0.3,1.6c0,0,3.5,0.4,5.6,0.4c1.2,0,3.2,0.3,3.7-0.2c-0.1,0-0.6-0.6-0.8-1.1c-0.5-1-1-1.9-1.4-2.6c-1.2-2.5-2.5-5.9-1.9-8.1 c0.1-0.4,0.1-2.1,0.4-2.3c2.6-1.7,2.4-0.1,3.5-0.8c0.5-0.4,1-0.9,1.2-1.5C29.4,22.1,27.8,18,26,16.2z"></path>
<path style="fill:#FFFFFF;" d="M24,42c-9.9,0-18-8.1-18-18c0-9.9,8.1-18,18-18c9.9,0,18,8.1,18,18C42,33.9,33.9,42,24,42z M24,8 C15.2,8,8,15.2,8,24s7.2,16,16,16s16-7.2,16-16S32.8,8,24,8z"></path>
<path style="fill:#0277BD;" d="M19,21.1c-0.6,0-1.2,0.5-1.2,1.2c0,0.6,0.5,1.2,1.2,1.2c0.6,0,1.2-0.5,1.2-1.2 C20.1,21.7,19.6,21.1,19,21.1z M19.5,22.2c-0.2,0-0.3-0.1-0.3-0.3c0-0.2,0.1-0.3,0.3-0.3s0.3,0.1,0.3,0.3 C19.8,22.1,19.6,22.2,19.5,22.2z M26.8,20.6c-0.6,0-1,0.5-1,1c0,0.6,0.5,1,1,1c0.6,0,1-0.5,1-1S27.3,20.6,26.8,20.6z M27.2,21.5 c-0.1,0-0.3-0.1-0.3-0.3c0-0.1,0.1-0.3,0.3-0.3c0.1,0,0.3,0.1,0.3,0.3S27.4,21.5,27.2,21.5z M19.3,18.9c0,0-0.9-0.4-1.7,0.1 c-0.9,0.5-0.8,1.1-0.8,1.1s-0.5-1,0.8-1.5C18.7,18.1,19.3,18.9,19.3,18.9 M27.4,18.8c0,0-0.6-0.4-1.1-0.4c-1,0-1.3,0.5-1.3,0.5 s0.2-1.1,1.5-0.9C27.1,18.2,27.4,18.8,27.4,18.8"></path>
<path style="fill:#8BC34A;" d="M23.3,35.7c0,0-4.3-2.3-4.4-1.4c-0.1,0.9,0,4.7,0.5,5s4.1-1.9,4.1-1.9L23.3,35.7z M25,35.6 c0,0,2.9-2.2,3.6-2.1c0.6,0.1,0.8,4.7,0.2,4.9c-0.6,0.2-3.9-1.2-3.9-1.2L25,35.6z"></path>
<path style="fill:#689F38;" d="M22.5,35.7c0,1.5-0.2,2.1,0.4,2.3c0.6,0.1,1.9,0,2.3-0.3c0.4-0.3,0.1-2.2-0.1-2.6 C25,34.8,22.5,35.1,22.5,35.7"></path>
<path style="fill:#FFCA28;" d="M22.3,26.8c0.1-0.7,2-2.1,3.3-2.2c1.3-0.1,1.7-0.1,2.8-0.3c1.1-0.3,3.9-1,4.7-1.3 c0.8-0.4,4.1,0.2,1.8,1.5c-1,0.6-3.7,1.6-5.7,2.2c-1.9,0.6-3.1-0.6-3.8,0.4c-0.5,0.8-0.1,1.8,2.2,2c3.1,0.3,6.2-1.4,6.5-0.5 c0.3,0.9-2.7,2-4.6,2.1c-1.8,0-5.6-1.2-6.1-1.6C22.9,28.7,22.2,27.8,22.3,26.8"></path>
</svg>`,
type: IconType.SVG,
},
isFallback: false,
name: "DuckDuckGo",
prefix: "d?",
priority: 1,
url: "https://duckduckgo.com/?q={{query}}",
suggestionUrl: "https://ac.duckduckgo.com/ac/?q={{query}}&type=list",
},
{
encodeSearchTerm: true,
icon: {
parameter: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 48 48" version="1.1">
<g id="surface1">
<path style=" fill:#FFC107;" d="M 43.609375 20.082031 L 42 20.082031 L 42 20 L 24 20 L 24 28 L 35.304688 28 C 33.652344 32.65625 29.222656 36 24 36 C 17.371094 36 12 30.628906 12 24 C 12 17.371094 17.371094 12 24 12 C 27.058594 12 29.84375 13.152344 31.960938 15.039063 L 37.617188 9.382813 C 34.046875 6.054688 29.269531 4 24 4 C 12.953125 4 4 12.953125 4 24 C 4 35.046875 12.953125 44 24 44 C 35.046875 44 44 35.046875 44 24 C 44 22.660156 43.863281 21.351563 43.609375 20.082031 Z "></path>
<path style=" fill:#FF3D00;" d="M 6.304688 14.691406 L 12.878906 19.511719 C 14.65625 15.109375 18.960938 12 24 12 C 27.058594 12 29.84375 13.152344 31.960938 15.039063 L 37.617188 9.382813 C 34.046875 6.054688 29.269531 4 24 4 C 16.316406 4 9.65625 8.335938 6.304688 14.691406 Z "></path>
<path style=" fill:#4CAF50;" d="M 24 44 C 29.164063 44 33.859375 42.023438 37.410156 38.808594 L 31.21875 33.570313 C 29.210938 35.089844 26.714844 36 24 36 C 18.796875 36 14.382813 32.683594 12.71875 28.054688 L 6.195313 33.078125 C 9.503906 39.554688 16.226563 44 24 44 Z "></path>
<path style=" fill:#1976D2;" d="M 43.609375 20.082031 L 42 20.082031 L 42 20 L 24 20 L 24 28 L 35.304688 28 C 34.511719 30.238281 33.070313 32.164063 31.214844 33.570313 C 31.21875 33.570313 31.21875 33.570313 31.21875 33.570313 L 37.410156 38.808594 C 36.972656 39.203125 44 34 44 24 C 44 22.660156 43.863281 21.351563 43.609375 20.082031 Z "></path>
</g>
</svg>`,
type: IconType.SVG,
},
isFallback: false,
name: "Google",
prefix: "g?",
priority: 2,
url: "https://google.com/search?q={{query}}",
suggestionUrl: "https://www.google.com/complete/search?client=opera&q={{query}}",
},
{
encodeSearchTerm: true,
icon: {
parameter: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 48 48" version="1.1">
<g id="surface1">
<path style=" fill:#F44336;" d="M 37 24 L 30.0625 24 C 26.714844 24 24 21.285156 24 17.9375 L 24 0.574219 C 24 0.355469 24.261719 0.238281 24.421875 0.390625 L 37 12 Z "></path>
<path style=" fill:#AD1457;" d="M 37 24 L 30.0625 24 C 28.628906 24 27.308594 23.5 26.269531 22.667969 L 37 12 Z "></path>
<path style=" fill:#8BC34A;" d="M 11 24 L 17.9375 24 C 21.285156 24 24 26.714844 24 30.0625 L 24 47.425781 C 24 47.644531 23.738281 47.757813 23.578125 47.609375 L 11 36 Z "></path>
<path style=" fill:#009688;" d="M 11 24 L 17.9375 24 C 19.371094 24 20.691406 24.5 21.730469 25.332031 L 11 36 Z "></path>
<path style=" fill:#FFC107;" d="M 24 11 L 24 17.9375 C 24 21.285156 21.285156 24 17.9375 24 L 0.574219 24 C 0.355469 24 0.238281 23.738281 0.390625 23.578125 L 12 11 Z "></path>
<path style=" fill:#FF9800;" d="M 24 11 L 24 17.9375 C 24 19.371094 23.5 20.691406 22.667969 21.730469 L 12 11 Z "></path>
<path style=" fill:#448AFF;" d="M 24 37 L 24 30.0625 C 24 26.714844 26.714844 24 30.0625 24 L 47.425781 24 C 47.644531 24 47.757813 24.261719 47.609375 24.421875 L 36 37 Z "></path>
<path style=" fill:#1565C0;" d="M 24 37 L 24 30.0625 C 24 28.628906 24.5 27.308594 25.332031 26.269531 L 36 37 Z "></path>
</g>
</svg>`,
type: IconType.SVG,
},
isFallback: false,
name: "Google Images",
prefix: "gi?",
priority: 3,
url: "https://www.google.com/search?tbm=isch&q={{query}}",
suggestionUrl: "https://www.google.com/complete/search?ds=i&output=firefox&q={{query}}",
},
{
encodeSearchTerm: true,
icon: {
parameter: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" version="1.1">
<g id="surface1">
<path d="M 30 9.214844 C 30 9.386719 29.863281 9.523438 29.6875 9.523438 L 28.007813 9.523438 L 20.390625 25.738281 C 20.339844 25.847656 20.230469 25.917969 20.113281 25.917969 C 20.109375 25.917969 20.109375 25.917969 20.109375 25.917969 C 19.988281 25.917969 19.882813 25.851563 19.828125 25.746094 L 16.214844 18.578125 L 12.3125 25.757813 C 12.257813 25.859375 12.15625 25.917969 12.03125 25.917969 C 11.914063 25.914063 11.808594 25.847656 11.757813 25.742188 L 4.054688 9.523438 L 2.3125 9.523438 C 2.140625 9.523438 2 9.386719 2 9.214844 L 2 8.390625 C 2 8.21875 2.140625 8.082031 2.3125 8.082031 L 8.523438 8.082031 C 8.695313 8.082031 8.835938 8.21875 8.835938 8.390625 L 8.835938 9.214844 C 8.835938 9.386719 8.695313 9.523438 8.523438 9.523438 L 7.1875 9.523438 L 12.503906 21.785156 L 15.269531 16.617188 L 11.761719 9.527344 L 10.917969 9.527344 C 10.746094 9.527344 10.605469 9.386719 10.605469 9.214844 L 10.605469 8.394531 C 10.605469 8.222656 10.746094 8.082031 10.917969 8.082031 L 15.515625 8.082031 C 15.6875 8.082031 15.824219 8.222656 15.824219 8.394531 L 15.824219 9.214844 C 15.824219 9.386719 15.6875 9.523438 15.515625 9.523438 L 14.703125 9.523438 L 16.722656 13.9375 L 19.125 9.523438 L 17.652344 9.523438 C 17.476563 9.523438 17.339844 9.386719 17.339844 9.214844 L 17.339844 8.394531 C 17.339844 8.222656 17.476563 8.082031 17.652344 8.082031 L 22.117188 8.082031 C 22.289063 8.082031 22.425781 8.222656 22.425781 8.394531 L 22.425781 9.214844 C 22.425781 9.386719 22.289063 9.523438 22.117188 9.523438 L 21.136719 9.523438 L 17.632813 15.894531 L 20.488281 21.769531 L 26 9.523438 L 24.253906 9.523438 C 24.082031 9.523438 23.941406 9.386719 23.941406 9.214844 L 23.941406 8.394531 C 23.941406 8.222656 24.082031 8.082031 24.253906 8.082031 L 29.6875 8.082031 C 29.863281 8.082031 30 8.222656 30 8.394531 Z "></path>
</g>
</svg>`,
type: IconType.SVG,
},
isFallback: false,
name: "Wikipedia",
prefix: "w?",
priority: 4,
url: "https://en.wikipedia.org/wiki/{{query}}",
suggestionUrl: "https://en.wikipedia.org/w/api.php?action=opensearch&search={{query}}",
},
{
encodeSearchTerm: true,
icon: {
parameter: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 48 48" version="1.1">
<g id="surface1">
<path style=" fill:#FF3D00;" d="M 43.199219 33.898438 C 42.800781 36 41.101563 37.601563 39 37.898438 C 35.699219 38.398438 30.199219 39 24 39 C 17.898438 39 12.398438 38.398438 9 37.898438 C 6.898438 37.601563 5.199219 36 4.800781 33.898438 C 4.398438 31.601563 4 28.199219 4 24 C 4 19.800781 4.398438 16.398438 4.800781 14.101563 C 5.199219 12 6.898438 10.398438 9 10.101563 C 12.300781 9.601563 17.800781 9 24 9 C 30.199219 9 35.601563 9.601563 39 10.101563 C 41.101563 10.398438 42.800781 12 43.199219 14.101563 C 43.601563 16.398438 44.101563 19.800781 44.101563 24 C 44 28.199219 43.601563 31.601563 43.199219 33.898438 Z "></path>
<path style=" fill:#FFFFFF;" d="M 20 31 L 20 17 L 32 24 Z "></path>
</g>
</svg>`,
type: IconType.SVG,
},
isFallback: false,
name: "YouTube",
prefix: "yt?",
priority: 5,
url: "https://www.youtube.com/results?search_query={{query}}",
suggestionUrl: "https://www.google.com/complete/search?ds=yt&output=firefox&q={{query}}",
},
{
encodeSearchTerm: true,
icon: {
parameter: `<svg width="256px" height="320px" viewBox="0 0 256 320" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"><g><path d="M95.055,82.908 L127.636,153.555 L175.78,175.332 L2.125,266.695 L73.279,203.267 L73.279,22.449 L0,0 L0,268.932 L72.83,319.986 L256,210.88 L256,132.227 L95.055,82.908" fill="#F4BD27"></path></g></svg>`,
type: IconType.SVG,
},
isFallback: false,
name: "Bing",
prefix: "b?",
priority: 6,
url: "https://www.bing.com/search?q={{query}}",
suggestionUrl: "https://www.bing.com/osjson.aspx?query={{query}}",
},
],
};

Some files were not shown because too many files have changed in this diff Show More