Plugin: Global Keybinds#4104
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…i1/pear-desktop into global-keybindings
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…i1/pear-desktop into global-keybindings
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
How do I add this? Not having a working global keybind is so annoying. |
@sharkslovegaming for now we need to wait for the project maintainers to review these changes and publish a new version of the app with the global keybind support. If you’re comfortable with the technical side, you can check out my branch (https://github.com/gabrielpastori1/pear-desktop/tree/global-keybindings) and build the app locally to use it right away—that’s what I’m doing at the moment. |
|
@ArjixWasTaken and @JellyBrick, can you review my PR please? |
| : is.macOS() | ||
| ? 'hiddenInset' | ||
| : 'default', | ||
| ? 'hiddenInset' |
There was a problem hiding this comment.
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ··
| ? 'hiddenInset' | |
| ? 'hiddenInset' |
| ? 'hiddenInset' | ||
| : 'default', | ||
| ? 'hiddenInset' | ||
| : 'default', |
There was a problem hiding this comment.
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ··
| : 'default', | |
| : 'default', |
| : is.windows() | ||
| ? userAgents.windows | ||
| : userAgents.linux; | ||
| ? userAgents.windows |
There was a problem hiding this comment.
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ··
| ? userAgents.windows | |
| ? userAgents.windows |
| ? userAgents.windows | ||
| : userAgents.linux; | ||
| ? userAgents.windows | ||
| : userAgents.linux; |
There was a problem hiding this comment.
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ··
| : userAgents.linux; | |
| : userAgents.linux; |
| if (acc.cancel) { | ||
| return acc; | ||
| } | ||
| return listeners.reduce(async (accumulator, listener) => { |
There was a problem hiding this comment.
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ⏎········
| return listeners.reduce(async (accumulator, listener) => { | |
| return listeners.reduce( | |
| async (accumulator, listener) => { |
| const acc = await accumulator; | ||
| if (acc.cancel) { | ||
| return acc; | ||
| } |
There was a problem hiding this comment.
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ··
| } | |
| } |
| return { ...accumulator, ...result }; | ||
| }, | ||
| Promise.resolve({ cancel: false }), | ||
| const result = await listener.apply(); |
There was a problem hiding this comment.
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ··
| const result = await listener.apply(); | |
| const result = await listener.apply(); |
| }, | ||
| Promise.resolve({ cancel: false }), | ||
| const result = await listener.apply(); | ||
| return { ...accumulator, ...result }; |
There was a problem hiding this comment.
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ··
| return { ...accumulator, ...result }; | |
| return { ...accumulator, ...result }; |
| Promise.resolve({ cancel: false }), | ||
| const result = await listener.apply(); | ||
| return { ...accumulator, ...result }; | ||
| }, |
There was a problem hiding this comment.
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ··
| }, | |
| }, |
| const result = await listener.apply(); | ||
| return { ...accumulator, ...result }; | ||
| }, | ||
| Promise.resolve({ cancel: false }), |
There was a problem hiding this comment.
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ··
| Promise.resolve({ cancel: false }), | |
| Promise.resolve({ cancel: false }), |
|
Did you use an AI tool to create this PR? |
No, the only part where AI was used was in the readme and for bug checking. |
| ## 👨💻 Author | ||
|
|
||
| **Gabriel Pastori** | ||
| * 🇧🇷 Brazilian Developer | ||
| * GitHub: [gabrielpastori1](https://github.com/gabrielpastori1) |
There was a problem hiding this comment.
The official way we declare authorship of plugins is via the authors property when declaring the plugin.
e.g. https://github.com/pear-devs/pear-desktop/blob/master/src/plugins/synced-lyrics/index.ts#L14
You can either supply your GitHub username (gabrielpastori1) or use the git author syntax (Gabriel Pastori <email-address>)
The README file feels out of place and has no visibility for the end-user.
(well, the authors property has no visibility either, but that will change once #3066 is merged)
There was a problem hiding this comment.
If you feel like the current plugin details are limiting, you can ofc make suggestions to help improve the details system for all plugins.
But using a random README file is unstructured and does no justice to the plugin
Global Keybinds Plugin
This plugin enables system-wide global keyboard shortcuts for the music player. It allows you to control media playback, volume, and track ratings (like/dislike) from anywhere in your operating system, even when the application is minimized or not in focus.
🚀 Features
🎹 Default Shortcuts
By default, the plugin is configured with the following key combinations (using
Shift+Ctrlto avoid conflicts with common system shortcuts):Shift+Ctrl+SpaceShift+Ctrl+Right ArrowShift+Ctrl+Left ArrowShift+Ctrl+Up ArrowShift+Ctrl+Down ArrowShift+Ctrl+=Shift+Ctrl+-⚙️ Configuration & Options
You can customize the behavior and key assignments through the plugin menu.
Remapping Keys
Click on the "Keybinds Management" option in the plugin menu. A prompt will appear allowing you to press the new key combination you wish to assign to each action.
Window Visibility Toggle (Double Tap)
Double Tap to Toggle Window VisibilityEnabled👨💻 Author
Gabriel Pastori
🤝 Credits
This plugin was developed using the precise-volume plugin as a base and reference.