mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 12:42:06 +00:00
use Electron with ToastXML instead of SnoreToast
* Add support for protocol commands * Remove node-notifier dependency
This commit is contained in:
@ -8,7 +8,7 @@ const pressKey = (window, key, modifiers = []) => {
|
||||
};
|
||||
|
||||
module.exports = (win) => {
|
||||
return {
|
||||
const commands = {
|
||||
// Playback
|
||||
previous: () => pressKey(win, "k"),
|
||||
next: () => pressKey(win, "j"),
|
||||
@ -21,8 +21,7 @@ module.exports = (win) => {
|
||||
go1sForward: () => pressKey(win, "l", ["shift"]),
|
||||
shuffle: () => pressKey(win, "s"),
|
||||
switchRepeat: (n = 1) => {
|
||||
for (let i = 0; i < n; i++)
|
||||
pressKey(win, "r");
|
||||
for (let i = 0; i < n; i++) pressKey(win, "r");
|
||||
},
|
||||
// General
|
||||
volumeMinus10: () => pressKey(win, "-"),
|
||||
@ -50,4 +49,9 @@ module.exports = (win) => {
|
||||
search: () => pressKey(win, "/"),
|
||||
showShortcuts: () => pressKey(win, "/", ["shift"]),
|
||||
};
|
||||
return {
|
||||
...commands,
|
||||
play: commands.playPause,
|
||||
pause: commands.playPause
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user