Skip to content

IPluginHotkey Interface for Global Hotkey & Window Hotkey / Support Rename File & Folder by Hotkey or Context Menu #3770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 72 commits into
base: dev
Choose a base branch
from

Conversation

Koisu-unavailable
Copy link

@Koisu-unavailable Koisu-unavailable commented Jun 24, 2025

Changes:

  • New Interface IPluginHotkey to register global & search window hotkeys for one plugins.
/// <summary>
/// Represent plugins that support global hotkey or search window hotkey.
/// </summary>
public interface IPluginHotkey : IFeatures
{
    /// <summary>
    /// Get the list of plugin hotkeys which will be registered in the settings page.
    /// </summary>
    /// <returns></returns>
    List<BasePluginHotkey> GetPuginHotkeys();
}
  • Plugin hotkey setting UI
image
  • Add an item to the context menu for the explorer plugin that allow you to rename files/directories. It opens a dialog.
image
  • Add a hotkey (defaults to F2) that also opens the dialog when a file is selected
image

Resolve #1614.

TODOS:

  • Organize main window hotkeys, like Ctrl+Enter to open results? May need to find a workaround for compatibility.
  • Specific commands id in Result class.
  • Event handler when changing commands during runtime.
  • Redesign welcome page 3.
  • Implement IPluginHotkey interface for Program & Shell plugin.
  • Improve plugin hotkey setting UI.

Future:

  • Command bar like Raycast with those commands

@Koisu-unavailable Koisu-unavailable marked this pull request as ready for review June 24, 2025 03:59
Copy link

gitstream-cm bot commented Jun 24, 2025

🥷 Code experts: Jack251970, onesounds

Jack251970, onesounds have most 👩‍💻 activity in the files.
Jack251970, onesounds have most 🧠 knowledge in the files.

See details

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Activity based on git-commit:

Jack251970 onesounds
JUN 3 additions & 2 deletions
MAY 84 additions & 30 deletions 5 additions & 3 deletions
APR 34 additions & 83 deletions 104 additions & 38 deletions
MAR 142 additions & 94 deletions 10 additions & 0 deletions
FEB 10 additions & 4 deletions
JAN 17 additions & 4 deletions

Knowledge based on git-blame:
Jack251970: 31%
onesounds: 20%

Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs

Activity based on git-commit:

Jack251970 onesounds
JUN 45 additions & 2 deletions
MAY 4 additions & 1 deletions 5 additions & 0 deletions
APR 228 additions & 27 deletions
MAR
FEB 38 additions & 28 deletions
JAN 21 additions & 3 deletions

Knowledge based on git-blame:
Jack251970: 50%
onesounds: 1%

Flow.Launcher/HotkeyControl.xaml.cs

Activity based on git-commit:

Jack251970 onesounds
JUN
MAY 5 additions & 0 deletions
APR 11 additions & 15 deletions 3 additions & 0 deletions
MAR 150 additions & 37 deletions
FEB
JAN

Knowledge based on git-blame:
Jack251970: 44%
onesounds: 2%

Flow.Launcher/Languages/en.xaml

Activity based on git-commit:

Jack251970 onesounds
JUN 8 additions & 0 deletions 7 additions & 6 deletions
MAY 14 additions & 3 deletions 15 additions & 2 deletions
APR 22 additions & 21 deletions 45 additions & 23 deletions
MAR 67 additions & 42 deletions 8 additions & 3 deletions
FEB 15 additions & 9 deletions
JAN 1 additions & 0 deletions

Knowledge based on git-blame:
onesounds: 43%
Jack251970: 12%

Flow.Launcher/MainWindow.xaml

Activity based on git-commit:

Jack251970 onesounds
JUN
MAY 3 additions & 3 deletions 4 additions & 4 deletions
APR
MAR 42 additions & 26 deletions
FEB 1 additions & 1 deletions
JAN

Knowledge based on git-blame:
onesounds: 85%
Jack251970: 7%

Flow.Launcher/PublicAPIInstance.cs

Activity based on git-commit:

Jack251970 onesounds
JUN 54 additions & 22 deletions
MAY 124 additions & 131 deletions 190 additions & 74 deletions
APR 165 additions & 61 deletions
MAR 21 additions & 19 deletions
FEB 28 additions & 11 deletions
JAN 45 additions & 47 deletions

Knowledge based on git-blame:
Jack251970: 53%
onesounds: 8%

Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml

Activity based on git-commit:

Jack251970 onesounds
JUN
MAY 1 additions & 1 deletions 4 additions & 1 deletions
APR
MAR 14 additions & 28 deletions
FEB
JAN

Knowledge based on git-blame:
onesounds: 11%
Jack251970: 3%

Flow.Launcher/ViewModel/MainViewModel.cs

Activity based on git-commit:

Jack251970 onesounds
JUN 25 additions & 13 deletions
MAY 529 additions & 316 deletions 4 additions & 0 deletions
APR 35 additions & 28 deletions
MAR 695 additions & 628 deletions 293 additions & 201 deletions
FEB 63 additions & 21 deletions 23 additions & 25 deletions
JAN 17 additions & 21 deletions

Knowledge based on git-blame:
Jack251970: 41%
onesounds: 9%

Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs

Activity based on git-commit:

Jack251970 onesounds
JUN
MAY 23 additions & 0 deletions 3 additions & 3 deletions
APR 13 additions & 18 deletions
MAR
FEB
JAN 1 additions & 0 deletions

Knowledge based on git-blame:
Jack251970: 7%
onesounds: 4%

Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml

Activity based on git-commit:

Jack251970 onesounds
JUN 7 additions & 0 deletions 5 additions & 2 deletions
MAY 10 additions & 2 deletions
APR
MAR
FEB
JAN

Knowledge based on git-blame:
onesounds: 17%
Jack251970: 9%

Plugins/Flow.Launcher.Plugin.Explorer/Main.cs

Activity based on git-commit:

Jack251970 onesounds
JUN 4 additions & 4 deletions
MAY 0 additions & 1 deletions
APR
MAR
FEB
JAN

Knowledge based on git-blame:
Jack251970: 4%

To learn more about /:\ gitStream - Visit our Docs

@Jack251970 Jack251970 added this to the Future milestone Jun 26, 2025
@H5820121
Copy link

@Koisu-unavailable @Jack251970
Thank you!, this is very useful. I hope it comes out very soon in pre-release.

This comment has been minimized.

@Jack251970 Jack251970 self-assigned this Jun 28, 2025

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, or 📝 job summary for details.

❌ Errors, Warnings, and Notices Count
ℹ️ candidate-pattern 1
❌ forbidden-pattern 1
⚠️ non-alpha-in-dictionary 2

See ❌ Event descriptions for more information.

Forbidden patterns 🙅 (1)

In order to address this, you could change the content to not match the forbidden patterns (comments before forbidden patterns may help explain why they're forbidden), add patterns for acceptable instances, or adjust the forbidden patterns themselves.

These forbidden patterns matched content:

Reject duplicate words

\s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s
Pattern suggestions ✂️ (1)

You could add these patterns to .github/actions/spelling/patterns.txt:

# Automatically suggested patterns

# hit-count: 3 file-count: 1
# Non-English
[a-zA-Z]*[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*

Alternatively, if a pattern suggestion doesn't make sense for this project, add a #
to the beginning of the line in the candidates file with the pattern to stop suggesting it.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
30 min review enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let the user select a file/folder from search result and edit its name directly inside Flow; preferably by pressing F2.
6 participants