From 03b59eb0ae7fdfa140e0fe276b61b4dabb61fceb Mon Sep 17 00:00:00 2001 From: MM20 <15646950+MM2-0@users.noreply.github.com> Date: Mon, 21 Nov 2022 22:27:52 +0100 Subject: [PATCH] Docs: Add quick actions, remove websearches --- docs/docs/user-guide/search/quickactions.md | 3 - docs/docs/user-guide/search/quickactions.mdx | 82 +++++++++++++++++++ docs/docs/user-guide/search/websearches.md | 41 ---------- .../troubleshooting/crashreporter.mdx | 2 +- 4 files changed, 83 insertions(+), 45 deletions(-) delete mode 100644 docs/docs/user-guide/search/quickactions.md create mode 100644 docs/docs/user-guide/search/quickactions.mdx delete mode 100644 docs/docs/user-guide/search/websearches.md diff --git a/docs/docs/user-guide/search/quickactions.md b/docs/docs/user-guide/search/quickactions.md deleted file mode 100644 index d5b5eafc..00000000 --- a/docs/docs/user-guide/search/quickactions.md +++ /dev/null @@ -1,3 +0,0 @@ -# Quick Actions - -This page is under construction. For websearch shortcuts, refer to [Websearches](websearches). \ No newline at end of file diff --git a/docs/docs/user-guide/search/quickactions.mdx b/docs/docs/user-guide/search/quickactions.mdx new file mode 100644 index 00000000..067a84f4 --- /dev/null +++ b/docs/docs/user-guide/search/quickactions.mdx @@ -0,0 +1,82 @@ +import AddRoundedIcon from '@mui/icons-material/AddRounded' + +# Quick Actions + +Quick actions are shown below the search terms. They are shortcuts that pass your search term to another app to do _something_ with it. +There are four kinds of actions: built-in actions, web search actions, app search actions and custom intents. + +Quick actions can be customized at settings > search > quick actions. Click the icon to create a new action. Long-press and drag actions to reorder them. + +## Built-in + +Built-in actions can be enabled or disabled using the switches. There are currently eight built-in actions. + +- **Call**: Dial the number that has been typed into the search bar, only shown if the search term is a phone number +- **Message**: Message the number that has been typed into the search bar, only shown if the search term is a phone number +- **Email**: Email the address that has been typed into the search bar, only shown if the search term is an email address +- **Add to contacts**: Create a new contact, only shown if the search term is an email address or a phone number +- **Set alarm**: Set an alarm, only shown if the search term is a time (e.g. `11:39`) +- **Start timer**: Start a timer, only shown if the search term is a timespan (e.g. `11 min` or `30 s`). +- **Schedule event**: Create a new event, only shown if the search term is a date or a date with a time. The date format depends on the system's locale. +- **Open website**: Open a website, only shown if the search term is a URL. + +## Web search + +Web search actions are shortcuts to perform a search on a website, e.g. to search on Google. + +To create a new web search action, click the button in the bottom right corner and select _Search on a website_. + +In the next step, enter the URL of the website, e.g. "google.com" and press continue. The launcher will try to fetch the search specification from the website and proceed to the last step. + +:::info +In some cases, the following error is shown: + +> The given website cannot automatically be imported as a web search. You can try a different website or enter the required data manually in the next step. + +If you are sure that the address you entered is correct, press _Skip_. You can still add the website as a web search action but you'll need to enter the required data manually. +::: + +In the last step, you can customize the web search action. Depending on whether the previous step was successful, these fields are either prefilled or empty. + +- You can tap on the **icon** to customize it +- **Name** is the name for the action that is shown in the launcher interface +- The **URL template** is a URL with a placeholder. The placeholder is later replaced with the actual search term. The placeholder is `${1}` and must be present somewhere in the URL. To find out what the correct URL is, proceed as follows: + + - Open the website you wish to add in a browser + - Use the website's search field to search for anything + - Look at the browser's URL bar. Find the search term you just searched for in the URL + :::info + Spaces and special characters might be encoded. Don't worry about it, the launcher will handle the encoding for you. + + If you can't find the search term anywhere, try to disable Javascript and try again. If that still doesn't work, then that website cannot be used. + ::: + + - Replace the search term in the URL with `${1}`. Copy the URL and paste it into the URL template field. + +### Advanced settings + +**Query encoding**: You probably don't need to change this. If you later discover that search queries are encoded incorrectly, you can try to change this setting. + +- **[Percent encoding](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding)**: encode according to the standard for URL encoding (RFC 3986). Most notably, this encodes spaces as `%20`. +- **application/x-www-form-urlencode**: encode according to the [application/x-www-form-urlencode](https://url.spec.whatwg.org/#application/x-www-form-urlencoded) spec. Most notably, this encodes spaces as `+`. There is no real reason to use this encoding since percent encoding should cover all cases where this encoding was appropriate. +- **None**: do not encode the query at all + +## App search + +:::info +App search actions are an experimental feature. Some actions might not work as expected. +::: + +App search actions allow you to directly launch an apps search screen – for apps that support it. To create a new web search action, click the button in the bottom right corner and select _Search in an app_. A list of apps will appear. Pick an app to search. + +### Advanced settings + +You probably won't need this but if you know what you're doing, you can use this to pass extra data to the search intent. First, select a data type and a key and click the button to add a new extra. A new text field (or switch in case of a boolean extra) will appear where you can change the extra's value. + +## Custom intent + +If you are an Android developer, you probably know what an [Intent](https://developer.android.com/reference/android/content/Intent) is. Intents are Android's way to describe actions across different apps. Custom intent actions can be a very powerful tool – if you know what you're doing. Most of the fields just correspond to the typical intent fields – action, category, etc. The most important field is "extra key". This is the name of the string extra that the search term will be passed as. + +### Advanced settings + +**Extras**: here you can add custom extras that are passed along with the intent. First, select a data type and a key and click the button to add a new extra. A new text field (or switch in case of a boolean extra) will appear where you can change the extra's value. diff --git a/docs/docs/user-guide/search/websearches.md b/docs/docs/user-guide/search/websearches.md deleted file mode 100644 index 5cc8a7d0..00000000 --- a/docs/docs/user-guide/search/websearches.md +++ /dev/null @@ -1,41 +0,0 @@ -# Websearch shortcuts - -Websearch shortcuts allow to quickly search for the entered term with a web search engine. Websearch shortcuts appear in the search bar when you type anything. - -## Customize websearches - -Websearches can be customized at Settings > Search > Websearches. To create a new shortcut, click the plus button in the bottom right corner. - -There are two ways of creating a websearch shortcut: - -### Automatically - -Some websearches can be imported automatically (if they support the [OpenSearch description format](https://developer.mozilla.org/en-US/docs/Web/OpenSearch)) - -- In the create websearch dialog, click the download icon in the top right corner -- Enter the base URL of the website you are trying to import (for example: `github.com`) -- Click the arrow next to the text field -- If the website is supported, all the required fields will be filled automatically. -- If the website is not supported, you will need to fill in the required data [manually](#manually). - -### Manually - -- **Color** the color that is used for the icon. The leftmost option adapts the color to the launcher's color scheme. You can also select a custom icon. -- **Name** is the name that is shown in the search bar interface, you can use anything you like. -- **URL** is a URL with a placeholder. The placeholder is later replaced with the actual search term. The placeholder is `${1}` and must be present somewhere in the URL. To find out what the correct URL is, proceed as follows: - - - Open the website you wish to add in a browser - - Use the website's search field to search for anything - - Look at the browser's URL bar. Find the search term you just searched for in the URL - :::info - Spaces and special characters might be encoded. Don't worry about it, the launcher will handle the encoding for you. - - If you can't find the search term anywhere, try to disable Javascript and try again. If that still doesn't work, then that website cannot be used. - ::: - - - Replace the search term in the URL with `${1}`. Copy the URL and paste it into the URL field. - -- **Advanced > Query encoding**: You probably don't need to change this. If you later discover that search queries are encoded incorrectly, you can try to change this setting. - - **[Percent encoding](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding)**: encode according to the standard for URL encoding (RFC 3986). Most notably, this encodes spaces as `%20`. - - **application/x-www-form-urlencode**: encode according to the [application/x-www-form-urlencode](https://url.spec.whatwg.org/#application/x-www-form-urlencoded) spec. Most notably, this encodes spaces as `+`. There is no real reason to use this encoding since percent encoding should cover all cases where this encoding was appropriate. - - **None**: do not encode the query at all diff --git a/docs/docs/user-guide/troubleshooting/crashreporter.mdx b/docs/docs/user-guide/troubleshooting/crashreporter.mdx index 50b87469..556275ad 100644 --- a/docs/docs/user-guide/troubleshooting/crashreporter.mdx +++ b/docs/docs/user-guide/troubleshooting/crashreporter.mdx @@ -4,7 +4,7 @@ import WarningRoundedIcon from '@mui/icons-material/WarningRounded' # Crash Reporter -When the launcher crashes, a notification is posted. If you tap on that notification, the crash reporter screen opens. You can also navigate to that screen like this: Settings > Debug > Crash reporter. +When the launcher crashes, a notification is posted. When you tap on that notification, the crash reporter screen opens. You can also navigate to that screen like this: Settings > Debug > Crash reporter. The crash reporter lists crashes and exceptions.