Skip to content

Commit

Permalink
Spotify keybindings (#1682)
Browse files Browse the repository at this point in the history
* Spotify keybindings

* spotify keybindings
  • Loading branch information
thecarlo authored Jun 24, 2024
1 parent 8475421 commit fb20122
Show file tree
Hide file tree
Showing 2 changed files with 286 additions and 0 deletions.
3 changes: 3 additions & 0 deletions public/groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
283 changes: 283 additions & 0 deletions public/json/spotify.json
Original file line number Diff line number Diff line change
@@ -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"]
}
]
}
]
}
]
}

0 comments on commit fb20122

Please sign in to comment.