Skip to content

Commit

Permalink
Merge pull request #1719 from kmatheussen/my-settings
Browse files Browse the repository at this point in the history
SIGKILL_frontmost_application.json
  • Loading branch information
tekezo authored Oct 1, 2024
2 parents 84b4508 + 482bbed commit 0b35725
Show file tree
Hide file tree
Showing 2 changed files with 24 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 @@ -4,6 +4,9 @@
"name": "OS Functionality",
"id": "os-functionality",
"files": [
{
"path": "json/SIGKILL_frontmost_application.json"
},
{
"path": "json/vim_like_switch_apps.json"
},
Expand Down
21 changes: 21 additions & 0 deletions public/json/SIGKILL_frontmost_application.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"title": "SIGKILL frontmost application",

"rules": [
{
"description": "Saves you from having to reset the computer if e.g. a program has captured the screen and hangs. It does so by sending the SIGKILL signal to the frontmost application. Note: Macos already has a similar keybinding: Press Shift+Ctrl+Cmd+Esc for three seconds. However the built-in keybinding only sends SIGTERM, which doesn't always work, for instance if the program has a signal handler or runs in a debugger.",

"manipulators": [
{
"from": {
"key_code": "f12",
"modifiers": { "mandatory": ["left_shift", "left_option", "left_command"] }
},
"to": [{ "shell_command": "killall -9 \"$(osascript -e 'tell application \"System Events\" to (name of (first process whose frontmost is true))')\"" }],
"type": "basic"
}
]
}
]
}

0 comments on commit 0b35725

Please sign in to comment.