koekeishiya / yabai

A tiling window manager for macOS based on binary space partitioning
MIT License
23.93k stars 651 forks source link

"warning: failed to get scripting definition" #55

Closed blissdev closed 5 years ago

blissdev commented 5 years ago
$ yabai
2019-06-22 16:23:11.127 yabai[555:8381] warning: failed to get scripting definition from /System/Library/CoreServices/Dock.app; it may not be scriptable.
yabai configuration loaded..

Does this indicate installing the sa-additions failed? I did run the command without error.

macOS 10.14.5

koekeishiya commented 5 years ago

This warning is just because there is no .sdef file within the Dock.app "folder". This file is supposed to define an interface for applications that provide an API such that external software written by other people can call functions or otherwise interact with a running instance of the application. (see e.g Spotify as an example).

The Dock.app provides no such definition, and that is what this warning is about. It is not related to how we use the Scripting Bridge framework for code injection.

Hopefully this clears up some misconceptions regarding this warning.

For people who are interested in more information, search for"sdef", "scripting bridge framework", "scriptable applications" on google/apple docs.

koekeishiya commented 5 years ago

@dominiklohmann

Maybe we should mention something about this warning as well in the wiki somewhere? I've given a few attempts at trying to silence the warning before we issue the load command, but I cannot seem to find a way to silence it..

dominiklohmann commented 5 years ago

Noted.

Did you try temporarily redirecting stderr to /dev/null while loading the scripting addition using freopen, unless --verbose is set?

koekeishiya commented 5 years ago

No need to mention it, apparently I was just doing some dumb mistake last time I attempted to temporarily redirect stderr to /dev/null

dominiklohmann commented 5 years ago

Noted. 😅