From fb20122ab24c0bc514dc5d271b6801c1b16f9711 Mon Sep 17 00:00:00 2001 From: Carlo van Wyk <5310264+thecarlo@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:16:04 +1000 Subject: [PATCH] Spotify keybindings (#1682) * Spotify keybindings * spotify keybindings --- public/groups.json | 3 + public/json/spotify.json | 283 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 286 insertions(+) create mode 100644 public/json/spotify.json diff --git a/public/groups.json b/public/groups.json index 9f5e69773..a48ae7dcc 100644 --- a/public/groups.json +++ b/public/groups.json @@ -183,6 +183,9 @@ "path": "json/google_chrome.json", "extra_description_path": "extra_descriptions/google_chrome.html" }, + { + "path": "json/spotify.json" + }, { "path": "json/slack.json", "extra_description_path": "extra_descriptions/slack.html" diff --git a/public/json/spotify.json b/public/json/spotify.json new file mode 100644 index 000000000..4f038f0cc --- /dev/null +++ b/public/json/spotify.json @@ -0,0 +1,283 @@ +{ + "title": "Spotify", + "maintainers": ["thecarlo"], + "rules": [ + { + "description": "Hyper Key: Caps Lock → left control + left shift + right command (⌃⇧⌘)", + "manipulators": [ + { + "from": { + "key_code": "caps_lock", + "modifiers": { + "optional": ["any"] + } + }, + "to": [ + { + "set_variable": { + "name": "hyper_caps_lock", + "value": 1 + } + }, + { + "key_code": "left_control", + "modifiers": ["left_shift", "right_command"] + } + ], + "to_after_key_up": [ + { + "set_variable": { + "name": "hyper_caps_lock", + "value": 0 + } + } + ], + "type": "basic" + } + ] + }, + { + "description": "Spotify: Caps Lock Hyper key + a → search", + "manipulators": [ + { + "conditions": [ + { + "type": "frontmost_application_if", + "bundle_identifiers": ["^com\\.spotify\\.client$"] + } + ], + "type": "basic", + "from": { + "key_code": "a", + "modifiers": { + "mandatory": ["left_control", "left_shift", "right_command"], + "optional": [] + } + }, + "to": [ + { + "key_code": "k", + "modifiers": ["command"] + } + ] + } + ] + }, + { + "description": "Spotify: Caps Lock Hyper key + s → search in library", + "manipulators": [ + { + "conditions": [ + { + "type": "frontmost_application_if", + "bundle_identifiers": ["^com\\.spotify\\.client$"] + } + ], + "type": "basic", + "from": { + "key_code": "s", + "modifiers": { + "mandatory": ["left_control", "left_shift", "right_command"], + "optional": [] + } + }, + "to": [ + { + "key_code": "f", + "modifiers": ["command", "option"] + } + ] + } + ] + }, + { + "description": "Spotify: Caps Lock Hyper key + 1 → home", + "manipulators": [ + { + "conditions": [ + { + "type": "frontmost_application_if", + "bundle_identifiers": ["^com\\.spotify\\.client$"] + } + ], + "type": "basic", + "from": { + "key_code": "1", + "modifiers": { + "mandatory": ["left_control", "left_shift", "right_command"], + "optional": [] + } + }, + "to": [ + { + "key_code": "h", + "modifiers": ["option", "shift"] + } + ] + } + ] + }, + { + "description": "Spotify: Caps Lock Hyper key + 2 → now playing", + "manipulators": [ + { + "conditions": [ + { + "type": "frontmost_application_if", + "bundle_identifiers": ["^com\\.spotify\\.client$"] + } + ], + "type": "basic", + "from": { + "key_code": "2", + "modifiers": { + "mandatory": ["left_control", "left_shift", "right_command"], + "optional": [] + } + }, + "to": [ + { + "key_code": "j", + "modifiers": ["option", "shift"] + } + ] + } + ] + }, + { + "description": "Spotify: Caps Lock Hyper key + 3 → your library", + "manipulators": [ + { + "conditions": [ + { + "type": "frontmost_application_if", + "bundle_identifiers": ["^com\\.spotify\\.client$"] + } + ], + "type": "basic", + "from": { + "key_code": "3", + "modifiers": { + "mandatory": ["left_control", "left_shift", "right_command"], + "optional": [] + } + }, + "to": [ + { + "key_code": "0", + "modifiers": ["option", "shift"] + } + ] + } + ] + }, + { + "description": "Spotify: Caps Lock Hyper key + 4 → your playlists", + "manipulators": [ + { + "conditions": [ + { + "type": "frontmost_application_if", + "bundle_identifiers": ["^com\\.spotify\\.client$"] + } + ], + "type": "basic", + "from": { + "key_code": "4", + "modifiers": { + "mandatory": ["left_control", "left_shift", "right_command"], + "optional": [] + } + }, + "to": [ + { + "key_code": "1", + "modifiers": ["option", "shift"] + } + ] + } + ] + }, + { + "description": "Spotify: Caps Lock Hyper key + q → queue", + "manipulators": [ + { + "conditions": [ + { + "type": "frontmost_application_if", + "bundle_identifiers": ["^com\\.spotify\\.client$"] + } + ], + "type": "basic", + "from": { + "key_code": "q", + "modifiers": { + "mandatory": ["left_control", "left_shift", "right_command"], + "optional": [] + } + }, + "to": [ + { + "key_code": "q", + "modifiers": ["option", "shift"] + } + ] + } + ] + }, + { + "description": "Spotify: Caps Lock Hyper key + w → toggle left sidebar", + "manipulators": [ + { + "conditions": [ + { + "type": "frontmost_application_if", + "bundle_identifiers": ["^com\\.spotify\\.client$"] + } + ], + "type": "basic", + "from": { + "key_code": "w", + "modifiers": { + "mandatory": ["left_control", "left_shift", "right_command"], + "optional": [] + } + }, + "to": [ + { + "key_code": "l", + "modifiers": ["option", "shift"] + } + ] + } + ] + }, + { + "description": "Spotify: Caps Lock Hyper key + e → toggle right sidebar", + "manipulators": [ + { + "conditions": [ + { + "type": "frontmost_application_if", + "bundle_identifiers": ["^com\\.spotify\\.client$"] + } + ], + "type": "basic", + "from": { + "key_code": "e", + "modifiers": { + "mandatory": ["left_control", "left_shift", "right_command"], + "optional": [] + } + }, + "to": [ + { + "key_code": "r", + "modifiers": ["option", "shift"] + } + ] + } + ] + } + ] +}