Fluent Search Tasks - nightly test

  • October 30, 2021

Tasks is a new experimental feature available in Fluent Search version 0.9.90 (currently in nightly).
Using Tasks you can easily automate all of Fluent Search features easily and intuitively.

What is an Operation?

Operation is a "block", it can do anything, like open a file, invoke a search result, and more.
Operations can be connected to each other and will execute in sequential order - only after the last operation is executed. Each operation has its own settings and may produce an output (more about that below).

What is a trigger?

A Trigger is a special kind of Operation that initiates the execution of the Operations chain.
A Trigger can invoke when a user inputs a search, or when a hotkey is pressed.

What is a Task project?

A Task project is a set of "operations" that are connected to each other, when one of the Triggers is activated, then all cool stuff begins.

Here is a very simple example -
Image showing Task project, Hotkey Ctrl+Alt+M connected to Youtube Music, and hotkey Ctrl+Alt+Y connected to Youtube app
The triggers here are two hotkeys, Ctrl+Alt+M and Ctrl+Alt+Y, when invoked the next operation (connected through line) will trigger, in this case, it's either the YouTube or YouTube Music apps.


Each operation is configured through settings in it's editor window.
Image showing inputs window
For example, here the operation is a search (which is also a trigger), the settings are, as expected, search related settings.
For this Trigger, you can configure it to trigger when the user invokes a specific search, depending on the search text, tag, and more.

Outputs and variables

Operations may have an output, when they do you will have the "Output" tab in the editor window.
The output can be transformed into Variables, variables are set of objects that can be accessed through the entire operation chain.
Image showing inputs window
For example, here the outputs for search are the search text and the search tag.
Configuring a variable value is done through text, the most simple variable value would be "" which would mean it just tasks the result of the operation.
For more advanced cases you can get nested values, as for the search trigger, the result is split into two variables "searchText", which is value is "result.SearchedText" and "searchTag"'s value is "result.SearchedTag".

Variable execution

Variables values are configured through text, but this text is actually based on C#, so any valid C# based syntax should work.
For example, "{searchText.First()}" would get the first letter of the searchText.

Example - Windows theme change

Ok so you must be confused by now, lets create a basic Task project that changes Windows theme based on selection.

Create trigger

First open the Tasks window through the system tray menu, then press the plus button (Alt+A) to add a new Task, call it "Change theme", then press OK.
Right-click the drawing canvas (Menu), select Triggers, then Search, here set the search text to "theme" and press save.
Now we have a project that triggers when a user searches "theme", right-click again on the canvas and select Search, and then Custom result.
Call the result "Change Windows theme", select your favorite icon, and set the Score to 50, which is a number that determines the position of the result in Fluent Search.
Right-click the search trigger (Menu), then click connect and choose the result we just added.
Now when searching for "theme" you should see your result, which will do nothing for now.

Add actions

Each result in Fluent Search has operations, for example, "Open file", "Open directory", lets a search operation to our result.
Right-click the canvas, then press Search, then Custom operation, call it "Dark" and save, do the same for "Light" and connect our search result to both.

Make it actually do something

Now finally, let's make it do something, right-click the canvas, then press Misc, then PS Script, which stands for Powershell script.
Call it Dark, and in its "Content" put - Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0, this will change your Windows theme to dark, press save.
Do the same for Light, add a PS Script with the content - Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 1.
Now connect the Dark and Light operators to the respective PS Scripts! You should have a canvas similar to this -
Image shows the canvas of theme search

Try searching for "theme" and see how your Windows theme changes!
You can customize this to change based on prefix for example create a search trigger that accepts "theme dark" and "theme light" and connect each to the different search result.

Share your Tasks

While you can use Tasks to create very specific automation for your scenarios, you can also make "generic" ones that apply to more people and share them. Tasks are stored as YAML files in your %appdata%\Blast\Tasks folder, you can share a Task file with anyone.

Your feedback is needed!

This is a VERY early version, it has bugs, and it's not user-friendly, for the next few weeks it will change a lot these changes might affect the Tasks you created.
In case this wasn't enough to scare you, then I really need your feedback for the following -

  • Concept "terms", how intuitive each part of this feature ("Tasks", "Operations", "Triggers"), I am open for new names.
  • Operation execution - it's currently like a tree, let me know if it makes sense
  • Variables system

Please try to not share too much feedback about the UI itself, I first want to focus on the functionality side, I know the UI is buggy.

Post any feedback here, send me through mail (support@fluentsearch.net) or join the Discord server - https://discord.gg/hsv8C43MGN

Question and answers

Q - Why do I need this?
A - You do not necessarily need it, but the Tasks other users will create might prove useful for you.

Q - Is this replacing plugins?
A - No, writing C# plugins is always better technically, but using Tasks you can do it even faster without C# knowledge.

Q - What more Operations should I expect?
A - I am planning to add all Fluent Search features as operations, and allow 3rd party operations through C# plugins.

About Fluent Search

Fluent Search feature showcase, updates, news and more