Skip to content

Commit

Permalink
Merge pull request #1485 from michaelwitk/my-settings
Browse files Browse the repository at this point in the history
windows feature: taskbar + number opens app
  • Loading branch information
tekezo authored Sep 7, 2023
2 parents 6af8068 + 1ad0025 commit 61bd0a9
Show file tree
Hide file tree
Showing 3 changed files with 351 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 @@ -1215,6 +1215,9 @@
"name": "OS Functionality",
"id": "os-functionality",
"files": [
{
"path": "json/mwit-taskbar-number-launch-app.json"
},
{
"path": "json/F4-desktop.json"
},
Expand Down
180 changes: 180 additions & 0 deletions public/json/mwit-taskbar-number-launch-app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"title": "Launch MacOS apps, like on windows + number",
"rules": [
{
"description": "Launch apps by (left) option + number.",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "q",
"modifiers": {
"mandatory": [
"left_gui"
]
}
},
"to": [
{
"shell_command": "open -a 'Safari.app'"
}
]
},
{
"type": "basic",
"from": {
"key_code": "w",
"modifiers": {
"mandatory": [
"left_gui"
]
}
},
"to": [
{
"shell_command": "open -a 'Visual Studio Code.app'"
}
],
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^com\\.apple\\.Terminal$",
"^com\\.brave\\.Browser$",
"^com\\.microsoft\\.VSCode$"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "w",
"modifiers": {
"mandatory": [
"left_alt"
]
}
},
"to": [
{
"shell_command": "open -a 'Firefox.app'"
}
]
},
{
"type": "basic",
"from": {
"key_code": "q",
"modifiers": {
"mandatory": [
"left_alt"
]
}
},
"to": [
{
"shell_command": "open -a 'Safari.app'"
}
]
},
{
"type": "basic",
"from": {
"key_code": "1",
"modifiers": {
"mandatory": [
"left_alt"
]
}
},
"to": [
{
"shell_command": "open -a 'Brave Browser.app'"
}
]
},
{
"type": "basic",
"from": {
"key_code": "2",
"modifiers": {
"mandatory": [
"left_alt"
]
}
},
"to": [
{
"shell_command": "open -a 'Visual Studio Code.app'"
}
]
},
{
"type": "basic",
"from": {
"key_code": "3",
"modifiers": {
"mandatory": [
"left_alt"
]
}
},
"to": [
{
"shell_command": "open -a 'Terminal.app'"
}
]
},
{
"type": "basic",
"from": {
"key_code": "4",
"modifiers": {
"mandatory": [
"left_alt"
]
}
},
"to": [
{
"shell_command": "open -a 'Discord.app'"
}
]
},
{
"type": "basic",
"from": {
"key_code": "5",
"modifiers": {
"mandatory": [
"left_alt"
]
}
},
"to": [
{
"shell_command": "open -a 'Safari.app'"
}
]
},
{
"type": "basic",
"from": {
"key_code": "6",
"modifiers": {
"mandatory": [
"left_alt"
]
}
},
"to": [
{
"shell_command": "open -a 'Discord.app'"
}
]
}
]
}
]
}
168 changes: 168 additions & 0 deletions src/json/mwit-taskbar-number-launch-app.json.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
// JavaScript should be written in ECMAScript 5.1.

function main() {
console.log(
JSON.stringify(
{
title: 'Launch MacOS apps, like on windows + number',
rules: [
{
description: 'Launch apps by (left) option + number.',
manipulators: [
{
type: 'basic',
from: {
key_code: 'q',
modifiers: {
mandatory: ['left_gui'],
},
},
to: [
{
shell_command: "open -a 'Safari.app'",
},
],
},
{
type: 'basic',
from: {
key_code: 'w',
modifiers: {
mandatory: ['left_gui'],
},
},
to: [
{
shell_command: "open -a 'Visual Studio Code.app'",
},
],
conditions: [
{
type: 'frontmost_application_unless',
bundle_identifiers: ['^com\\.apple\\.Terminal$', '^com\\.brave\\.Browser$', '^com\\.microsoft\\.VSCode$'],
},
],
},
{
type: 'basic',
from: {
key_code: 'w',
modifiers: {
mandatory: ['left_alt'],
},
},
to: [
{
shell_command: "open -a 'Firefox.app'",
},
],
},
{
type: 'basic',
from: {
key_code: 'q',
modifiers: {
mandatory: ['left_alt'],
},
},
to: [
{
shell_command: "open -a 'Safari.app'",
},
],
},
{
type: 'basic',
from: {
key_code: '1',
modifiers: {
mandatory: ['left_alt'],
},
},
to: [
{
shell_command: "open -a 'Brave Browser.app'",
},
],
},
{
type: 'basic',
from: {
key_code: '2',
modifiers: {
mandatory: ['left_alt'],
},
},
to: [
{
shell_command: "open -a 'Visual Studio Code.app'",
},
],
},
{
type: 'basic',
from: {
key_code: '3',
modifiers: {
mandatory: ['left_alt'],
},
},
to: [
{
shell_command: "open -a 'Terminal.app'",
},
],
},
{
type: 'basic',
from: {
key_code: '4',
modifiers: {
mandatory: ['left_alt'],
},
},
to: [
{
shell_command: "open -a 'Discord.app'",
},
],
},
{
type: 'basic',
from: {
key_code: '5',
modifiers: {
mandatory: ['left_alt'],
},
},
to: [
{
shell_command: "open -a 'Safari.app'",
},
],
},
{
type: 'basic',
from: {
key_code: '6',
modifiers: {
mandatory: ['left_alt'],
},
},
to: [
{
shell_command: "open -a 'Discord.app'",
},
],
},
],
},
],
},
null,
' '
)
)
}

main()

0 comments on commit 61bd0a9

Please sign in to comment.