mirror of https://github.com/Wox-launcher/Wox
Refactor documentation for Wox Launcher's features
Removed "Plugin.md" and "Setting.md" while new files including "plugin_summary.md", "plugin_store.md", "action_panel.md", "selection_query.md", "query.md", and "query_for_dev.md" were created. These modifications aim to improve navigation and readability, and prioritize essential information. In addition, updated "_sidebar.md" to reflect these changes and improve navigation.
This commit is contained in:
parent
aff8b751ac
commit
25dbcae518
|
@ -1,24 +0,0 @@
|
|||
## Plugin types
|
||||
|
||||
### System plugin
|
||||
System plugin is the plugin that bundled with Wox, and it can't be uninstalled or disabled. Some functionality is hard to implement as a user plugin,
|
||||
so we have to implement it as a system plugin.
|
||||
|
||||
For example, `wpm` is a system plugin, which is used to install/uninstall/update plugins.
|
||||
|
||||
### User plugin
|
||||
User plugin is the plugin that pre-installed with Wox or installed by user. User plugin can be install/uninstall/update/disabled by user.
|
||||
|
||||
#### Pre-installed user plugins
|
||||
Pre-installed plugins will bundle with Wox, and will be placed in the plugins folder which beside `wox` executable file
|
||||
|
||||
#### User installed plugins
|
||||
User installed plugins should be placed in `{DataLocation}\plugins`, where `{DataLocation}` can be customized by user
|
||||
|
||||
## Plugin internationalization
|
||||
|
||||
Wox support plugin internationalization, which means you can translate your plugin to any language Wox supported.
|
||||
|
||||
There are two ways to translate your plugin:
|
||||
1. Use `GetTranslation` method in `PluginInitContext.API`, which you can get from `Init` method in your plugin
|
||||
2. Use `[i18n:your_key]`syntax in your plugin.json
|
|
@ -1,17 +0,0 @@
|
|||
# Setting
|
||||
|
||||
## Wox settings
|
||||
|
||||
Settings for Wox itself, including theme, hotkey, proxy etc.
|
||||
|
||||
## Plugin settings
|
||||
|
||||
### Plugin common settings
|
||||
|
||||
Settings that are common for all plugins, for example, `Disabled`, `Trigger keywords` etc.
|
||||
|
||||
### Plugin specific settings
|
||||
|
||||
Settings that are specific for a plugin. For example, `Program` plugin has a setting called `Index Directories` for user to specify which directories to be indexed.
|
||||
|
||||
Plugin specific settings are defined by plugin authors in the `settings` section of `plugin.json` file. See [Plugin.json specification](Plugin.json.md) for more details.
|
|
@ -4,13 +4,16 @@
|
|||
|
||||
- Introduction
|
||||
|
||||
- [Query](query.md)
|
||||
- [Query Hotkeys](query_hotkeys.md)
|
||||
- [Query Shortcuts](query_shortcuts.md)
|
||||
- [Action Panel](action_panel.md)
|
||||
- [Selection Query](selection_query.md)
|
||||
|
||||
- Plugin
|
||||
|
||||
- [Plugin summary](plugin_summary.md)
|
||||
- [Plugin store](deploy.md)
|
||||
- [Plugin store](plugin_store.md)
|
||||
- [Write plugin](vue.md)
|
||||
- [Submit plugin](helpers.md)
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
# Action Panel
|
||||
|
||||
The Action Panel is designed for further operations on the query results. A search result can have multiple actions. However, only one action can be set as the default action. When
|
||||
a user selects a search result, the Action Panel can be invoked with the shortcut `Cmd/Alt + J`. If the user presses `Enter` on the selected search result without invoking the
|
||||
Action Panel, the default action will be executed.
|
||||
|
||||
## How to use the Action Panel
|
||||
|
||||
1. First, enter your search criteria, and the system will display the search results.
|
||||
2. Use the up and down arrow keys to select the search result you want to operate on.
|
||||
3. Press the `Cmd/Alt + J` shortcut to invoke the Action Panel.
|
||||
4. In the Action Panel, you can see all available actions for the currently selected search result.
|
||||
5. Use the up and down arrow keys to select the action you want to execute, and then press the `Enter` key to execute.
|
||||
|
||||
Please note that different search results may have different available actions. For example, file type search results may have open, copy path, delete, etc., while application type
|
||||
search results may have open, uninstall, etc.
|
||||
|
||||
## Default Action
|
||||
|
||||
Each search result can have one default action. This is the action that will be executed when the user presses `Enter` on the selected search result without invoking the Action
|
||||
Panel. The default action can be set in the settings of each search result.
|
|
@ -18,6 +18,7 @@
|
|||
search: 'auto',
|
||||
loadSidebar: true,
|
||||
name: "Wox Launcher",
|
||||
executeScript: true,
|
||||
repo: "https://github.com/Wox-launcher/Wox",
|
||||
plugins: [
|
||||
EditOnGithubPlugin.create("https://github.com/Wox-launcher/Wox/tree/v2/docs/", null,
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
<div id="plugin-store">
|
||||
<input type="text" id="search" placeholder="Search for plugins...">
|
||||
</div>
|
||||
|
||||
<script type="application/javascript">
|
||||
fetch('https://raw.githubusercontent.com/Wox-launcher/Wox/v2/plugin-store.json')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
let table = document.createElement('table');
|
||||
table.style.width = '100%';
|
||||
|
||||
let thead = document.createElement('thead');
|
||||
let headerRow = document.createElement('tr');
|
||||
let headers = ['Icon', 'Name', 'Description', 'Author', 'Version'];
|
||||
headers.forEach(header => {
|
||||
let th = document.createElement('th');
|
||||
if (header === 'Icon') {
|
||||
th.style.width = '40px';
|
||||
}
|
||||
if (header === 'Name') {
|
||||
th.style.width = '300px';
|
||||
}
|
||||
if (header === 'Author') {
|
||||
th.style.width = '160px';
|
||||
}
|
||||
if (header === 'Version') {
|
||||
th.style.width = '100px';
|
||||
}
|
||||
if (header === 'Description') {
|
||||
th.style.width = '500px';
|
||||
}
|
||||
th.textContent = header;
|
||||
headerRow.appendChild(th);
|
||||
});
|
||||
thead.appendChild(headerRow);
|
||||
table.appendChild(thead);
|
||||
|
||||
let tbody = document.createElement('tbody');
|
||||
tbody.id = 'pluginTable';
|
||||
data.forEach(plugin => {
|
||||
let row = document.createElement('tr');
|
||||
let cells = [
|
||||
`<img src="${plugin.IconUrl}" width="32" height="32" style="max-width:none;">`,
|
||||
`<a href="${plugin.Website}" target="_blank">${plugin.Name}</a>`,
|
||||
plugin.Description,
|
||||
plugin.Author,
|
||||
`v${plugin.Version}`,
|
||||
];
|
||||
cells.forEach(cell => {
|
||||
let td = document.createElement('td');
|
||||
td.innerHTML = cell;
|
||||
row.appendChild(td);
|
||||
});
|
||||
tbody.appendChild(row);
|
||||
});
|
||||
table.appendChild(tbody);
|
||||
|
||||
document.getElementById('plugin-store').appendChild(table);
|
||||
});
|
||||
|
||||
function searchFunction() {
|
||||
let input, filter, table, tr, td, i, txtValue;
|
||||
input = document.getElementById("search");
|
||||
filter = input.value.toUpperCase();
|
||||
table = document.getElementById("pluginTable");
|
||||
tr = table.getElementsByTagName("tr");
|
||||
for (i = 0; i < tr.length; i++) {
|
||||
td = tr[i].getElementsByTagName("td")[1];
|
||||
if (td) {
|
||||
txtValue = td.textContent || td.innerText;
|
||||
if (txtValue.toUpperCase().indexOf(filter) > -1) {
|
||||
tr[i].style.display = "";
|
||||
} else {
|
||||
tr[i].style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('search').addEventListener('keyup', searchFunction);
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
#search {
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
font-size: 16px;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
}
|
||||
th, td {
|
||||
border: 1px solid #ddd;
|
||||
padding: 8px;
|
||||
}
|
||||
tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
th {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,14 @@
|
|||
# Wox Plugin Summary
|
||||
|
||||
## Plugin Types
|
||||
|
||||
Wox plugins are categorized into two types:
|
||||
|
||||
1. **System Plugin**: These are plugins bundled with Wox and cannot be uninstalled. They provide essential functionalities. For instance, `wpm` is a system plugin used
|
||||
for plugin management.
|
||||
|
||||
2. **User Plugin**: These are plugins installed by the user. They can be installed, uninstalled, updated, or disabled by the user.
|
||||
|
||||
## Plugin Commands
|
||||
|
||||
Wox plugins can have commands that provide specific functionalities. For example, the `wpm` plugin has commands like `install` and `remove` for plugin management.
|
|
@ -0,0 +1,27 @@
|
|||
# Query
|
||||
|
||||
Query is the primary way for users to interact with Wox. There are two types of queries: input queries and selection queries.
|
||||
|
||||
## Input Query
|
||||
|
||||
An input query is composed of a trigger keyword, a command, and a search term.
|
||||
|
||||
- **Trigger Keyword**: This is the keyword that triggers a specific plugin. Once a plugin is triggered, other plugins will not receive the query. If the trigger keyword is "*", it
|
||||
represents a global search, such as when searching for programs in the system. Typically, you don't need to add a trigger keyword like "app". Trigger keywords can be modified by
|
||||
the user, and multiple keywords can be specified.
|
||||
|
||||
- **Command**: This is optional and can also be multiple. It represents the actions that the plugin can perform.
|
||||
|
||||
- **Search**: This is the actual content of the query.
|
||||
|
||||
For example:
|
||||
|
||||
1. in the query `wpm install emoji`, "wpm" is the trigger keyword, "install" is the command, and "emoji" is the name of the plugin to be installed.
|
||||
2. in the query `emoji smile`, "emoji" is the trigger keyword, and "smile" is the search term, no command is specified.
|
||||
3. in the query `mail`, "mail" is the search term, no trigger keyword or command is specified.
|
||||
|
||||
## Selection Query
|
||||
|
||||
A selection query is when a user selects/drag a file or text as the query. This type of query allows users to perform actions on specific files or text without having to manually
|
||||
input
|
||||
the file path or text into the query box. Please refer to [Selection Query](selection_query.md) for details.
|
|
@ -1,6 +1,6 @@
|
|||
## What are Query Hotkeys?
|
||||
|
||||
Query hotkeys in Wox Launcher are a specific type of hotkeys that allow you to quickly perform a search for specific characters or strings. This can be done by assigning a query to
|
||||
Query hotkeys in Wox Launcher are a specific type of hotkeys that allow you to quickly perform a [Query](query.md). This can be done by assigning a query to
|
||||
a hotkey. When this hotkey is pressed, Wox Launcher will automatically perform this query.
|
||||
|
||||
## How to Use Query Hotkeys
|
||||
|
@ -27,7 +27,7 @@ performed.
|
|||
|
||||
## Silent Mode
|
||||
|
||||
Wox Launcher also supports a silent mode for queries. When silent mode is enabled, Wox Launcher will not display the search interface when a query is performed. Instead, if the
|
||||
Wox Launcher also supports a silent mode for queries. When silent mode is enabled, Wox Launcher will not display the query interface when a query is performed. Instead, if the
|
||||
query returns exactly one result, it will directly execute that result. If the query returns more than one result or no results, the query will not be executed and no UI will be
|
||||
displayed, but a notification will be shown to inform the user that the query failed.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## What are Query Shortcuts?
|
||||
|
||||
Query shortcuts in Wox Launcher are a feature that allows you to simplify your queries. This can be done by assigning a shortcut to a longer query.
|
||||
Query shortcuts in Wox Launcher are a feature that allows you to simplify your [Query](query.md). This can be done by assigning a shortcut to a longer query.
|
||||
When this shortcut is entered, Wox Launcher will automatically expand it to the full query and pass it to all plugins. However, this expansion is implicit and not visible to the
|
||||
user. The user will still see the shortcut in the UI, but the plugins will receive the expanded query.
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
# Selection Query
|
||||
|
||||
Selection Query is a feature that allows users to select a piece of text or a set of files, and then invoke Wox to perform quick operations on the selected information. This can be
|
||||
done by pressing `Option + Cmd + Space` on macOS or `Ctrl + Alt + Space` on Windows.
|
||||
|
||||
## How to use Selection Query
|
||||
|
||||
1. First, select the text or files you want to operate on.
|
||||
2. Press the `Option + Cmd + Space` shortcut on macOS or `Ctrl + Alt + Space` on Windows to invoke Wox.
|
||||
3. Wox will display a list of available actions based on the type of the selected information.
|
||||
4. Use the up and down arrow keys to select the action you want to execute, and then press the `Enter` key to execute.
|
||||
|
||||
## Customizing the Selection Query Shortcut
|
||||
|
||||
If you want to change the shortcut for the Selection Query, you can do so in the General section of the settings. Look for the Selection Hotkey option and modify it as per your
|
||||
convenience. This allows you to customize your shortcut for a more convenient use of the Selection Query feature.
|
Loading…
Reference in New Issue