mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-12 02:51:46 +00:00
41 lines
776 B
TypeScript
41 lines
776 B
TypeScript
import { createPluginBuilder } from '../utils/builder';
|
|
|
|
export type ShortcutMappingType = {
|
|
previous: string;
|
|
playPause: string;
|
|
next: string;
|
|
};
|
|
export type ShortcutsPluginConfig = {
|
|
enabled: boolean;
|
|
overrideMediaKeys: boolean;
|
|
global: ShortcutMappingType;
|
|
local: ShortcutMappingType;
|
|
}
|
|
|
|
const builder = createPluginBuilder('shortcuts', {
|
|
name: 'Shortcuts (& MPRIS)',
|
|
restartNeeded: true,
|
|
config: {
|
|
enabled: false,
|
|
overrideMediaKeys: false,
|
|
global: {
|
|
previous: '',
|
|
playPause: '',
|
|
next: '',
|
|
},
|
|
local: {
|
|
previous: '',
|
|
playPause: '',
|
|
next: '',
|
|
},
|
|
} as ShortcutsPluginConfig,
|
|
});
|
|
|
|
export default builder;
|
|
|
|
declare global {
|
|
interface PluginBuilderList {
|
|
[builder.id]: typeof builder;
|
|
}
|
|
}
|